mouse/version.sh
Jochen Maes e2f31a5e75
Some checks failed
continuous-integration/drone/push Build is failing
fixes to version.sh
also reset cargo.toml...
2023-11-01 08:56:36 +01:00

15 lines
363 B
Bash
Executable File

#!/bin/bash
# Get last created tag
LTCOMMIT=$(git rev-list --abbrev-commit --tags --max-count=1)
LTAG=$(git describe --abbrev=0 --tags ${LTCOMMIT} 2>/dev/null || true)
ADC=${DRONE_COMMIT:0:7}
if [[ "${LTCOMMIT}" == "${ADC}" ]]; then
VERSION="${DRONE_TAG##v}"
else
VERSION="${LTAG##v}-next-${ADV}"
fi
sed -i "s/0\\.0\\.0/${VERSION}/" Cargo.toml
cat Cargo.toml