Skip to content

Commit

Permalink
Add fastlane flow to automate asana steps for release (#2372)
Browse files Browse the repository at this point in the history
  • Loading branch information
CDRussell authored Oct 23, 2022
1 parent 660e4d0 commit 8e43ccb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
releaseNotesFileSuffix = "../app/version/release-notes-suffix"
releaseNotesLocales= ["en-US", "en-GB", "en-CA"]
errorMessageCancelled = "Release cancelled 😢"
asanaBridgeInstallationProblem = "Android Asana Release Bridge not installed or configured correctly - see https://app.asana.com/0/0/1203116937958001/f for instructions"

default_platform(:android)

Expand Down Expand Up @@ -282,4 +283,22 @@ platform :android do
prompt(text: "\nLast release was: #{last_git_tag}\nEnter New Version Number:")
end

desc "Prepares the Asana release board with a new release task, tags tasks waiting for release etc.."
lane :asana_release_prep do
bridgeLocation = ENV["ANDROID_ASANA_BRIDGE"]
if bridgeLocation == nil then
UI.error("#{asanaBridgeInstallationProblem}. Install the tool, then set ANDROID_ASANA_BRIDGE environment variable to point to the directory of the tool.")
elsif !File.exists?(bridgeLocation) then
UI.error("#{asanaBridgeInstallationProblem}. Ensure it is located at #{bridgeLocation} as specified by the environment variable ANDROID_ASANA_BRIDGE")
else
newVersion = determine_version_number()
if UI.confirm("About to create a new release task for #{newVersion}. Ready to continue?")
UI.message("Creating release task...")
sh "#{bridgeLocation}", "version=#{newVersion}", "action=createRelease,tagPendingTasks,addLinksToDescription,removePendingTasks", "board=real"
else
UI.error(errorMessageCancelled)
end
end
end

end
8 changes: 8 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ Start new hotfix

Finish a hotfix in progress

### android asana_release_prep

```sh
[bundle exec] fastlane android asana_release_prep
```

Prepares the Asana release board with a new release task, tags tasks waiting for release etc..

----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
Expand Down

0 comments on commit 8e43ccb

Please sign in to comment.