Skip to content

Commit

Permalink
Go back to tagged version
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Jul 31, 2024
1 parent 358890d commit 20d58f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 0 additions & 5 deletions common/src/main/java/com/google/udmi/util/SchemaVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* Formalized enums of the UDMI schema version.
*/
public enum SchemaVersion {
VERSION_1_5_2("1.5.2", 15020),
VERSION_1_5_1("1.5.1", 15010),
VERSION_1_5_0("1.5.0", 15000),
VERSION_1_4_2("1.4.2", 14020),
Expand Down Expand Up @@ -58,8 +57,4 @@ public int value() {
return value;
}

public static void main(String[] args) {
System.out.println(SchemaVersion.CURRENT.key());
}

}
11 changes: 8 additions & 3 deletions etc/shell_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ UDMI_ROOT=$(realpath $UDMI_ROOT)

UDMI_JAR=$UDMI_ROOT/validator/build/libs/validator-1.0-SNAPSHOT-all.jar

udmi_version=
[[ ! -f $UDMI_JAR ]] || udmi_version=$(java -cp $UDMI_JAR com.google.udmi.util.SchemaVersion)
[[ -n $udmi_version ]] || udmi_version=git-$(cd $UDMI_ROOT; git describe --dirty --always) || true
VERSION_BASE='1.*'

# Ignore non-version branches (e.g. something like 'develop')
udmi_version=$(cd $UDMI_ROOT; git describe --dirty --match $VERSION_BASE) || true

# No luck... just generate any viable version.
[[ -n $udmi_version ]] || udmi_version=git-$(cd $UDMI_ROOT; git describe --dirty --match $VERSION_BASE --always) || true

[[ $udmi_version == git- ]] && udmi_version=unknown

export UDMI_ROOT
Expand Down

0 comments on commit 20d58f5

Please sign in to comment.