Skip to content

Commit

Permalink
Merge pull request nextcloud#9118 from nextcloud/fastlane-rename-fix
Browse files Browse the repository at this point in the history
fastlane: Don't use rename command
  • Loading branch information
tobiasKaminsky authored Oct 21, 2021
2 parents 33c6aab + 2a7ebce commit 8f7bfd9
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ end
desc "Release phase 2 for FINAL: checks, tag, upload gplay to playstore with values from build.gradle"
lane :Final_releasePhase2 do |options|
info = androidVersion
promptVersion(info)
checkChangelog(info)
checkLibrary_Final()
checkIfScreenshotsExist()
Expand All @@ -81,13 +82,14 @@ end

desc "Makes gplay and generic releases in ../releases/"
lane :makeReleases do
info = androidVersion
sh("mkdir -p ../release")
sh("rm -rf ../release/*")
sh("rm -rf ../build")

SignedRelease(flavor:"Generic")
sh("mv ../build/outputs/apk/generic/release/*.apk ../release/")
sh("rename 'generic-release' 'nextcloud' ../release/generic-release*")
sh("mv ../release/generic-release-#{info["versionCode"]}.apk ../release/nextcloud-#{info["versionCode"]}.apk")

SignedRelease(flavor:"Gplay")
sh("cp ../build/outputs/apk/gplay/release/*.apk ../release/")
Expand Down Expand Up @@ -166,7 +168,7 @@ private_lane :checkIfAPKexists do |options|
end

desc "compute version"
private_lane :androidVersion do |options|
private_lane :androidVersion do
File.open("../build.gradle","r") do |f|
text = f.read

Expand Down Expand Up @@ -197,19 +199,22 @@ private_lane :androidVersion do |options|
branch = "stable-" + major[1] + "." + minor[1]
end

print "VersionCode: " + versionCode.to_s + "\n"
print "Name: " + name + "\n"
print "Tag: " + tag + "\n"
print "Branch: " + branch + "\n"
print "\ndisable IPv6 to upload to Gplay!!!\n"
{ "versionCode" => versionCode.to_s, "versionName" => name, "tag" => tag, "branch" => branch }
end
end

answer = prompt(text: "is this okay?", boolean: true)
desc "Show versions and prompt for confirmation"
private_lane :promptVersion do |options|
print "VersionCode: " + options["versionCode"].to_s + "\n"
print "Name: " + options["versionName"] + "\n"
print "Tag: " + options["tag"] + "\n"
print "Branch: " + options["branch"] + "\n"
print "\ndisable IPv6 to upload to Gplay!!!\n"

if !answer
exit
end
answer = prompt(text: "is this okay?", boolean: true)

{ "versionCode" => versionCode.to_s, "versionName" => name, "tag" => tag, "branch" => branch }
if !answer
exit
end
end

Expand Down

0 comments on commit 8f7bfd9

Please sign in to comment.