BlueGit

timfa posprint

CI: vaste artifact-bestandsnamen (BlueGit ondersteunt geen globs)

timfa Ada · pushed by timfa

Authored 2026-10-27 · 3 weeks ago

Hash
262eafec0a13ac15de5b13ebc05dff7c6396b40d
Parent
cbdafe61
Pipeline
Passed
2 files changed +9 −6
blue-ci-cd.yml +8 −5
@@ -79,9 +79,10 @@ build:linux-deb:
79 79 - bash scripts/ci/set-version.sh
80 80 - cargo deb
81 81 - mkdir -p dist
82 - cp target/debian/*.deb dist/
82 - cp target/debian/posprint_$(cat artifacts/version.txt)-1_amd64.deb dist/amd64.deb
83 83 artifacts:
84 paths: [dist/]
84 # BlueGit artifacts are exact file paths (no globs or directories).
85 paths: [dist/amd64.deb]
85 86 expire_in: 30d
86 87
87 88 build:linux-arch:
@@ -111,12 +112,12 @@ build:linux-arch:
111 112 echo "Expected one non-debug Arch package, found ${#mains[@]}" >&2
112 113 exit 1
113 114 fi
114 cp "${mains[0]}" "$CI_PROJECT_DIR/dist/"
115 out="$CI_PROJECT_DIR/dist/posprint-${PKGVER}-x86_64.tar.gz"
115 cp "${mains[0]}" "$CI_PROJECT_DIR/dist/x86_64.pkg.tar.zst"
116 out="$CI_PROJECT_DIR/dist/x86_64-bin.tar.gz"
116 117 bash "$CI_PROJECT_DIR/scripts/make-linux-bin-tarball.sh" "${mains[0]}" "$out" "$PKGVER"
117 118 test -s "$out"
118 119 artifacts:
119 paths: [dist/]
120 paths: [dist/x86_64.pkg.tar.zst, dist/x86_64-bin.tar.gz]
120 121 expire_in: 30d
121 122
122 123 # Cross-compiled with MinGW (no Windows runner on BlueGit).
@@ -157,6 +158,7 @@ aur:dry-run:
157 158 - bash scripts/aur-ssh-setup.sh
158 159 - last="$(git tag -l | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1)"
159 160 - export POSPRINT_SOURCE_ARCHIVE_URL="$CI_API_URL/projects/$CI_PROJECT_PATH/repository/tags/$last/archive"
161 - cp dist/x86_64-bin.tar.gz "dist/posprint-$(cat artifacts/version.txt)-x86_64.tar.gz"
160 162 - AUR_DRY_RUN=1 bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"
161 163
162 164 release:
@@ -179,4 +181,5 @@ publish:aur:
179 181 script:
180 182 - pacman -Syu --noconfirm --needed git openssh curl coreutils shadow util-linux
181 183 - bash scripts/aur-ssh-setup.sh
184 - cp dist/x86_64-bin.tar.gz "dist/posprint-$(cat artifacts/version.txt)-x86_64.tar.gz"
182 185 - bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"
@@ -79,9 +79,10 @@ build:linux-deb:
79 - bash scripts/ci/set-version.sh
79 - bash scripts/ci/set-version.sh
80 - cargo deb
80 - cargo deb
81 - mkdir -p dist
81 - mkdir -p dist
82 - cp target/debian/*.deb dist/
82 - cp target/debian/posprint_$(cat artifacts/version.txt)-1_amd64.deb dist/amd64.deb
83 artifacts:
83 artifacts:
84 paths: [dist/]
84 # BlueGit artifacts are exact file paths (no globs or directories).
85 paths: [dist/amd64.deb]
85 expire_in: 30d
86 expire_in: 30d
86
87
87build:linux-arch:
88build:linux-arch:
@@ -111,12 +112,12 @@ build:linux-arch:
111 echo "Expected one non-debug Arch package, found ${#mains[@]}" >&2
112 echo "Expected one non-debug Arch package, found ${#mains[@]}" >&2
112 exit 1
113 exit 1
113 fi
114 fi
114 cp "${mains[0]}" "$CI_PROJECT_DIR/dist/"
115 cp "${mains[0]}" "$CI_PROJECT_DIR/dist/x86_64.pkg.tar.zst"
115 out="$CI_PROJECT_DIR/dist/posprint-${PKGVER}-x86_64.tar.gz"
116 out="$CI_PROJECT_DIR/dist/x86_64-bin.tar.gz"
116 bash "$CI_PROJECT_DIR/scripts/make-linux-bin-tarball.sh" "${mains[0]}" "$out" "$PKGVER"
117 bash "$CI_PROJECT_DIR/scripts/make-linux-bin-tarball.sh" "${mains[0]}" "$out" "$PKGVER"
117 test -s "$out"
118 test -s "$out"
118 artifacts:
119 artifacts:
119 paths: [dist/]
120 paths: [dist/x86_64.pkg.tar.zst, dist/x86_64-bin.tar.gz]
120 expire_in: 30d
121 expire_in: 30d
121
122
122# Cross-compiled with MinGW (no Windows runner on BlueGit).
123# Cross-compiled with MinGW (no Windows runner on BlueGit).
@@ -157,6 +158,7 @@ aur:dry-run:
157 - bash scripts/aur-ssh-setup.sh
158 - bash scripts/aur-ssh-setup.sh
158 - last="$(git tag -l | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1)"
159 - last="$(git tag -l | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1)"
159 - export POSPRINT_SOURCE_ARCHIVE_URL="$CI_API_URL/projects/$CI_PROJECT_PATH/repository/tags/$last/archive"
160 - export POSPRINT_SOURCE_ARCHIVE_URL="$CI_API_URL/projects/$CI_PROJECT_PATH/repository/tags/$last/archive"
161 - cp dist/x86_64-bin.tar.gz "dist/posprint-$(cat artifacts/version.txt)-x86_64.tar.gz"
160 - AUR_DRY_RUN=1 bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"
162 - AUR_DRY_RUN=1 bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"
161
163
162release:
164release:
@@ -179,4 +181,5 @@ publish:aur:
179 script:
181 script:
180 - pacman -Syu --noconfirm --needed git openssh curl coreutils shadow util-linux
182 - pacman -Syu --noconfirm --needed git openssh curl coreutils shadow util-linux
181 - bash scripts/aur-ssh-setup.sh
183 - bash scripts/aur-ssh-setup.sh
184 - cp dist/x86_64-bin.tar.gz "dist/posprint-$(cat artifacts/version.txt)-x86_64.tar.gz"
182 - bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"
185 - bash scripts/publish-aur.sh "$(cat artifacts/version.txt)"
scripts/ci/release.sh +1 −1
@@ -9,7 +9,7 @@ v="$(cat artifacts/version.txt)"
9 9 now="$(bash scripts/ci/next-version.sh)"
10 10 [[ "$now" == "$v" ]] || { echo "Version $v is already taken (next is $now). Rerun the pipeline." >&2; exit 1; }
11 11 asset() { printf '{"job":"%s","path":"%s","name":"%s"}' "$1" "$2" "$3"; }
12 assets="$(asset build:linux-deb "dist/posprint_${v}-1_amd64.deb" "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch "dist/posprint-${v}-1-x86_64.pkg.tar.zst" "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch "dist/posprint-${v}-x86_64.tar.gz" "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe)"
12 assets="$(asset build:linux-deb dist/amd64.deb "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch dist/x86_64.pkg.tar.zst "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch dist/x86_64-bin.tar.gz "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe)"
13 13 desc='* Debian/Ubuntu: posprint_<version>-1_amd64.deb\n* Arch: posprint-<version>-1-x86_64.pkg.tar.zst\n* Linux binary tarball (AUR posprint-bin): posprint-<version>-x86_64.tar.gz\n* Windows: posprint.exe\n\nAUR: posprint, posprint-bin.'
14 14 body="$(printf '{"tag":"%s","commit":"%s","name":"posprint %s","body":"%s","assets":[%s]}' "$v" "$CI_COMMIT_SHA" "$v" "$desc" "$assets")"
15 15 echo "Release $v on $CI_COMMIT_SHA"
@@ -9,7 +9,7 @@ v="$(cat artifacts/version.txt)"
9now="$(bash scripts/ci/next-version.sh)"
9now="$(bash scripts/ci/next-version.sh)"
10[[ "$now" == "$v" ]] || { echo "Version $v is already taken (next is $now). Rerun the pipeline." >&2; exit 1; }
10[[ "$now" == "$v" ]] || { echo "Version $v is already taken (next is $now). Rerun the pipeline." >&2; exit 1; }
11asset() { printf '{"job":"%s","path":"%s","name":"%s"}' "$1" "$2" "$3"; }
11asset() { printf '{"job":"%s","path":"%s","name":"%s"}' "$1" "$2" "$3"; }
12assets="$(asset build:linux-deb "dist/posprint_${v}-1_amd64.deb" "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch "dist/posprint-${v}-1-x86_64.pkg.tar.zst" "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch "dist/posprint-${v}-x86_64.tar.gz" "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe)"
12assets="$(asset build:linux-deb dist/amd64.deb "posprint_${v}-1_amd64.deb"),$(asset build:linux-arch dist/x86_64.pkg.tar.zst "posprint-${v}-1-x86_64.pkg.tar.zst"),$(asset build:linux-arch dist/x86_64-bin.tar.gz "posprint-${v}-x86_64.tar.gz"),$(asset build:windows dist/posprint.exe posprint.exe)"
13desc='* Debian/Ubuntu: posprint_<version>-1_amd64.deb\n* Arch: posprint-<version>-1-x86_64.pkg.tar.zst\n* Linux binary tarball (AUR posprint-bin): posprint-<version>-x86_64.tar.gz\n* Windows: posprint.exe\n\nAUR: posprint, posprint-bin.'
13desc='* Debian/Ubuntu: posprint_<version>-1_amd64.deb\n* Arch: posprint-<version>-1-x86_64.pkg.tar.zst\n* Linux binary tarball (AUR posprint-bin): posprint-<version>-x86_64.tar.gz\n* Windows: posprint.exe\n\nAUR: posprint, posprint-bin.'
14body="$(printf '{"tag":"%s","commit":"%s","name":"posprint %s","body":"%s","assets":[%s]}' "$v" "$CI_COMMIT_SHA" "$v" "$desc" "$assets")"
14body="$(printf '{"tag":"%s","commit":"%s","name":"posprint %s","body":"%s","assets":[%s]}' "$v" "$CI_COMMIT_SHA" "$v" "$desc" "$assets")"
15echo "Release $v on $CI_COMMIT_SHA"
15echo "Release $v on $CI_COMMIT_SHA"