From f3c284aaaba48d72af0d260725f2b29c1c41382a Mon Sep 17 00:00:00 2001 From: Quentin MACHU Date: Wed, 30 Aug 2017 19:25:23 -0700 Subject: [PATCH 1/3] git-version: actually prefix version with the tag if existing (#967) --- git-version | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-version b/git-version index b74c8ce5f7..5e796c4e41 100755 --- a/git-version +++ b/git-version @@ -8,8 +8,8 @@ VERSION=$(git rev-parse HEAD) # check if the current commit has a matching tag, # and prepend the matching tag to the version, if available. TAG=$(git describe --exact-match --abbrev=0 --tags ${VERSION} 2> /dev/null || true) -if [ -z "$TAG" ]; then - VERSION=$TAG_$VERSION +if [ ! -z "$TAG" ]; then + VERSION=${TAG}_${VERSION} fi # check for changed files (not untracked files) From 894276f24ad064a89f64371983c6794d90717399 Mon Sep 17 00:00:00 2001 From: Quentin MACHU Date: Wed, 30 Aug 2017 19:29:28 -0700 Subject: [PATCH 2/3] installer/scripts/release/common.env.sh: get version from env or default (#1613) Fixes the release job by letting it provide the version (instead of having TAG_VERSION, we just use TAG for releases) --- installer/scripts/release/common.env.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/installer/scripts/release/common.env.sh b/installer/scripts/release/common.env.sh index 7004d045cd..adad6c0829 100644 --- a/installer/scripts/release/common.env.sh +++ b/installer/scripts/release/common.env.sh @@ -6,8 +6,7 @@ REPOSITORY_ROOT="$ROOT/.." WORKSPACE_DIR="$ROOT/.workspace" TMP_DIR="$WORKSPACE_DIR/tmpdir" -VERSION=$("$REPOSITORY_ROOT/git-version") -export VERSION +export VERSION=${VERSION:-$("$REPOSITORY_ROOT/git-version")} export TECTONIC_RELEASE_BUCKET=releases.tectonic.com export TECTONIC_BINARY_BUCKET=tectonic-release From 632b475e7c0e1030d47c995c51dd8604cc844c5b Mon Sep 17 00:00:00 2001 From: Quentin MACHU Date: Wed, 30 Aug 2017 19:32:30 -0700 Subject: [PATCH 3/3] installer/scripts/release/make_github_release.sh: add name to the release Avoids having a unreadable name for the release, forcing the release manager to modify it after the fact --- installer/scripts/release/make_github_release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/scripts/release/make_github_release.sh b/installer/scripts/release/make_github_release.sh index 0ab564cb14..e315872951 100755 --- a/installer/scripts/release/make_github_release.sh +++ b/installer/scripts/release/make_github_release.sh @@ -13,10 +13,10 @@ source "$DIR/common.env.sh" GITHUB_API_URL="https://api.github.com/repos/coreos/tectonic-installer/releases" # shellcheck disable=SC2028 -echo "Creating new release on GitHub ${#GITHUB_CREDENTIALS} \n\n {\"tag_name\":\"$VERSION\",\"prerelease\":$PRE_RELEASE,\"body\":\"Release tarball is available at $TECTONIC_RELEASE_TARBALL_URL.\"}" +echo "Creating new release on GitHub ${#GITHUB_CREDENTIALS} \n\n {\"tag_name\":\"$VERSION\", \"name\": \"$VERSION\", \"prerelease\":$PRE_RELEASE,\"body\":\"Release tarball is available at $TECTONIC_RELEASE_TARBALL_URL.\"}" curl \ --fail \ -u "$GITHUB_CREDENTIALS" \ -H "Content-Type: application/json" \ - -d "{\"tag_name\":\"$VERSION\",\"prerelease\":$PRE_RELEASE,\"body\":\"Release tarball is available at $TECTONIC_RELEASE_TARBALL_URL.\"}" \ + -d "{\"tag_name\":\"$VERSION\",\"name\": \"$VERSION\",\"prerelease\":$PRE_RELEASE,\"body\":\"Release tarball is available at $TECTONIC_RELEASE_TARBALL_URL.\"}" \ $GITHUB_API_URL