summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-31 13:19:32 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-31 13:19:32 +0200
commit1a3369877e940447a75ec1ec1f42776dce283f37 (patch)
tree57c130df989a9e6144e612a565e6a240e1cad449
parentmatrix-structs: Fix historical user ID decoding (diff)
downloadnheko-1a3369877e940447a75ec1ec1f42776dce283f37.tar.xz
Update travis
-rwxr-xr-x.ci/linux/create-packages.sh4
-rwxr-xr-x.ci/linux/deploy.sh4
-rwxr-xr-x.ci/macos/deploy.sh4
-rw-r--r--.travis.yml5
-rw-r--r--Makefile29
-rwxr-xr-xscripts/archive.sh14
6 files changed, 25 insertions, 35 deletions
diff --git a/.ci/linux/create-packages.sh b/.ci/linux/create-packages.sh
index e18c2e6f..bd644fce 100755
--- a/.ci/linux/create-packages.sh
+++ b/.ci/linux/create-packages.sh
@@ -7,10 +7,6 @@
 DIR=package.dir
 TAG=`git tag -l --points-at HEAD`
 
-if [ -z "$TAG" ]; then
-    exit 0
-fi
-
 # Installing dependencies on travis.
 if [ ! -z "$TRAVIS_OS_NAME" ]; then
     sudo apt-add-repository -y ppa:brightbox/ruby-ng
diff --git a/.ci/linux/deploy.sh b/.ci/linux/deploy.sh
index 0e85bbdb..93566162 100755
--- a/.ci/linux/deploy.sh
+++ b/.ci/linux/deploy.sh
@@ -6,10 +6,6 @@ APP=nheko
 DIR=${APP}.AppDir
 TAG=`git tag -l --points-at HEAD`
 
-if [ -z "$TAG" ]; then
-    exit 0
-fi
-
 # Set up AppImage structure.
 mkdir -p ${DIR}/usr/{bin,share/pixmaps,share/applications}
 
diff --git a/.ci/macos/deploy.sh b/.ci/macos/deploy.sh
index 7d28b81e..487b5be7 100755
--- a/.ci/macos/deploy.sh
+++ b/.ci/macos/deploy.sh
@@ -4,10 +4,6 @@ set -e
 
 TAG=`git tag -l --points-at HEAD`
 
-if [ -z "$TAG" ]; then
-    exit 0
-fi
-
 # Add Qt binaries to path
 PATH=/usr/local/opt/qt/bin/:${PATH}
 
diff --git a/.travis.yml b/.travis.yml
index fc12043b..58ccbe02 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,9 +50,8 @@ before_script:
 script:
     - make ci
     - if [ $TRAVIS_OS_NAME == osx ]; then make lint; fi
-    - if [ $TRAVIS_OS_NAME == osx ] && [ $DEPLOYMENT == 1 ]; then ./.ci/macos/deploy.sh; fi
-    - if [ $TRAVIS_OS_NAME == linux ] && [ $DEPLOYMENT == 1 ]; then ./.ci/linux/deploy.sh; fi
-    - if [ $TRAVIS_OS_NAME == linux ] && [ $DEPLOYMENT == 1 ]; then ./.ci/linux/create-packages.sh; fi
+    - if [ $TRAVIS_OS_NAME == osx ] && [ $DEPLOYMENT == 1 ] && [ ! -z $TRAVIS_TAG ]; then make macos-deploy; fi
+    - if [ $TRAVIS_OS_NAME == linux ] && [ $DEPLOYMENT == 1 ] && [ ! -z $TRAVIS_TAG ]; then make linux-deploy; fi
 
 before_deploy:
   - export RELEASE_DEB_FILE=$(ls *.deb)
diff --git a/Makefile b/Makefile
index 424f39ac..72476699 100644
--- a/Makefile
+++ b/Makefile
@@ -11,44 +11,33 @@ release:
 	@cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo
 	@cmake --build build
 
-linux-appimage:
-	@./.ci/linux/deploy.sh
-
 linux-install:
 	cp -f nheko*.AppImage ~/.local/bin
 
-macos-app: release
-	@./.ci/macos/deploy.sh
-
 macos-app-install:
 	cp -Rf build/nheko.app /Applications
 
-run:
-	@./build/nheko
-
 lint:
-	@./.ci/format.sh
+	./.ci/format.sh
 
 image:
 	docker build -t nheko-app-image .
 
-docker-app-image: image
-	docker run \
-		-e CXX=g++-7 \
-		-e CC=gcc-7 \
-		-v `pwd`:/build nheko-app-image make release
-	docker run \
-		--privileged \
-		-v `pwd`:/build nheko-app-image make linux-appimage
+linux-deploy:
+	./.ci/linux/deploy.sh
+	./.ci/linux/create-packages.sh
+
+macos-deploy:
+	./.ci/macos/deploy.sh
 
-docker-packages: image
+docker-app-image: image
 	docker run \
 		-e CXX=g++-7 \
 		-e CC=gcc-7 \
 		-v `pwd`:/build nheko-app-image make release
 	docker run \
 		--privileged \
-		-v `pwd`:/build nheko-app-image ./.ci/linux/create-packages.sh
+		-v `pwd`:/build nheko-app-image make linux-deploy
 
 clean:
 	rm -rf build
diff --git a/scripts/archive.sh b/scripts/archive.sh
new file mode 100755
index 00000000..d963e51e
--- /dev/null
+++ b/scripts/archive.sh
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+TAG=`git tag -l --points-at HEAD`
+PREFIX=$(basename "$(pwd -P)")
+
+if [ ! -z $TAG ]; then
+    PREFIX=$(basename "$(pwd -P)").$TAG
+fi
+
+{
+  git ls-files
+  git submodule foreach --recursive --quiet \
+                'git ls-files --with-tree="$sha1" | sed "s#^#$path/#"'
+} | sed "s#^#$PREFIX/#" | xargs tar -c -C.. -f "$PREFIX.tar.bz2" --