mouse/version.sh
Jochen Maes 6f7ea17a43
All checks were successful
continuous-integration/drone/push Build is passing
Adds system gatherer, and ...
fixes version.sh for the ADC version
fixes .drone.yml for some reason it installed the gitea apk instead of the git. (typo)
2023-11-01 10:30:46 +01:00

16 lines
370 B
Bash
Executable File

#!/bin/bash
set -x
# 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-${ADC}"
fi
sed -i "s/0\\.0\\.0/${VERSION}/" Cargo.toml
cat Cargo.toml