Skip to content

Commit 299037f

Browse files
authored
Merge pull request #78 from pkgforge-dev/feature/upinfo
fix: change upinfo name which conflicts between builds
2 parents 5cd6539 + bc9092e commit 299037f

File tree

3 files changed

+22
-24
lines changed

3 files changed

+22
-24
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: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
set -eux
44

5-
export ARCH="$(uname -m)"
6-
export APPIMAGE_EXTRACT_AND_RUN=1
7-
5+
ARCH="$(uname -m)"
86
GHOSTTY_VERSION="$(cat VERSION)"
97
TMP_DIR="/tmp/ghostty-build"
108
APP_DIR="${TMP_DIR}/ghostty.AppDir"
119
PUB_KEY="RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV"
12-
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY:-no-user/no-repo}" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
10+
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY}" | tr '/' '|')|latest|Ghostty-*$ARCH.AppImage.zsync"
1311
APPDATA_FILE="${PWD}/assets/ghostty.appdata.xml"
1412
DESKTOP_FILE="${PWD}/assets/ghostty.desktop"
1513
LIBS2BUNDLE="./bin/ghostty /usr/lib/libEGL*"
@@ -29,18 +27,18 @@ mkdir -p -- "${TMP_DIR}" "${APP_DIR}/share/metainfo" "${APP_DIR}/shared/lib"
2927

3028
cd "${TMP_DIR}"
3129

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
30+
if [ "${GHOSTTY_VERSION}" = "tip" ]; then
31+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz" -O "ghostty-${GHOSTTY_VERSION}.tar.gz"
32+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz.minisig" -O "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
33+
GHOSTTY_VERSION="$(tar -tf "ghostty-${GHOSTTY_VERSION}.tar.gz" --wildcards "*zig.zon.txt" | awk -F'[-/]' '{print $2"-"$3}')"
34+
mv ghostty-tip.tar.gz "ghostty-${GHOSTTY_VERSION}.tar.gz"
35+
mv ghostty-tip.tar.gz.minisig "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
3836
else
3937
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz"
4038
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
4139
fi
4240

43-
if [ $GLFW == true ]; then
41+
if [ "${GLFW}" = true ]; then
4442
BUILD_ARGS="${BUILD_ARGS} -Dapp-runtime=glfw"
4543
else
4644
LIBS2BUNDLE="${LIBS2BUNDLE} /usr/lib/gdk-pixbuf-*/*/*/*"
@@ -83,7 +81,7 @@ xvfb-run -a -- sharun l -p -v -e -s -k ${LIBS2BUNDLE}
8381

8482
# preload libpixbufloader /w ld-preload-open as svg icons breaks
8583
# either on ghostty tab bar or gnome-text-editor while config edit or both :(
86-
if [ $GLFW == false ]; then
84+
if [ "${GLFW}" = false ]; then
8785
mv ./shared/lib/gdk-pixbuf-2.0 ./
8886
cp -rv /opt/path-mapping.so ./shared/lib/
8987
cp -rv gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so ./shared/lib/
@@ -98,23 +96,24 @@ echo 'unset ARGV0' >>./.env
9896
ln -s ./bin/ghostty ./AppRun
9997
./sharun -g
10098

101-
export VERSION="$(./AppRun --version | awk 'FNR==1 {print $2}')"
102-
if [ -z "$VERSION" ]; then
99+
VERSION="$(./AppRun --version | awk 'FNR==1 {print $2}')"
100+
if [ -z "${VERSION}" ]; then
103101
echo "ERROR: Could not get version from ghostty binary"
104102
exit 1
105103
fi
106104

107105
GHOSTTY_APPIMAGE="Ghostty-${VERSION}-${ARCH}.AppImage"
108106

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

113112
cd "${TMP_DIR}"
114113

115114
# create app image
116-
cp $(command -v uruntime) ./uruntime
117-
cp $(command -v uruntime-lite) ./uruntime-lite
115+
cp "$(command -v uruntime)" ./uruntime
116+
cp "$(command -v uruntime-lite)" ./uruntime-lite
118117

119118
# persist mount for faster launch times
120119
sed -i 's|URUNTIME_MOUNT=[0-9]|URUNTIME_MOUNT=0|' ./uruntime-lite
@@ -131,4 +130,4 @@ echo "Generating AppImage"
131130
-o "${GHOSTTY_APPIMAGE}"
132131

133132
echo "Generating Zsync file"
134-
zsyncmake *.AppImage -u *.AppImage
133+
zsyncmake ./*.AppImage -u ./*.AppImage

setup.sh

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

55
get_latest_gh_release() {
66

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

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

18-
export ARCH="$(uname -m)"
17+
ARCH="$(uname -m)"
1918

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

0 commit comments

Comments
 (0)