cirrus: fixup arch and release vs. tag

This commit is contained in:
Wez Furlong 2023-10-03 22:32:32 -07:00
parent a1b41ada98
commit ee6a56e704
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
2 changed files with 16 additions and 2 deletions

View File

@ -65,6 +65,10 @@ task:
- env PATH=$HOME/.cargo/bin:$PATH bash get-deps
build_script:
- env PATH=$HOME/.cargo/bin:$PATH cargo build --release -p wezterm-gui -p wezterm -p wezterm-mux-server -p strip-ansi-escapes
- ./ci/deploy.sh
- export BUILD_REASON="Schedule"
- export RELEASE="nightly"
- "test -n \"$CIRRUS_TAG\" && BUILD_REASON=\"tag\""
- "test -n \"$CIRRUS_TAG\" && RELEASE=$(ci/tag-name.sh)"
- "./ci/deploy.sh"
- "ls -l *.deb"
- "bash ci/retry.sh gh release upload --clobber nightly *.deb"
- "bash ci/retry.sh gh release upload --clobber ${RELEASE} *.deb"

View File

@ -306,11 +306,21 @@ EOF
install -Dm644 assets/shell-completion/bash pkg/debian/usr/share/bash-completion/completions/wezterm
install -Dm644 assets/shell-completion/zsh pkg/debian/usr/share/zsh/functions/Completion/Unix/_wezterm
install -Dm644 assets/shell-integration/* -t pkg/debian/etc/profile.d
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
debname=wezterm-nightly.$distro$distver
else
debname=wezterm-$TAG_NAME.$distro$distver
fi
arch=$(dpkg-architecture -q DEB_BUILD_ARCH_CPU)
case $arch in
amd64)
;;
*)
debname="${debname}.${arch}"
;;
esac
fakeroot dpkg-deb --build pkg/debian $debname.deb
if [[ "$BUILD_REASON" != '' ]] ; then