-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add git hash as version information via Bazel stamp. (#46)
ansible-puller used to include its git sha as version https://github.com/teslamotors/ansible_puller/blob/e93c507dae6f92fc4ed2ec205a86cf6603ed7467/build-release.sh. This logic was missed out during the migration to Bazel. This PR adds it back to be consistent so that the Prometheus metric can show the current git build hash.
- Loading branch information
Showing
4 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Bazel stamp variable generations | ||
build --workspace_status_command=$(pwd)/ws_status.sh | ||
|
||
# For release | ||
# To use it: bazel COMMAND --config=release | ||
build:release --compilation_mode=opt | ||
build:release --stamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
# Generates the data used by the stamping feature in bazel. | ||
|
||
echo STABLE_GIT_COMMIT "$(git rev-parse HEAD)" |