forked from kolplattformen/skolplattformen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sebastian Palmqvist <[email protected]>
- Loading branch information
1 parent
ebaa2dd
commit 62a4603
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,13 @@ platform :android do | |
# versionNameOverride = "1.9.0" | ||
if versionNameOverride.nil? | ||
releaseNameSemVerArr = google_play_track_release_names(track: 'internal').max.split('.') | ||
puts "releaseNameSemVerArr: #{releaseNameSemVerArr}" | ||
# puts "hello there releaseNameSemVerArr: #{releaseNameSemVerArr}" # ["1 (1", "0)"] | ||
releaseNameSemVerArr[2] = (releaseNameSemVerArr.last.to_i + 1).to_s | ||
# puts "hello there releaseNameSemVerArr[2] #{releaseNameSemVerArr[2]}" # 1 | ||
ENV['VERSION_NAME'] = releaseNameSemVerArr.join('.') | ||
# puts "hello there ENV['VERSION_NAME']: #{ENV['VERSION_NAME']}" # 1 (1.0).1 | ||
ENV['GITTAGNAME'] = ENV['VERSION_NAME'].gsub(/\s+/, '').match(/\((.*?)\)/)[1] + '.' + releaseNameSemVerArr[2] | ||
# puts "hello there new version code: #{gitTagName}" | ||
ENV['SUPPLY_VERSION_NAME'] = ENV['VERSION_NAME'] | ||
versionFile = File.join(Dir.pwd, '..', 'version', 'version.properties').to_s | ||
commandargs = "-n \"VERSION=#{ENV['VERSION_NAME']}\" > #{versionFile}".to_s | ||
|
@@ -36,7 +40,7 @@ platform :android do | |
end | ||
puts "Compiling #{ENV['VERSION_NAME']} (#{ENV['VERSION_CODE']}) " | ||
|
||
|
||
puts "hello there #{ENV['VERSION_NAME'].scan(/\d+(\.\d+)+/).join('.')}" | ||
# Dir.pwd when running through Fastlane is app/android/fastlane | ||
releaseFilePath = File.join(Dir.pwd, '..', 'app', "release.jks") | ||
mappingFilePath = File.join( | ||
|
@@ -95,14 +99,14 @@ platform :android do | |
system('git config user.email "[email protected]"') | ||
system('git config user.name "Github Actions Android Pipeline"') | ||
|
||
gitTagName = releaseNameSemVerArr.join('.').gsub(/[\s()]/, '') | ||
# gitTagName = releaseNameSemVerArr.slice(releaseNameSemVerArr.indexOf("(")+1).replace(")", "") | ||
|
||
add_git_tag( | ||
grouping: "builds", | ||
includes_lane: true, | ||
# prefix: "v#{ENV['VERSION_NAME']}-", | ||
# build_number: ENV['VERSION_CODE'], | ||
tag: gitTagName | ||
tag: "v#{ENV['GITTAGNAME']}" | ||
) | ||
push_to_git_remote( | ||
tags: true | ||
|