From 50c4244bdc34bcfc6f8665df567bec30d4e6cb2c Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 13 Sep 2017 23:41:50 -0400 Subject: [PATCH] Single upload to repo server, single package job --- .gitlab-ci.yml | 25 ++++--------------------- packaging/package-upload.sh | 1 + src/meow.tf/deb-simple/server.go | 2 +- 3 files changed, 6 insertions(+), 22 deletions(-) create mode 100644 packaging/package-upload.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3de77c2..f45779f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: git.meow.tf:4567/tyler/golang-glide:1.8 before_script: - export VERSION=`grep "VERSION" src/meow.tf/deb-simple/server.go | head -n 1 | awk '{print $5}' | sed -e 's/^"//' -e 's/"$//' | tr -d '\n'` - - chmod +x packaging/build-package.sh + - chmod +x packaging/build-package.sh packaging/package_upload.sh - export GOPATH=`pwd` stages: @@ -64,32 +64,15 @@ build-armv7: paths: - src/meow.tf/deb-simple/vendor -package-i386: +package: stage: package image: tystuyfzand/fpm script: - cd $CI_PROJECT_DIR - ARCH=i386 packaging/build-package.sh - artifacts: - paths: - - build/i386 - -package-amd64: - stage: package - image: tystuyfzand/fpm - script: - - cd $CI_PROJECT_DIR - ARCH=amd64 packaging/build-package.sh - artifacts: - paths: - - build/amd64 - -package-armv7: - stage: package - image: tystuyfzand/fpm - script: - - cd $CI_PROJECT_DIR - ARCH=armv7 packaging/build-package.sh + - packaging/package-upload.sh artifacts: paths: - - build/armv7 + - build diff --git a/packaging/package-upload.sh b/packaging/package-upload.sh new file mode 100644 index 0000000..a957d82 --- /dev/null +++ b/packaging/package-upload.sh @@ -0,0 +1 @@ +curl -X POST "$UPLOAD_URL" -F "file_i386=@build/i386/deb-simple_$VERSION.deb" -F "file_amd64=@build/i386/deb-simple_$VERSION.deb" -F "file_armv7=@build/armv7/deb-simple_$VERSION.deb" \ No newline at end of file diff --git a/src/meow.tf/deb-simple/server.go b/src/meow.tf/deb-simple/server.go index 65f00ab..a78c2c9 100644 --- a/src/meow.tf/deb-simple/server.go +++ b/src/meow.tf/deb-simple/server.go @@ -15,7 +15,7 @@ import ( "github.com/go-ini/ini" ) -var VERSION string = "1.3.0" +var VERSION string = "1.3.1" func packageName(name string) string { if index := strings.Index(name, "_"); index != -1 {