genappimage: Include update information for releases/nightlies

This will allow users to use AppImageUpdate to update their AppImage.
It requires publishing the created zsync file alongside the appimage
file for the releases.
This commit is contained in:
James McCoy 2018-03-09 10:51:27 -05:00
parent e1f27cdb4c
commit 9dc3cc2c68
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB
2 changed files with 13 additions and 2 deletions

View File

@ -141,6 +141,11 @@ check-single-includes: build/.ran-cmake
appimage:
bash scripts/genappimage.sh
# Build an appimage with embedded update information appimage-nightly for
# nightly builds or appimage-latest for a release
appimage-%:
bash scripts/genappimage.sh $*
lint: check-single-includes clint testlint lualint
.PHONY: test testlint lualint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage

View File

@ -11,6 +11,8 @@ if [ -z "$ARCH" ]; then
export ARCH="$(arch)"
fi
TAG=$1
# App name, used by generate_appimage.
APP=nvim
@ -69,12 +71,16 @@ cd "$APP_BUILD_DIR" # Get out of AppImage directory.
# - Expects: $ARCH, $APP, $VERSION env vars
# - Expects: ./$APP.AppDir/ directory
# - Produces: ../out/$APP-$VERSION.glibc$GLIBC_NEEDED-$ARCH.AppImage
generate_type2_appimage
if [ -n "$TAG" ]; then
generate_type2_appimage -u "gh-releases-zsync|neovim|neovim|$TAG|nvim.appimage.zsync"
else
generate_type2_appimage
fi
# Moving the final executable to a different folder so it isn't in the
# way for a subsequent build.
mv "$ROOT_DIR"/out/*.AppImage "$ROOT_DIR"/build/bin
mv "$ROOT_DIR"/out/*.AppImage* "$ROOT_DIR"/build/bin
# Remove the (now empty) folder the AppImage was built in
rmdir "$ROOT_DIR"/out