mirror of
https://github.com/VibedByKaKi/yad.git
synced 2026-08-21 03:41:13 +02:00
Omit the reprepro SignWith field when no GPG key is configured. The previous value '!' is rejected by reprepro as a missing value. Build release artifacts from master while keeping workflow and .ci scripts on dev only. Import CI scripts at runtime and derive versions from the checked-out upstream commit. Co-authored-by: KaKi87 <KaKi87@pm.me>
23 lines
660 B
Bash
Executable file
23 lines
660 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
UPSTREAM_VERSION="$(grep '^AC_INIT' configure.ac | sed -E 's/^AC_INIT\(\[[^]]+\], \[([^]]+)\].*/\1/')"
|
|
SOURCE_SHA="$(git rev-parse HEAD)"
|
|
SHORT_SHA="${SOURCE_SHA:0:7}"
|
|
DEB_VERSION="${UPSTREAM_VERSION}-1+git${SHORT_SHA}"
|
|
|
|
export UPSTREAM_VERSION DEB_VERSION SHORT_SHA SOURCE_SHA
|
|
|
|
echo "Package version set to ${DEB_VERSION}"
|
|
|
|
if [[ -n "${GITHUB_ENV:-}" ]]; then
|
|
{
|
|
echo "UPSTREAM_VERSION=${UPSTREAM_VERSION}"
|
|
echo "DEB_VERSION=${DEB_VERSION}"
|
|
echo "SHORT_SHA=${SHORT_SHA}"
|
|
echo "SOURCE_SHA=${SOURCE_SHA}"
|
|
} >> "$GITHUB_ENV"
|
|
fi
|