From ee6a56e7040abe48c7d61050b98a203cf50e5157 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 3 Oct 2023 22:32:32 -0700 Subject: [PATCH] cirrus: fixup arch and release vs. tag --- .cirrus.yml | 8 ++++++-- ci/deploy.sh | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index fa0eabe6b..e8f219366 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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" diff --git a/ci/deploy.sh b/ci/deploy.sh index 8d792c8c2..69d87a955 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -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