fix release builds (#1440)
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2af27dc6b3
commit
2c0c0fff24
4
Makefile
4
Makefile
|
@ -2,7 +2,7 @@
|
|||
.PHONY: statusgo-android statusgo-ios
|
||||
|
||||
RELEASE_TAG := $(shell cat VERSION)
|
||||
RELEASE_BRANCH := "develop"
|
||||
RELEASE_BRANCH := develop
|
||||
RELEASE_DIR := /tmp/release-$(RELEASE_TAG)
|
||||
PRE_RELEASE := "1"
|
||||
RELEASE_TYPE := $(shell if [ $(PRE_RELEASE) = "0" ] ; then echo release; else echo pre-release ; fi)
|
||||
|
@ -219,7 +219,7 @@ clean-release:
|
|||
rm -rf $(RELEASE_DIR)
|
||||
|
||||
release:
|
||||
@read -p "Are you sure you want to create a new GitHub $(RELEASE_TYPE} against $(RELEASE_BRANCH) branch? (y/n): " REPLY; \
|
||||
@read -p "Are you sure you want to create a new GitHub $(RELEASE_TYPE) against $(RELEASE_BRANCH) branch? (y/n): " REPLY; \
|
||||
if [ $$REPLY = "y" ]; then \
|
||||
latest_tag=$$(git describe --tags `git rev-list --tags --max-count=1`); \
|
||||
comparison="$$latest_tag..HEAD"; \
|
||||
|
|
|
@ -26,7 +26,7 @@ pipeline {
|
|||
}
|
||||
|
||||
environment {
|
||||
STATUS_PATH = 'src/github.com/status-im/status-go'
|
||||
STATUS_PATH = "${env.WORKSPACE}/src/github.com/status-im/status-go"
|
||||
CI_DIR = "${env.STATUS_PATH}/_assets/ci"
|
||||
GOPATH = "${env.WORKSPACE}"
|
||||
PATH = "${env.PATH}:${env.GOPATH}/bin"
|
||||
|
@ -38,7 +38,7 @@ pipeline {
|
|||
stage('Prep') {
|
||||
steps { script {
|
||||
lib = load("${env.STATUS_PATH}/_assets/ci/lib.groovy")
|
||||
version = readFile("${STATUS_PATH}/VERSION").trim()
|
||||
version = lib.getVersion()
|
||||
println("Version: ${version}")
|
||||
println("Git Branch: ${lib.gitBranch()}")
|
||||
println("Git Commit: ${lib.gitCommit()}")
|
||||
|
@ -86,11 +86,11 @@ pipeline {
|
|||
|
||||
stage('Release') { when { expression { params.RELEASE == true } }
|
||||
steps { script {
|
||||
def suffix = "-"+lib.suffix()
|
||||
/* rename build files to not include versions */
|
||||
dir(env.RELEASE_DIR) {
|
||||
def pkgs = findFiles(glob: 'status-go-*')
|
||||
pkgs.each { pkg ->
|
||||
sh "mv ${pkg.path} ${pkg.path.replace("-"+lib.suffix(), "")}"
|
||||
findFiles(glob: 'status-go-*').each { pkg ->
|
||||
sh "mv ${pkg.path} ${pkg.path.replace(suffix, "")}"
|
||||
}
|
||||
}
|
||||
/* perform the release */
|
||||
|
|
|
@ -33,10 +33,6 @@ def getFilename(path) {
|
|||
return path.tokenize('/')[-1]
|
||||
}
|
||||
|
||||
def getReleaseDir() {
|
||||
return '/tmp/release-' + new File(env.WORKSPACE + '/VERSION').text.trim()
|
||||
}
|
||||
|
||||
def uploadArtifact(path) {
|
||||
/* defaults for upload */
|
||||
def domain = 'ams3.digitaloceanspaces.com'
|
||||
|
|
Loading…
Reference in New Issue