mirror of
https://github.com/bitwarden/android.git
synced 2025-12-12 00:08:00 -06:00
[PM-8985] Fetch all tags when checking out repo for build job (#3371)
This commit is contained in:
parent
0f838965fb
commit
82e2c82666
@ -126,9 +126,11 @@ platform :android do
|
|||||||
currentVersionName = buildConfigText.match(/versionName = "(.+)"/).captures[0]
|
currentVersionName = buildConfigText.match(/versionName = "(.+)"/).captures[0]
|
||||||
|
|
||||||
if options[:versionName].nil? or options[:versionName].to_s.empty?
|
if options[:versionName].nil? or options[:versionName].to_s.empty?
|
||||||
|
puts "Fetching latest tags from origin..."
|
||||||
|
`git fetch --prune --no-recurse-submodules --filter=tree:0 --depth=1 --tags origin`
|
||||||
puts "Getting latest version name from previous git tag..."
|
puts "Getting latest version name from previous git tag..."
|
||||||
latestTag = `git tag --sort=committerdate --list | tail -1`
|
latestTag = `git describe --tags $(git rev-list --tags --max-count=1)`.chomp()
|
||||||
puts "Using previous tag (#{latestTag}) to calculate version name..."
|
puts "Using tag #{latestTag} to calculate version name..."
|
||||||
latestTag.slice!(0)
|
latestTag.slice!(0)
|
||||||
puts "Current version name resolved to #{latestTag}."
|
puts "Current version name resolved to #{latestTag}."
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user