Skip to content

Commit

Permalink
Merge branch 'release/1.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Apr 13, 2023
2 parents 14d01da + 833f951 commit 227f505
Show file tree
Hide file tree
Showing 57 changed files with 307 additions and 128 deletions.
13 changes: 0 additions & 13 deletions .github/no-response.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/stale.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Configuration for close-stale-issues - https://github.com/marketplace/actions/close-stale-issues

name: 'Close awaiting response issues'
on:
schedule:
- cron: '30 13 * * *'

jobs:
no-response:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-stale: 14
days-before-close: 1
days-before-pr-close: -1
stale-issue-label: 'state:stale'
close-issue-message: "This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further."
only-labels: 'state:awaiting-response'
24 changes: 24 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Configuration for close-stale-issues - https://github.com/marketplace/actions/close-stale-issues

name: 'Close stale issues'
on:
schedule:
- cron: '30 13 * * *'

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-stale: 365
days-before-close: 90
exempt-issue-labels: 'type:security-issue,type:feature-request,type:enhancement,type:upstream-bug,state:awaiting-response,state:blocked,state:confirmed'
exempt-all-milestones: true
stale-issue-label: 'state:stale'
stale-pr-label: 'state:stale'
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down Expand Up @@ -38,8 +38,8 @@ def getVersionCode = { ->
allprojects {
ext {
androidApplicationId = 'org.cryptomator'
androidVersionCode = getVersionCode()
androidVersionName = '1.8.1'
androidVersionCode = 2797 // must be getVersionCode(). only at release tag set the actual value
androidVersionName = '1.9.0'
}
repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions buildsystem/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ RUN apt-get update -y && apt-get install -y apt-utils wget git unzip
RUN apt-get update -y && apt-get install -y $(cat docker/dependencies.txt)
RUN docker/print-versions.sh docker/dependencies.txt

ENV ANDROID_COMMAND_LINE_TOOLS_FILENAME commandlinetools-linux-8512546_latest.zip
ENV ANDROID_COMMAND_LINE_TOOLS_FILENAME commandlinetools-linux-9477386_latest.zip
ENV ANDROID_API_LEVELS android-33
ENV ANDROID_BUILD_TOOLS_VERSION 33.0.0
ENV ANDROID_BUILD_TOOLS_VERSION 33.0.2

ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/cmdline-tools/bin
Expand Down
2 changes: 1 addition & 1 deletion buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ allprojects {
}

ext {
androidBuildToolsVersion = "33.0.0"
androidBuildToolsVersion = "33.0.2"
androidMinSdkVersion = 26
androidTargetSdkVersion = 33
androidCompileSdkVersion = 33
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object X509CertificateHelper {

@Throws(CertificateEncodingException::class)
fun getFingerprintFormatted(certificate: X509Certificate): String {
var hash = String(Hex.encodeHex(DigestUtils.sha1(certificate.encoded))) //
var hash = String(Hex.encodeHex(DigestUtils.sha256(certificate.encoded))) //
.uppercase() //
.replace("(.{2})".toRegex(), "$1:")
hash = hash.substring(0, hash.length - 1)
Expand Down
65 changes: 54 additions & 11 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ version = get_version_name(
ext_constant_name:"androidVersionName")
version = version.delete "'"

release_note_path_en = "metadata/android/en-US/changelogs/default.txt"
playstoreMetadataDir = "../src/playstore/fastlane/metadata/android/"
fdroidMetadataDir = "../src/fdroid/fastlane/metadata/android/"
liteMetadataDir = "../src/lite/fastlane/metadata/android/"
changeLogSubPath = "changelogs/default.txt"

releaseNotePathEn = "release-notes-en.txt"
releaseNotePathDe = "release-notes-de.txt"

platform :android do |options|

Expand All @@ -23,8 +29,9 @@ platform :android do |options|

desc "Deploy new version to Google Play and APK Store options: beta:false (default)"
lane :deploy do |options|
# use english-change-log for french language too
FileUtils.cp(release_note_path_en, "metadata/android/fr-FR/changelogs/default.txt")
checkMetadata(alpha:options[:alpha], beta:options[:beta])

checkVersionCodeSet(alpha:options[:alpha], beta:options[:beta])

deployToPlaystore(alpha:options[:alpha], beta:options[:beta])
deployToServer(alpha:options[:alpha], beta:options[:beta])
Expand All @@ -36,13 +43,45 @@ platform :android do |options|
default_payloads: [], # reduce the notification to the minimum
message: ":rocket: Successfully deployed #{version} with code #{build} :cryptomator:",
payload: {
"Changes" => File.read(release_note_path_en)
"Changes" => File.read(releaseNotePathEn)
}
)
end

desc "Check Metadata"
lane :checkMetadata do |options|
puts "Make sure you run and commited updateMetadata before tagging and releasing!!!"
puts "If check failed, run updateMetadata, commit/tag it and restart when finished"

metadataDirs = [playstoreMetadataDir, fdroidMetadataDir, liteMetadataDir]
for metadataDir in metadataDirs do
sh("diff -s #{releaseNotePathDe} #{metadataDir}de-DE/#{changeLogSubPath} > /dev/null")
sh("diff -s #{releaseNotePathEn} #{metadataDir}en-US/#{changeLogSubPath} > /dev/null")
sh("diff -s #{releaseNotePathEn} #{metadataDir}fr-FR/#{changeLogSubPath} > /dev/null")
end
end

desc "Update Metadata"
lane :updateMetadata do |options|
metadataDirs = [playstoreMetadataDir, fdroidMetadataDir, liteMetadataDir]
for metadataDir in metadataDirs do
FileUtils.cp(releaseNotePathDe, "#{metadataDir}de-DE/#{changeLogSubPath}")
FileUtils.cp(releaseNotePathEn, "#{metadataDir}en-US/#{changeLogSubPath}")
FileUtils.cp(releaseNotePathEn, "#{metadataDir}fr-FR/#{changeLogSubPath}")
end
end

desc "Check if the version code was set"
lane :checkVersionCodeSet do |options|
puts "Make sure you adjusted androidVersionName and set androidVersionCode to #{build} before building and tagging!!!"
puts "If check failed, adjust/commit/tag it and restart when finished"
puts "When merged to develop, set it back to getVersionCode()"

sh("cat ../build.gradle | grep -q 'androidVersionCode = #{build}'")
end

desc "Deploy new version to Play Store"
lane :deployToPlaystore do |options|
private_lane :deployToPlaystore do |options|
deploy_target = "production"

if options[:alpha]
Expand Down Expand Up @@ -81,14 +120,14 @@ platform :android do |options|
skip_upload_metadata: false,
skip_upload_images: true,
skip_upload_screenshots: true,
metadata_path: "fastlane/metadata/android"
metadata_path: playstoreMetadataDir
)

FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_playstore_signed.apk")
end

desc "Deploy new version to server"
lane :deployToServer do |options|
private_lane :deployToServer do |options|
gradle(task: "clean")

gradle(
Expand Down Expand Up @@ -173,7 +212,7 @@ platform :android do |options|
end

desc "Deploy new version to F-Droid"
lane :deployToFDroid do |options|
private_lane :deployToFDroid do |options|
gradle(task: "clean")

gradle(
Expand All @@ -199,7 +238,7 @@ platform :android do |options|

FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "repo/Cryptomator.apk")

sh("cp -r metadata/android/ metadata/org.cryptomator/")
sh("cp -r #{fdroidMetadataDir} metadata/org.cryptomator/")
FileUtils.cp("metadata/org.cryptomator/en-US/changelogs/default.txt", "metadata/org.cryptomator/en-US/changelogs/#{version}.txt")
FileUtils.cp("metadata/org.cryptomator/de-DE/changelogs/default.txt", "metadata/org.cryptomator/de-DE/changelogs/#{version}.txt")
sh("fdroid update && fdroid rewritemeta")
Expand All @@ -222,7 +261,7 @@ platform :android do |options|
end

desc "Deploy new lite version"
lane :deployLite do |options|
private_lane :deployLite do |options|
sh("docker build -t cryptomator-android ../buildsystem")
sh("docker run --rm -u $(id -u):$(id -g) -v $(cd .. && pwd):/project -w /project cryptomator-android ./gradlew clean assembleLiteRelease")

Expand Down Expand Up @@ -307,7 +346,7 @@ platform :android do |options|
fdroid_apk_sha256 = Digest::SHA256.hexdigest File.read "release/Cryptomator-#{version}_fdroid_signed.apk"
lite_sha256 = Digest::SHA256.hexdigest File.read "release/Cryptomator-#{version}_lite_signed.apk"

release_note = "## What's New\n\n" + File.read(release_note_path_en) + "\n\n---\n\nSHA256 Signature: `#{website_apk_sha256}`\nSHA256 Signature fdroid: `#{fdroid_apk_sha256}`\nSHA256 Signature lite: `#{lite_sha256}`\n"
release_note = "## What's New\n\n" + File.read(releaseNotePathEn) + "\n\n---\n\nSHA256 Signature: `#{website_apk_sha256}`\nSHA256 Signature fdroid: `#{fdroid_apk_sha256}`\nSHA256 Signature lite: `#{lite_sha256}`\n"

puts release_note

Expand All @@ -326,6 +365,10 @@ platform :android do |options|

desc "Dry run - check tracking added for all flavors"
lane :dryRun do |options|
checkMetadata(alpha:options[:alpha], beta:options[:beta])

checkVersionCodeSet(alpha:options[:alpha], beta:options[:beta])

gradle(task: "clean")

gradle(
Expand Down
26 changes: 9 additions & 17 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,29 @@ Run all the tests

Deploy new version to Google Play and APK Store options: beta:false (default)

### android deployToPlaystore
### android checkMetadata

```sh
[bundle exec] fastlane android deployToPlaystore
[bundle exec] fastlane android checkMetadata
```

Deploy new version to Play Store
Check Metadata

### android deployToServer
### android updateMetadata

```sh
[bundle exec] fastlane android deployToServer
[bundle exec] fastlane android updateMetadata
```

Deploy new version to server
Update Metadata

### android deployToFDroid
### android checkVersionCodeSet

```sh
[bundle exec] fastlane android deployToFDroid
[bundle exec] fastlane android checkVersionCodeSet
```

Deploy new version to F-Droid

### android deployLite

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

Deploy new lite version
Check if the version code was set

### android checkTrackingAddedInDependencyUsingIzzyScript

Expand Down
2 changes: 1 addition & 1 deletion fastlane/izzyscript/result_apkstore.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fastlane/izzyscript/result_fdroid.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fastlane/izzyscript/result_lite.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fastlane/izzyscript/result_playstore.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion fastlane/metadata/android/de-DE/changelogs/default.txt

This file was deleted.

1 change: 0 additions & 1 deletion fastlane/metadata/android/en-US/changelogs/default.txt

This file was deleted.

4 changes: 0 additions & 4 deletions fastlane/metadata/android/fr-FR/changelogs/.gitignore

This file was deleted.

3 changes: 3 additions & 0 deletions fastlane/release-notes-de.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Anpassungen zur Integration in das F-Droid Haupt-Repository abgeschlossen
- SHA-256 Fingerabdruck eines ungültigen WebDAV TLS Zertifikats wird angezeigt
- Übersetzungen aktualisiert
3 changes: 3 additions & 0 deletions fastlane/release-notes-en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Completed customizations for integration into the F-Droid main repository
- Show SHA-256 fingerprint of an invalid WebDAV TLS certificate
- Update translations
4 changes: 3 additions & 1 deletion fastlane/release-notes.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<ul>
<li>Fixed storage and notification permissions issue on Android version 13</li>
<li>Completed customizations for integration into the F-Droid main repository</li>
<li>Show SHA-256 fingerprint of an invalid WebDAV TLS certificate</li>
<li>Update translations</li>
</ul>
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 227f505

Please sign in to comment.