Merge pull request #197 from harmony-one/version-check

[root] Fix version check on error
pull/198/head
Daniel Van Der Maden 5 years ago committed by GitHub
commit 98e2d9dfb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      Makefile
  2. 2
      cmd/subcommands/root.go

@ -11,6 +11,7 @@ cli := ./dist/hmy
upload-path-darwin := 's3://pub.harmony.one/release/darwin-x86_64/mainnet/hmy'
upload-path-linux := 's3://pub.harmony.one/release/linux-x86_64/mainnet/hmy'
upload-path-linux-version := 's3://pub.harmony.one/release/linux-x86_64/mainnet/hmy_version'
uname := $(shell uname)
env := GO111MODULE=on
@ -44,13 +45,21 @@ test-rpc:
# Notice assumes you have correct uploading credentials
upload-darwin:all
ifeq (${uname}, Darwin)
aws --profile upload s3 cp ./hmy ${upload-path-darwin}
else
@echo "Wrong operating system for target upload"
endif
# Only the linux build will upload the CLI version
upload-linux:static
ifeq (${uname}, Linux)
aws --profile upload s3 cp ./hmy ${upload-path-linux}
./hmy version &> ./hmy_version
aws --profile upload s3 cp ./hmy_version ${upload-path-linux-version}
else
@echo "Wrong operating system for target upload"
endif
.PHONY:clean run-tests upload-darwin upload-linux

@ -159,7 +159,7 @@ var (
VersionWrapDump = ""
cookbook = color.GreenString("hmy cookbook")
versionLink = "https://harmony.one/hmycli_ver"
versionFormat = regexp.MustCompile("v[0-9]+-[0-9]{6}")
versionFormat = regexp.MustCompile("v[0-9]+-[a-z0-9]{6}")
)
// Execute kicks off the hmy CLI

Loading…
Cancel
Save