Save package version on artifacts

This commit is contained in:
Syrus Akbary 2018-11-13 10:51:04 -08:00
parent e7f7c12485
commit 6e351b7e8e

View File

@ -16,6 +16,8 @@ jobs:
command: | command: |
make release make release
mkdir -p artifacts mkdir -p artifacts
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "${VERSION}" >> artifacts/version
cp ./target/release/wasmer ./artifacts/$(./binary-name.sh) cp ./target/release/wasmer ./artifacts/$(./binary-name.sh)
- persist_to_workspace: - persist_to_workspace:
root: . root: .
@ -47,7 +49,8 @@ jobs:
command: | command: |
# go get github.com/tcnksm/ghr # go get github.com/tcnksm/ghr
# VERSION=$(git log -1 --pretty=%B) # VERSION=$(git log -1 --pretty=%B)
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2) VERSION=$(cat ./artifacts/version)
rm ./artifacts/version
# VERSION=${CIRCLE_TAG} # VERSION=${CIRCLE_TAG}
# VERSION=$(./artifacts/ --version) # VERSION=$(./artifacts/ --version)
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./artifacts/ ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./artifacts/