aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-03-09 22:06:57 -0500
committerGitHub <noreply@github.com>2018-03-09 22:06:57 -0500
commit91547823869cbd76bb3f24365919e94e8d72b528 (patch)
tree725e5ea96ffaf847beb2cbf89386122a2daec50a
parentd53aa0e94f87beb9997dd95f77ca277ecd804ba7 (diff)
parent9dc3cc2c68088ab468d78d9d9b89acd72ac75f80 (diff)
downloadrneovim-91547823869cbd76bb3f24365919e94e8d72b528.tar.gz
rneovim-91547823869cbd76bb3f24365919e94e8d72b528.tar.bz2
rneovim-91547823869cbd76bb3f24365919e94e8d72b528.zip
Merge pull request #8122 from jamessan/appimagev2
Create v2 AppImages and include update information
-rw-r--r--Makefile5
-rwxr-xr-xscripts/genappimage.sh20
2 files changed, 17 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e349cc4d0f..4a880d270a 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/scripts/genappimage.sh b/scripts/genappimage.sh
index a73ccd86c7..2c10ed7202 100755
--- a/scripts/genappimage.sh
+++ b/scripts/genappimage.sh
@@ -11,6 +11,8 @@ if [ -z "$ARCH" ]; then
export ARCH="$(arch)"
fi
+TAG=$1
+
# App name, used by generate_appimage.
APP=nvim
@@ -35,7 +37,7 @@ VERSION=$("$ROOT_DIR"/build/bin/nvim --version | head -n 1 | grep -o 'v.*')
cd "$APP_BUILD_DIR"
-curl -Lo "$APP_BUILD_DIR"/appimage_functions.sh https://github.com/probonopd/AppImages/raw/master/functions.sh
+curl -Lo "$APP_BUILD_DIR"/appimage_functions.sh https://github.com/AppImage/AppImages/raw/master/functions.sh
. ./appimage_functions.sh
# Copy desktop and icon file to AppDir for AppRun to pick them up.
@@ -53,7 +55,7 @@ move_lib
# Delete stuff that should not go into the AppImage.
# Delete dangerous libraries; see
-# https://github.com/probonopd/AppImages/blob/master/excludelist
+# https://github.com/AppImage/AppImages/blob/master/excludelist
delete_blacklisted
########################################################################
@@ -69,14 +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_appimage
+if [ -n "$TAG" ]; then
+ generate_type2_appimage -u "gh-releases-zsync|neovim|neovim|$TAG|nvim.appimage.zsync"
+else
+ generate_type2_appimage
+fi
-# NOTE: There is currently a bug in the `generate_appimage` function (see
-# https://github.com/probonopd/AppImages/issues/228) that causes repeated builds
-# that result in the same name to fail.
-# Moving the final executable to a different folder gets around this issue.
+# 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