خرید بک لینک

Vote count: 0

Trying to figure out a way to increment a tag that I need to delete automatically via the CI build so that it is up to date.

Roughly, compile the code, then it gets tagged. Then it commits. Obviously would be easier to have it correct the first time but not an option to fix at current time. Found this and looks promising:

# Get new tags from remote
git fetch --tags

# Get latest tag name
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)

But is there a way to

# Checkout latest tag
git tag -d $latestTag

And then have it increment by one. So if it was v1.0.1 it would then be v1.0.2?

latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
git tag -a $latestTag ++1 -m "Release $latestTag ++1"

asked 28 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 11 تير 1395 ساعت: 2:28

صفحه بندی