- if [ "$LDK_GARBAGECOLLECTED_GIT_OVERRIDE" = "" ]; then
- export LDK_GARBAGECOLLECTED_GIT_OVERRIDE=$(git describe --tag --dirty)
- fi
- if [ "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:0:1}" != "v" ]; then
- echo "Version tag should start with a v" > /dev/stderr
- exit 1
- fi
-
- if [ "$(rustc --version --verbose | grep "host:")" = "host: x86_64-apple-darwin" ]; then
- # OSX sed is for some reason not compatible with GNU sed
- sed -i '' "s/^ <version>.*<\/version>/ <version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml
- else