1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 05:12:40 +03:00

Embed update info into appimage

This commit is contained in:
Wez Furlong 2020-05-04 23:38:50 -07:00
parent 90de55f807
commit 3d7fc38bb6
3 changed files with 21 additions and 10 deletions

1
.gitignore vendored
View File

@ -12,4 +12,5 @@
/esctest.log /esctest.log
/AppDir /AppDir
/WezTerm*.AppImage /WezTerm*.AppImage
/WezTerm*.AppImage.zsync
/wezterm*-src.tar.gz /wezterm*-src.tar.gz

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
rm -rf AppDir *.AppImage rm -rf AppDir *.AppImage *.zsync
mkdir AppDir mkdir AppDir
install -Dsm755 -t AppDir/usr/bin target/release/wezterm install -Dsm755 -t AppDir/usr/bin target/release/wezterm
@ -13,18 +13,27 @@ install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/org.wezfurlo
TAG_NAME=${TAG_NAME:-$(git describe --tags)} TAG_NAME=${TAG_NAME:-$(git describe --tags)}
TAG_NAME=${TAG_NAME:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)} TAG_NAME=${TAG_NAME:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)}
distro=$(lsb_release -is)
distver=$(lsb_release -rs)
# 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
# Munge the path so that it finds our appstreamcli wrapper # Munge the path so that it finds our appstreamcli wrapper
PATH="$PWD/ci:$PATH" VERSION="$TAG_NAME" /tmp/linuxdeploy \ PATH="$PWD/ci:$PATH" \
VERSION="$TAG_NAME" \
UPDATE_INFORMATION="$UPDATE" \
OUTPUT="$OUTPUT" \
/tmp/linuxdeploy \
--appdir AppDir \ --appdir AppDir \
--output appimage \ --output appimage \
--desktop-file assets/wezterm.desktop --desktop-file assets/wezterm.desktop
distro=$(lsb_release -is)
distver=$(lsb_release -rs)
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
mv WezTerm*.AppImage WezTerm-nightly-$distro$distver.AppImage
else
mv WezTerm*.AppImage WezTerm-$TAG_NAME-$distro$distver.AppImage
fi

View File

@ -264,7 +264,7 @@ cargo build --all --release""",
if ("ubuntu" in self.name) or ("debian" in self.name): if ("ubuntu" in self.name) or ("debian" in self.name):
run += "mv *.deb *.xz pkg_\n" run += "mv *.deb *.xz pkg_\n"
if self.app_image: if self.app_image:
run += "mv *.AppImage pkg_\n" run += "mv *.AppImage *.zsync pkg_\n"
return [ return [
RunStep("Move Package for artifact upload", run), RunStep("Move Package for artifact upload", run),
@ -286,6 +286,7 @@ cargo build --all --release""",
if self.app_image: if self.app_image:
patterns.append("*.AppImage") patterns.append("*.AppImage")
patterns.append("*.zsync")
return patterns return patterns
def upload_asset_nightly(self): def upload_asset_nightly(self):