build: on Linux use tar+gzip to preserve +x attribute of .AppImage

We create a separate make target to avoid tarballing every time.
This is really useful only for releases we upload for users.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Michael Bradley, Jr 2021-06-04 14:44:39 -05:00 committed by Iuri Matias
parent 6a5b6e3593
commit a564b48f61
2 changed files with 12 additions and 3 deletions

View File

@ -245,6 +245,7 @@ $(APPIMAGE_TOOL):
chmod +x $(APPIMAGE_TOOL)
STATUS_CLIENT_APPIMAGE ?= pkg/Status.AppImage
STATUS_CLIENT_TARBALL ?= pkg/Status.tar.gz
$(STATUS_CLIENT_APPIMAGE): override RESOURCES_LAYOUT := -d:production
$(STATUS_CLIENT_APPIMAGE): nim_status_client $(APPIMAGE_TOOL) nim-status.desktop
@ -280,6 +281,11 @@ $(STATUS_CLIENT_APPIMAGE): nim_status_client $(APPIMAGE_TOOL) nim-status.desktop
mkdir -p pkg
$(APPIMAGE_TOOL) tmp/linux/dist $(STATUS_CLIENT_APPIMAGE)
$(STATUS_CLIENT_TARBALL): $(STATUS_CLIENT_APPIMAGE)
tar czvf $(STATUS_CLIENT_TARBALL) \
-C $(shell dirname $(STATUS_CLIENT_APPIMAGE)) \
$(shell basename $(STATUS_CLIENT_APPIMAGE))
DMG_TOOL := node_modules/.bin/create-dmg
$(DMG_TOOL):
@ -393,6 +399,8 @@ pkg: $(PKG_TARGET)
pkg-linux: check-pkg-target-linux $(STATUS_CLIENT_APPIMAGE)
tgz-linux: $(STATUS_CLIENT_TARBALL)
pkg-macos: check-pkg-target-macos $(STATUS_CLIENT_DMG)
pkg-windows: check-pkg-target-windows $(STATUS_CLIENT_ZIP)

View File

@ -40,6 +40,7 @@ pipeline {
QTDIR = "/opt/qt/5.14.0/gcc_64"
/* Control output the filename */
STATUS_CLIENT_APPIMAGE = "pkg/${utils.pkgFilename('AppImage')}"
STATUS_CLIENT_TARBALL = "pkg/${utils.pkgFilename('tar.gz')}"
}
stages {
@ -68,7 +69,7 @@ pipeline {
credentialsId: utils.getInfuraTokenCred(),
variable: 'INFURA_TOKEN'
)]) {
sh 'make pkg-linux'
sh 'make tgz-linux'
}
}
}
@ -77,13 +78,13 @@ pipeline {
parallel {
stage('Upload') {
steps { script {
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_APPIMAGE)
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_TARBALL)
jenkins.setBuildDesc(AppImage: env.PKG_URL)
} }
}
stage('Archive') {
steps { script {
archiveArtifacts(env.STATUS_CLIENT_APPIMAGE)
archiveArtifacts(env.STATUS_CLIENT_TARBALL)
} }
}
}