Skip to content

Commit

Permalink
Merge branch 'develop' into release/3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VaiTon committed Nov 19, 2020
2 parents d48250e + 0c41cc7 commit e1d9d97
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 7 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/android-release-sentry.yml
@@ -0,0 +1,41 @@
name: Finalize Sentry release

on:
schedule:
- cron: "0 2 * * *"

jobs:
finalize-sentry-release:
name: Finalize Sentry release
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Decrypt api json file
run: cd ./fastlane/envfiles && ./decrypt_secrets.sh
env:
API_JSON_FILE_DECRYPTKEY: ${{ secrets.API_JSON_FILE_DECRYPTKEY }}
STORE_JKS_DECRYPTKEY: ${{ secrets.STORE_JKS_DECRYPTKEY }}

- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1.1.2
with:
ruby-version: 2.6.x

- name: Install sentry-cli
run: curl -sL https://sentry.io/get-cli/ | bash

- name: Install Dependencies
run: gem install bundler && bundle install

- name: Run Fastlane finalize_sentry lane
run: bundle exec fastlane finalize_sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
CI_RELEASE: true
SIGN_STORE_PATH: ../fastlane/envfiles/keystore.jks
SIGN_STORE_PASSWORD: ${{ secrets.SIGN_STORE_PASSWORD }}
SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }}
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}

9 changes: 9 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,14 @@
This is the Changelog. Please list changes here so that we can provide meaningful changelog for the application stores.

3.5.0
- New: Help collect photos of recycling and packaging information ! Go to the new Environment tab on the complete product page. This will be helpful to compute the new environmental grade Eco-Score.
- New button to take additional photos of the product (useful to get more blue questions)
- Complete fix for Android 7. Sorry about that :-)
- Producers: you can send necessary product information in advance of the launch of the Eco-Score thanks to https://world.pro.openfoodfacts.org

3.4.3
- Dark mode: lighter on your eyes, lighter on your battery

3.3
- Adding or editing a product is now instant in every condition, offline, online or bad connexion.
- You now are properly credited for your answers to blue questions
Expand Down
13 changes: 6 additions & 7 deletions fastlane/Fastfile
Expand Up @@ -16,11 +16,10 @@ lane :release do
PACKAGE_NAME = CredentialsManager::AppfileConfig.try_fetch_value(:package_name)
gradle_file = "./app/build.gradle.kts"

localVersionName = android_get_version_name(gradle_file: gradle_file)
UI.important "Local is v#{localVersionName}"
#fetch versionName from current release branch name
versionName = version_to_use_from_git_branch(gitBranch: git_branch).to_s
UI.important "Using versionName #{versionName}"

#fetch versionName from playstore and bump minor if needed
versionName = play_store_version_to_upload_to(minimumVersionName: localVersionName).to_s
#fetch versionCode from playstore and bump it
versionCode = play_store_version_code_to_upload_to().to_s

Expand Down Expand Up @@ -59,7 +58,7 @@ lane :release do
org_slug: 'openfoodfacts',
project_slug: 'openfoodfacts-android',
version: PACKAGE_NAME + '@' + versionName + '+' + versionCode,
finalize: false # Release will be finalized by the "daily" lane, when the version is in production
finalize: false # Release will be finalized by the "finalize_sentry" lane, when the version is in production
)

sentry_set_commits(
Expand All @@ -72,13 +71,13 @@ lane :release do
end

desc 'Check the version currently in production and mark it as "finalized"'
lane :daily do
lane :finalize_sentry do
PACKAGE_NAME = CredentialsManager::AppfileConfig.try_fetch_value(:package_name)
versionName = google_play_track_version_name(track: 'production')
versionCode = google_play_track_version_codes(track: 'production').max
sentry_finalize_release(
org_slug: 'openfoodfacts',
project_slug: 'openfoodfacts-android',
version: versionName + '+' + versionCode
version: PACKAGE_NAME + '@' + versionName + '+' + versionCode,
)
end
Binary file modified fastlane/metadata/android/en-US/off/images/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/opff/images/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/hi-IN/off/images/featureGraphic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions fastlane/utils.rb
Expand Up @@ -30,4 +30,14 @@ def play_store_version_to_upload_to(minimumVersionName: '0.0.1')
end
}
return versionParsed.to_s
end

def version_to_use_from_git_branch(gitBranch:)
if gitBranch =~ /release\/[0-9]+\.[0-9]+\.[0-9]+/
gitBranchVersion = gitBranch.split('release/')[1]
gitBranchVersionParsed = Versionomy.parse(gitBranchVersion)
puts "Using version name #{gitBranchVersionParsed} (from current branch name #{gitBranch})"
return gitBranchVersionParsed
end
FastlaneCore::UI.user_error!("ERROR: we are not on a release/x.y.z branch, no version could be inferred.")
end

0 comments on commit e1d9d97

Please sign in to comment.