fix_: pass proper version to params (#5735)
* fix_: pass proper version to params * fix_: use --dirty flag * fix_: delete version_test * fix_: pass proper version to artifacts
This commit is contained in:
parent
ab675a2c99
commit
ef85895f65
2
Makefile
2
Makefile
|
@ -29,7 +29,7 @@ help: SHELL := /bin/sh
|
|||
help: ##@other Show this help
|
||||
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
||||
|
||||
RELEASE_TAG := v$(file < VERSION)
|
||||
RELEASE_TAG:=$(shell ./_assets/scripts/version.sh)
|
||||
RELEASE_DIR := /tmp/release-$(RELEASE_TAG)
|
||||
GOLANGCI_BINARY=golangci-lint
|
||||
IPFS_GATEWAY_URL ?= https://ipfs.status.im/
|
||||
|
|
|
@ -38,7 +38,7 @@ pipeline {
|
|||
GOCACHE = "${WORKSPACE_TMP}/gocache"
|
||||
PATH = "${PATH}:${GOPATH}/bin"
|
||||
REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go"
|
||||
ARTIFACT = utils.pkgFilename(name: "status-go", type: "android", ext: "aar", version: null)
|
||||
ARTIFACT = utils.pkgFilename(name: "status-go", type: "android", ext: "aar", version: sh(script: "./_assets/scripts/version.sh", returnStdout: true))
|
||||
}
|
||||
|
||||
stages {
|
||||
|
|
|
@ -38,7 +38,7 @@ pipeline {
|
|||
GOCACHE = "${WORKSPACE_TMP}/gocache"
|
||||
PATH = "${PATH}:${GOPATH}/bin"
|
||||
REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go"
|
||||
ARTIFACT = utils.pkgFilename(name: "status-go", type: "ios", ext: "zip", version: null)
|
||||
ARTIFACT = utils.pkgFilename(name: "status-go", type: "ios", ext: "zip", version: sh(script: "./_assets/scripts/version.sh", returnStdout: true))
|
||||
/* fix for gomobile complaining about missing packages */
|
||||
CGO_ENABLED = "1"
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ pipeline {
|
|||
GOCACHE = "${WORKSPACE_TMP}/gocache"
|
||||
PATH = "${PATH}:${GOPATH}/bin"
|
||||
REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go"
|
||||
ARTIFACT = utils.pkgFilename(name: "status-go", type: "desktop", ext: "zip", version: null)
|
||||
ARTIFACT = utils.pkgFilename(name: "status-go", type: "desktop", ext: "zip", version: sh(script: "./_assets/scripts/version.sh", returnStdout: true))
|
||||
}
|
||||
|
||||
stages {
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
git describe --tags --dirty="-dirty"
|
|
@ -1,7 +1,7 @@
|
|||
package params
|
||||
|
||||
// Version is defined in VERSION file.
|
||||
// We set it in loadNodeConfig() in api/backend.go.
|
||||
// Version is defined in git tags.
|
||||
// We set it from the Makefile.
|
||||
var Version string
|
||||
|
||||
// GitCommit is a commit hash.
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package params_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestVersionFormat(t *testing.T) {
|
||||
data, err := ioutil.ReadFile(filepath.Join("..", "VERSION"))
|
||||
if err != nil {
|
||||
t.Error("unable to open VERSION file")
|
||||
}
|
||||
matched, _ := regexp.Match(`^\d+\.\d+\.\d+(-[.\w]+)?\n?$`, data)
|
||||
if !matched {
|
||||
t.Error("version in incorrect format")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue