Skip to content

Commit

Permalink
git: exclude annotated tags when using git-describe (MystenLabs#4951)
Browse files Browse the repository at this point in the history
This forces the output of git-describe to be "commithash[-dirty]".
  • Loading branch information
bmwill authored Oct 3, 2022
1 parent 2f5ae53 commit 720c68e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/sui-rosetta/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
DIR="$( cd "$( dirname "$0" )" && pwd )"
REPO_ROOT="$(git rev-parse --show-toplevel)"
DOCKERFILE="$DIR/Dockerfile"
GIT_REVISION="$(git describe --always --dirty)"
GIT_REVISION="$(git describe --always --dirty --exclude '*')"
BUILD_DATE="$(date -u +'%Y-%m-%d')"

echo
Expand Down
2 changes: 1 addition & 1 deletion crates/sui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{env, process::Command};
fn main() {
if env::var("GIT_REVISION").is_err() {
let output = Command::new("git")
.args(["describe", "--always", "--dirty"])
.args(["describe", "--always", "--dirty", "--exclude", "*"])
.output()
.unwrap();
if !output.status.success() {
Expand Down
2 changes: 1 addition & 1 deletion docker/sui-node/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
DIR="$( cd "$( dirname "$0" )" && pwd )"
REPO_ROOT="$(git rev-parse --show-toplevel)"
DOCKERFILE="$DIR/Dockerfile"
GIT_REVISION="$(git describe --always --dirty)"
GIT_REVISION="$(git describe --always --dirty --exclude '*')"
BUILD_DATE="$(date -u +'%Y-%m-%d')"

# option to build using debug symbols
Expand Down
2 changes: 1 addition & 1 deletion docker/sui-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
DIR="$( cd "$( dirname "$0" )" && pwd )"
REPO_ROOT="$(git rev-parse --show-toplevel)"
DOCKERFILE="$DIR/Dockerfile"
GIT_REVISION="$(git describe --always --dirty)"
GIT_REVISION="$(git describe --always --dirty --exclude '*')"
BUILD_DATE="$(date -u +'%Y-%m-%d')"

echo
Expand Down

0 comments on commit 720c68e

Please sign in to comment.