2020-01-21 10:11:38 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-05-05 09:38:50 +03:00
|
|
|
rm -rf AppDir *.AppImage *.zsync
|
2020-01-21 10:11:38 +03:00
|
|
|
mkdir AppDir
|
|
|
|
|
2020-10-03 10:10:04 +03:00
|
|
|
install -Dsm755 -t AppDir/usr/bin target/release/wezterm-mux-server
|
2020-01-21 10:11:38 +03:00
|
|
|
install -Dsm755 -t AppDir/usr/bin target/release/wezterm
|
2020-10-25 03:17:45 +03:00
|
|
|
install -Dsm755 -t AppDir/usr/bin target/release/wezterm-gui
|
2020-05-18 07:51:07 +03:00
|
|
|
install -Dsm755 -t AppDir/usr/bin target/release/strip-ansi-escapes
|
2020-01-21 10:11:38 +03:00
|
|
|
install -Dm644 assets/icon/terminal.png AppDir/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
|
|
|
|
install -Dm644 assets/wezterm.desktop AppDir/usr/share/applications/org.wezfurlong.wezterm.desktop
|
2020-05-05 08:55:33 +03:00
|
|
|
install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
|
2022-03-18 02:35:51 +03:00
|
|
|
install -Dm644 assets/wezterm-nautilus.py AppDir/usr/share/nautilus-python/extensions/wezterm-nautilus.py
|
2020-01-21 10:11:38 +03:00
|
|
|
|
|
|
|
[ -x /tmp/linuxdeploy ] || ( curl -L 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' -o /tmp/linuxdeploy && chmod +x /tmp/linuxdeploy )
|
|
|
|
|
2021-12-06 05:21:06 +03:00
|
|
|
TAG_NAME=${TAG_NAME:-$(git -c "core.abbrev=8" show -s "--format=%cd-%h" "--date=format:%Y%m%d-%H%M%S")}
|
2022-02-02 08:27:22 +03:00
|
|
|
distro=$(lsb_release -is 2>/dev/null || sh -c "source /etc/os-release && echo \$NAME")
|
|
|
|
distver=$(lsb_release -rs 2>/dev/null || sh -c "source /etc/os-release && echo \$VERSION_ID")
|
2020-05-05 09:38:50 +03:00
|
|
|
|
|
|
|
# Embed appropriate update info
|
|
|
|
# https://github.com/AppImage/AppImageSpec/blob/master/draft.md#github-releases
|
|
|
|
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
|
|
|
|
UPDATE="gh-releases-zsync|wez|wezterm|nightly|WezTerm-*.AppImage.zsync"
|
|
|
|
OUTPUT=WezTerm-nightly-$distro$distver.AppImage
|
|
|
|
else
|
|
|
|
UPDATE="gh-releases-zsync|wez|wezterm|latest|WezTerm-*.AppImage.zsync"
|
|
|
|
OUTPUT=WezTerm-$TAG_NAME-$distro$distver.AppImage
|
|
|
|
fi
|
2020-05-05 08:55:33 +03:00
|
|
|
|
|
|
|
# Munge the path so that it finds our appstreamcli wrapper
|
2020-05-05 09:38:50 +03:00
|
|
|
PATH="$PWD/ci:$PATH" \
|
|
|
|
VERSION="$TAG_NAME" \
|
|
|
|
UPDATE_INFORMATION="$UPDATE" \
|
|
|
|
OUTPUT="$OUTPUT" \
|
|
|
|
/tmp/linuxdeploy \
|
2022-05-06 17:54:05 +03:00
|
|
|
--exclude-library='libwayland-client.so.0' \
|
2020-01-21 10:11:38 +03:00
|
|
|
--appdir AppDir \
|
|
|
|
--output appimage \
|
|
|
|
--desktop-file assets/wezterm.desktop
|
2020-05-03 21:21:58 +03:00
|
|
|
|
2020-06-07 22:19:41 +03:00
|
|
|
# Update the AUR build file. We only really want to use this for tagged
|
|
|
|
# builds but it doesn't hurt to generate it always here.
|
|
|
|
SHA256=$(sha256sum $OUTPUT | cut -d' ' -f1)
|
2020-07-05 19:40:28 +03:00
|
|
|
sed -e "s/@TAG@/$TAG_NAME/g" -e "s/@SHA256@/$SHA256/g" < ci/PKGBUILD.template > PKGBUILD
|
|
|
|
sed -e "s/@TAG@/$TAG_NAME/g" -e "s/@SHA256@/$SHA256/g" < ci/wezterm-linuxbrew.rb.template > wezterm-linuxbrew.rb
|