Skip to content

Commit b592732

Browse files
author
psadi
committed
fix: change upinfo name which conflicts between builds
1 parent 5cd6539 commit b592732

File tree

3 files changed

+29
-23
lines changed

3 files changed

+29
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
with:
8787
name: ghostty-appimage-${{ matrix.arch }}${{ matrix.glfw == true && '-glfw' || '' }}
8888
retention-days: 7
89-
path: /tmp/ghostty-build/Ghostty-*-${{ matrix.arch }}.AppImage*
89+
path: /tmp/ghostty-build/Ghostty*-${{ matrix.arch }}.AppImage*
9090

9191
tag:
9292
name: "👻 Tip Tag"
@@ -115,7 +115,7 @@ jobs:
115115
run: |
116116
git config user.name "github-actions[bot]"
117117
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
118-
git tag -fa tip -m "Latest Continuous Release" ${GITHUB_SHA}
118+
git tag -fa tip -m "Latest Continuous Release" "${GITHUB_SHA}"
119119
git push --force origin tip
120120
121121
release_stable:

build.sh

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
set -eux
44

5-
export ARCH="$(uname -m)"
6-
export APPIMAGE_EXTRACT_AND_RUN=1
5+
ARCH="$(uname -m)"
6+
export ARCH
7+
8+
APPIMAGE_EXTRACT_AND_RUN=1
9+
export APPIMAGE_EXTRACT_AND_RUN
710

811
GHOSTTY_VERSION="$(cat VERSION)"
912
TMP_DIR="/tmp/ghostty-build"
1013
APP_DIR="${TMP_DIR}/ghostty.AppDir"
1114
PUB_KEY="RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV"
12-
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY:-no-user/no-repo}" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
15+
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY}" | tr '/' '|')|latest|Ghostty-*$ARCH.AppImage.zsync"
1316
APPDATA_FILE="${PWD}/assets/ghostty.appdata.xml"
1417
DESKTOP_FILE="${PWD}/assets/ghostty.desktop"
1518
LIBS2BUNDLE="./bin/ghostty /usr/lib/libEGL*"
@@ -29,18 +32,18 @@ mkdir -p -- "${TMP_DIR}" "${APP_DIR}/share/metainfo" "${APP_DIR}/shared/lib"
2932

3033
cd "${TMP_DIR}"
3134

32-
if [ $GHOSTTY_VERSION == "tip" ]; then
33-
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz" -O ghostty-${GHOSTTY_VERSION}.tar.gz
34-
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz.minisig" -O ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
35-
GHOSTTY_VERSION="$(tar -tf ghostty-${GHOSTTY_VERSION}.tar.gz --wildcards "*zig.zon.txt" | awk -F'[-/]' '{print $2"-"$3}')"
36-
mv ghostty-tip.tar.gz ghostty-${GHOSTTY_VERSION}.tar.gz
37-
mv ghostty-tip.tar.gz.minisig ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
35+
if [ "${GHOSTTY_VERSION}" = "tip" ]; then
36+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz" -O "ghostty-${GHOSTTY_VERSION}.tar.gz"
37+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz.minisig" -O "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
38+
GHOSTTY_VERSION="$(tar -tf "ghostty-${GHOSTTY_VERSION}.tar.gz" --wildcards "*zig.zon.txt" | awk -F'[-/]' '{print $2"-"$3}')"
39+
mv ghostty-tip.tar.gz "ghostty-${GHOSTTY_VERSION}.tar.gz"
40+
mv ghostty-tip.tar.gz.minisig "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
3841
else
3942
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz"
4043
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
4144
fi
4245

43-
if [ $GLFW == true ]; then
46+
if [ "${GLFW}" = true ]; then
4447
BUILD_ARGS="${BUILD_ARGS} -Dapp-runtime=glfw"
4548
else
4649
LIBS2BUNDLE="${LIBS2BUNDLE} /usr/lib/gdk-pixbuf-*/*/*/*"
@@ -83,7 +86,7 @@ xvfb-run -a -- sharun l -p -v -e -s -k ${LIBS2BUNDLE}
8386

8487
# preload libpixbufloader /w ld-preload-open as svg icons breaks
8588
# either on ghostty tab bar or gnome-text-editor while config edit or both :(
86-
if [ $GLFW == false ]; then
89+
if [ "${GLFW}" = false ]; then
8790
mv ./shared/lib/gdk-pixbuf-2.0 ./
8891
cp -rv /opt/path-mapping.so ./shared/lib/
8992
cp -rv gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so ./shared/lib/
@@ -98,23 +101,25 @@ echo 'unset ARGV0' >>./.env
98101
ln -s ./bin/ghostty ./AppRun
99102
./sharun -g
100103

101-
export VERSION="$(./AppRun --version | awk 'FNR==1 {print $2}')"
102-
if [ -z "$VERSION" ]; then
104+
VERSION="$(./AppRun --version | awk 'FNR==1 {print $2}')"
105+
export VERSION
106+
if [ -z "${VERSION}" ]; then
103107
echo "ERROR: Could not get version from ghostty binary"
104108
exit 1
105109
fi
106110

107111
GHOSTTY_APPIMAGE="Ghostty-${VERSION}-${ARCH}.AppImage"
108112

109-
if [ $GLFW == true ]; then
110-
GHOSTTY_APPIMAGE="Ghostty-Glfw-${VERSION}-${ARCH}.AppImage"
113+
if [ "${GLFW}" = true ]; then
114+
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY:-no-user/no-repo}" | tr '/' '|')|latest|Ghossty_*$ARCH.AppImage.zsync"
115+
GHOSTTY_APPIMAGE="Ghostty_Glfw-${VERSION}-${ARCH}.AppImage"
111116
fi
112117

113118
cd "${TMP_DIR}"
114119

115120
# create app image
116-
cp $(command -v uruntime) ./uruntime
117-
cp $(command -v uruntime-lite) ./uruntime-lite
121+
cp "$(command -v uruntime)" ./uruntime
122+
cp "$(command -v uruntime-lite)" ./uruntime-lite
118123

119124
# persist mount for faster launch times
120125
sed -i 's|URUNTIME_MOUNT=[0-9]|URUNTIME_MOUNT=0|' ./uruntime-lite
@@ -131,4 +136,4 @@ echo "Generating AppImage"
131136
-o "${GHOSTTY_APPIMAGE}"
132137

133138
echo "Generating Zsync file"
134-
zsyncmake *.AppImage -u *.AppImage
139+
zsyncmake ./*.AppImage -u ./*.AppImage

setup.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -eux
44

55
get_latest_gh_release() {
66

7-
local gh_ref="${1}"
8-
local version
7+
export gh_ref="${1}"
8+
export version
99
curl -s "https://api.github.com/repos/${gh_ref}/releases/latest" | jq -r .tag_name
1010
}
1111

@@ -15,7 +15,8 @@ ghosttyDeps="gtk4 libadwaita gtk4-layer-shell"
1515
rm -rf "/usr/share/libalpm/hooks/package-cleanup.hook"
1616
pacman -Syuq --needed --noconfirm --noprogressbar ${buildDeps} ${ghosttyDeps}
1717

18-
export ARCH="$(uname -m)"
18+
ARCH="$(uname -m)"
19+
export ARCH
1920

2021
ZIG_VERSION="${ZIG_VERSION:-0.13.0}"
2122
PANDOC_VERSION="$(get_latest_gh_release 'jgm/pandoc')"

0 commit comments

Comments
 (0)