BaseBandRewrite/scripts/gen_hash.sh
TudbuT 9b78244271
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m39s
/ Build BaseBand Server (push) Successful in 1m40s
add loader updating, fix branches
2024-06-12 14:30:47 +02:00

16 lines
No EOL
548 B
Bash

#!/bin/bash
COMMIT="$(git describe --always)"
echo "package de.com.baseband.client.util.data;" > Client/src/main/java/de/com/baseband/client/util/data/GitHash.java
echo "package de.com.baseband.launcher.util;" > Loader/src/main/java/de/com/baseband/launcher/util/GitHash.java
(cat | tee -a Client/src/main/java/de/com/baseband/client/util/data/GitHash.java Loader/src/main/java/de/com/baseband/launcher/util/GitHash.java) << EOF
public class GitHash {
public static final String GIT_HASH = "$COMMIT";
}
EOF
echo "$COMMIT" > loader.version