Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bazelbuild/buildtools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.1.1
Choose a base ref
...
head repository: bazelbuild/buildtools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.1.2
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 27, 2023

  1. 1
    Copy the full SHA
    a607619 View commit details
  2. 1
    Copy the full SHA
    b182fc4 View commit details
Showing with 12 additions and 10 deletions.
  1. +8 −7 release/github.sh
  2. +4 −3 status.py
15 changes: 8 additions & 7 deletions release/github.sh
Original file line number Diff line number Diff line change
@@ -8,9 +8,10 @@ then
exit 1
fi

TAG="$(git describe --abbrev=0 --tags | sed 's/* //')"
TAG="$(git describe --abbrev=0 --tags | sed 's/* //')" # v1.2.3
VERSION=$(echo $TAG | sed 's/v//') # 1.2.3
DATE="$(date +"%Y-%m-%d")"
NAME="Release $TAG ($DATE)"
NAME="Release $VERSION ($DATE)"

GH_REPO="repos/bazelbuild/buildtools"
GH_AUTH_HEADER="Authorization: token $GITHUB_ACCESS_TOKEN"
@@ -21,11 +22,11 @@ bazel clean
bazel build --config=release //buildifier:all //buildozer:all //unused_deps:all

for tool in "buildifier" "buildozer" "unused_deps"; do
cp bazel-out/*-opt-*/bin/"$tool/$tool-linux_amd64" $BIN_DIR
cp bazel-out/*-opt-*/bin/"$tool/$tool-linux_arm64" $BIN_DIR
cp bazel-out/*-opt-*/bin/"$tool/$tool-darwin_amd64" $BIN_DIR
cp bazel-out/*-opt-*/bin/"$tool/$tool-darwin_arm64" $BIN_DIR
cp bazel-out/*-opt-*/bin/"$tool/$tool-windows_amd64.exe" $BIN_DIR
cp bazel-bin/"$tool/$tool-linux_amd64" $BIN_DIR
cp bazel-bin/"$tool/$tool-linux_arm64" $BIN_DIR
cp bazel-bin/"$tool/$tool-darwin_amd64" $BIN_DIR
cp bazel-bin/"$tool/$tool-darwin_arm64" $BIN_DIR
cp bazel-bin/"$tool/$tool-windows_amd64.exe" $BIN_DIR
done;

echo "Creating a draft release"
7 changes: 4 additions & 3 deletions status.py
Original file line number Diff line number Diff line change
@@ -15,11 +15,12 @@ def run(*cmd):

def main():
tags = run("git", "describe", "--tags")
print("STABLE_buildVersion", tags.split("-")[0])
version = tags.lstrip('v')
print("STABLE_buildVersion", version)

# rules_nodejs expects to read from volatile-status.txt
print("BUILD_SCM_VERSION", tags.split("-")[0])
print("BUILD_SCM_VERSION", version)

revision = run("git", "rev-parse", "HEAD")
print("STABLE_buildScmRevision", revision)