Add comments to STATUS_GO_VERSION to avoid manual editing

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
Pedro Pombeiro 2019-05-02 13:29:10 +02:00
parent 7f9cc1a580
commit f329ca9bdf
No known key found for this signature in database
GPG Key ID: C4A24185B2AA48A1
6 changed files with 27 additions and 12 deletions

View File

@ -1 +1,3 @@
## DO NOT EDIT THIS FILE BY HAND. USE `scripts/update-status-go.sh <tag>` instead
1iixi6f6r3rqb671x3xzki8cibrbhrr312sh32vd13np9hcdwf0w 1iixi6f6r3rqb671x3xzki8cibrbhrr312sh32vd13np9hcdwf0w

View File

@ -1 +1,3 @@
## DO NOT EDIT THIS FILE BY HAND. USE `scripts/update-status-go.sh <tag>` instead
v0.23.0-beta.10 v0.23.0-beta.10

View File

@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
def getStatusGoVersion = { -> def getStatusGoVersion = { ->
version = new File('../STATUS_GO_VERSION').text version = new File('../STATUS_GO_VERSION').text
return version.replaceAll("\\s","") return version.tokenize('\n').last().replaceAll("\\s","")
} }
android { android {

View File

@ -18,6 +18,7 @@ if (WIN32)
file(STRINGS "../../../STATUS_GO_OWNER" STATUS_GO_OWNER) file(STRINGS "../../../STATUS_GO_OWNER" STATUS_GO_OWNER)
file(STRINGS "../../../STATUS_GO_VERSION" STATUS_GO_VERSION) file(STRINGS "../../../STATUS_GO_VERSION" STATUS_GO_VERSION)
list(GET STATUS_GO_VERSION -1 STATUS_GO_VERSION)
if (CUSTOM_STATUSGO_BUILD_DIR_PATH) if (CUSTOM_STATUSGO_BUILD_DIR_PATH)
set(StatusGo_ROOT ${CUSTOM_STATUSGO_BUILD_DIR_PATH}) set(StatusGo_ROOT ${CUSTOM_STATUSGO_BUILD_DIR_PATH})

View File

@ -3,13 +3,14 @@
with stdenv; with stdenv;
let let
extractStatusGoConfig = f: lib.last (lib.splitString "\n" (lib.fileContents f));
gomobile = pkgs.callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit composeXcodeWrapper xcodewrapperArgs; }; gomobile = pkgs.callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit composeXcodeWrapper xcodewrapperArgs; };
version = lib.fileContents ../../STATUS_GO_VERSION; # TODO: Simplify this path search with lib.locateDominatingFile
owner = lib.fileContents ../../STATUS_GO_OWNER; owner = lib.fileContents ../../STATUS_GO_OWNER;
version = extractStatusGoConfig ../../STATUS_GO_VERSION; # TODO: Simplify this path search with lib.locateDominatingFile
sha256 = extractStatusGoConfig ../../STATUS_GO_SHA256;
repo = "status-go"; repo = "status-go";
goPackagePath = "github.com/${owner}/${repo}";
rev = version; rev = version;
sha256 = lib.fileContents ../../STATUS_GO_SHA256; goPackagePath = "github.com/${owner}/${repo}";
mobileConfigs = { mobileConfigs = {
android = { android = {
name = "android"; name = "android";

View File

@ -23,15 +23,24 @@ if [ $# -eq 0 ]; then
exit 1 exit 1
fi fi
STATUSGO_OWNER="$(cat ${GIT_ROOT}/STATUS_GO_OWNER)" STATUS_GO_OWNER="$(cat ${GIT_ROOT}/STATUS_GO_OWNER)"
STATUSGO_VERSION="v${1#"v"}" STATUS_GO_VERSION="v${1#"v"}"
if [ "$STATUSGO_OWNER" == 'status-im' ] && [ "$STATUSGO_VERSION" != "$1" ]; then if [ "$STATUS_GO_OWNER" == 'status-im' ] && [ "$STATUS_GO_VERSION" != "$1" ]; then
echo "status-go release branches should include the v prefix!" echo "status-go release branches should include the v prefix!"
echo "Please create a new branch called $STATUSGO_VERSION" echo "Please create a new branch called $STATUS_GO_VERSION"
exit 1 exit 1
fi fi
STATUSGO_VERSION=$1 STATUS_GO_VERSION=$1
STATUSGO_SHA256=$(nix-prefetch-url --unpack https://github.com/${STATUSGO_OWNER}/status-go/archive/${STATUSGO_VERSION}.zip) STATUS_GO_SHA256=$(nix-prefetch-url --unpack https://github.com/${STATUS_GO_OWNER}/status-go/archive/${STATUS_GO_VERSION}.zip)
echo $STATUSGO_VERSION > ${GIT_ROOT}/STATUS_GO_VERSION
echo $STATUSGO_SHA256 > ${GIT_ROOT}/STATUS_GO_SHA256 cat << EOF > ${GIT_ROOT}/STATUS_GO_VERSION
## DO NOT EDIT THIS FILE BY HAND. USE \`scripts/update-status-go.sh <tag>\` instead
$STATUS_GO_VERSION
EOF
cat << EOF > ${GIT_ROOT}/STATUS_GO_SHA256
## DO NOT EDIT THIS FILE BY HAND. USE \`scripts/update-status-go.sh <tag>\` instead
$STATUS_GO_SHA256
EOF