Skip to content

Commit

Permalink
6.4.2 (#1160)
Browse files Browse the repository at this point in the history
- Add setting to configure if file transfers should show up in Files App
- Add setting to send images as original
- Improve Onboarding texts
- Fix flickering of intro screens
- Improve handling of xmpp: URIs
- Several other bugfixes
  • Loading branch information
tmolitor-stud-tu committed Aug 1, 2024
2 parents bf715e0 + 8e71aaf commit d9d6506
Show file tree
Hide file tree
Showing 51 changed files with 1,044 additions and 446 deletions.
63 changes: 58 additions & 5 deletions .github/workflows/beta.build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: git submodule update -f --init --remote
- name: Get last build tag and increment it
run: |
oldBuildNumber=$(git tag --sort="v:refname" |grep "Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
oldBuildNumber=$(git tag --sort="v:refname" | grep "Build_iOS" | grep -v "Quicksy_Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
buildNumber=$(expr $oldBuildNumber + 1)
echo "New buildNumber is $buildNumber"
git tag Build_iOS_$buildNumber
Expand All @@ -64,7 +64,7 @@ jobs:
printf("\n")
}'
}
buildNumber="$(git tag --sort="v:refname" | grep "Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')"
buildNumber="$(git tag --sort="v:refname" | grep "Build_iOS" | grep -v "Quicksy_Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')"
version="$(git log -n 1 --merges --pretty=format:%s | sed -E 's/^[\t\n ]*([^\n\t ]+)[\t\n ]+\(([^\n\t ]+)\)[\t\n ]*$/\1/g')"
mkdir -p /Users/ci/releases
OUTPUT_FILE="/Users/ci/releases/$buildNumber.output"
Expand Down Expand Up @@ -124,14 +124,65 @@ jobs:
run: xcrun altool --validate-app --file ./Monal/build/ipa/Monal.ipa --type ios --asc-provider S8D843U34Y -u "$(cat /Users/ci/apple_connect_upload_mail.txt)" -p "$(cat /Users/ci/apple_connect_upload_secret.txt)"
- name: Push beta tag to repo
run: |
buildNumber=$(git tag --sort="v:refname" | grep "Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
buildNumber=$(git tag --sort="v:refname" | grep "Build_iOS" | grep -v "Quicksy_Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
git push origin Build_iOS_$buildNumber
# - name: Create fastlane whatsNew hash in environment
# id: buildinfo
# env:
# CHANGELOG_IOS: ${{ steps.releasenotes.outputs.notes_ios }}
# CHANGELOG_MACOS: ${{ steps.releasenotes.outputs.notes_macos }}
# run: |
# get_changelog() {
# local escaped=$(printf '%s\n' "$1" | jq -sRr @json)
# local json="{\"default\": {\"whats_new\": $escaped},"
# # for dir in ./appstore_metadata/*/; do
# # dir="$(basename "$dir")"
# # if [[ -d "./appstore_metadata/$dir" ]]; then
# # json="$json\"${dir%/}\": {\"whats_new\": $escaped},"
# # fi
# # done
# json="${json%,}}"
# echo "$json"
# }
# echo "buildinfo_ios<<__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
# echo "$(get_changelog "$CHANGELOG_IOS")" | tee /dev/stderr >> "$GITHUB_OUTPUT"
# echo "__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
#
# echo "buildinfo_macos<<__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
# echo "$(get_changelog "$CHANGELOG_MACOS")" | tee /dev/stderr >> "$GITHUB_OUTPUT"
# echo "__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
- name: Create fastlane localized_app_info hash in environment
id: appinfo
run: |
build_appinfo_entry() {
local escaped_marketing_url=$(cat ./appstore_metadata/$1/marketing_url.txt | jq -sRr @json)
local escaped_privacy_policy_url=$(cat ./appstore_metadata/$1/privacy_url.txt | jq -sRr @json)
local escaped_description=$(cat ./appstore_metadata/$1/description.txt | jq -sRr @json)
local json="{\"feedback_email\": \"[email protected]\", \"marketing_url\": $escaped_marketing_url, \"privacy_policy_url\": $escaped_privacy_policy_url, \"description\": $escaped_description}"
echo "$json"
}
json="{"
json="$json\"default\": $(build_appinfo_entry),"
for dir in ./appstore_metadata/*/; do
dir="$(basename "$dir")"
if [[ -d "./appstore_metadata/$dir" ]]; then
json="$json\"${dir%/}\": $(build_appinfo_entry "${dir%/}"),"
fi
done
json="${json%,}}"
echo "appinfo<<__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "$json" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
- name: Publish ios to appstore connect
#run: xcrun altool --upload-app -f ./Monal/build/ipa/Monal.ipa --type ios --asc-provider S8D843U34Y --team-id S8D843U34Y -u "$(cat /Users/ci/apple_connect_upload_mail.txt)" -p "$(cat /Users/ci/apple_connect_upload_secret.txt)"
env:
#PILOT_LOCALIZED_BUILD_INFO: ${{ steps.buildinfo.outputs.buildinfo_ios }}
PILOT_LOCALIZED_APP_INFO: ${{ steps.appinfo.outputs.appinfo }}
PILOT_CHANGELOG: ${{ steps.releasenotes.outputs.notes_ios }}
run: |
fastlane run upload_to_testflight api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" ipa:"./Monal/build/ipa/Monal.ipa" distribute_external:true groups:"Internal Pre-Beta Testers","Public Beta" reject_build_waiting_for_review:true submit_beta_review:true
fastlane run upload_to_testflight api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" ipa:"./Monal/build/ipa/Monal.ipa" distribute_external:true notify_external_testers:true groups:"Internal Pre-Beta Testers","Public Beta" reject_build_waiting_for_review:true submit_beta_review:true
- name: Notarize catalyst
run: xcrun notarytool submit ./Monal/build/app/Monal.zip --wait --team-id S8D843U34Y --key "/Users/ci/appstoreconnect/apiKey.p8" --key-id "$(cat /Users/ci/appstoreconnect/apiKeyId.txt)" --issuer "$(cat /Users/ci/appstoreconnect/apiIssuerId.txt)"
- name: staple
Expand All @@ -156,9 +207,11 @@ jobs:
- name: Publish catalyst to appstore connect
#run: xcrun altool --upload-app --file ./Monal/build/app/Monal.pkg --type macos --asc-provider S8D843U34Y -u "$(cat /Users/ci/apple_connect_upload_mail.txt)" -p "$(cat /Users/ci/apple_connect_upload_secret.txt)" --primary-bundle-id org.monal-im.prod.catalyst.monal
env:
#PILOT_LOCALIZED_BUILD_INFO: ${{ steps.buildinfo.outputs.buildinfo_macos }}
PILOT_LOCALIZED_APP_INFO: ${{ steps.appinfo.outputs.appinfo }}
PILOT_CHANGELOG: ${{ steps.releasenotes.outputs.notes_macos }}
run: |
fastlane run upload_to_testflight api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" pkg:"./Monal/build/app/Monal.pkg" distribute_external:true groups:"Internal Pre-Beta Testers","Public Beta" reject_build_waiting_for_review:true submit_beta_review:true
fastlane run upload_to_testflight api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" pkg:"./Monal/build/app/Monal.pkg" distribute_external:true notify_external_testers:true groups:"Internal Pre-Beta Testers","Public Beta" reject_build_waiting_for_review:true submit_beta_review:true
- name: Release
uses: softprops/action-gh-release@v2
with:
Expand Down
122 changes: 122 additions & 0 deletions .github/workflows/create-stable-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Create Pull Request from Beta to Stable

on:
push:
branches: [ beta ]
workflow_dispatch:

jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout Beta Branch
uses: actions/checkout@v4
with:
clean: true
submodules: true
fetch-depth: 100
fetch-tags: true
show-progress: true
lfs: true
ref: beta
- name: Checkout Stable Branch
run: |
git fetch --all
git checkout stable
git branch
- name: Get Merge Commits from Beta not in Stable
id: get_commits
run: |
function repairNotes {
sed 's/\r//g' | awk '{
if (NR == 1) {
printf("%s", $0)
} else {
if ($0 ~ /^[\t ]*(-|IOS_ONLY[\t ]*-|MACOS_ONLY[\t ]*-).*$/) {
printf("\n%s", $0)
} else {
printf(" %s", $0)
}
}
}
END {
printf("\n")
}'
}
echo "Extracting merge commit texts..."
version="$(git log beta -n 1 --merges --pretty=format:%s | sed -E 's/^[\t\n ]*([^\n\t ]+)[\t\n ]+\(([^\n\t ]+)\)[\t\n ]*$/\1/g')"
echo "version=$version" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "buildVersion=$(echo "$version" | grep -oE '^[0-9]+(\.[0-9]+){0,2}')" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "description<<__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "$(git log stable..beta --merges --pretty=format:%b)" | repairNotes | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
- name: Find Existing Pull Request
id: find_pr
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
const { data: pullRequests } = await github.rest.pulls.list({
owner,
repo,
state: 'open',
head: 'beta',
base: 'stable'
});
const existingPR = pullRequests.find(pr => pr.labels.some(label => label.name === 'automated-pr'));
console.log(`Existing PR: `, existingPR);
if(existingPR)
return existingPR.number;
else
return null;
- name: Create or Update Pull Request
id: create_or_update_pr
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
const prNumber = ${{ steps.find_pr.outputs.result }};
let pullRequest;
if(prNumber)
{
console.log(`Updating old PR #${prNumber}...`);
pullRequest = await github.rest.pulls.update({
owner,
repo,
pull_number: prNumber,
title: `${{ steps.get_commits.outputs.buildVersion }}`,
body: `${{ steps.get_commits.outputs.description }}`,
});
console.log(`Updated pull request #${prNumber}`);
}
else
{
console.log(`Creating new PR...`);
pullRequest = await github.rest.pulls.create({
owner,
repo,
head: 'beta',
base: 'stable',
draft: true,
title: `${{ steps.get_commits.outputs.buildVersion }}`,
body: `${{ steps.get_commits.outputs.description }}`,
});
console.log(`Created pull request #${pullRequest.data.number}`);
}
return pullRequest.data.number;
- name: Add Label to Pull Request
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
const pullNumber = ${{ steps.create_or_update_pr.outputs.result }};
await github.rest.issues.addLabels({
owner,
repo,
issue_number: pullNumber,
labels: ['automated-pr']
});
console.log(`Added label to pull request #${pullNumber}`);
51 changes: 1 addition & 50 deletions .github/workflows/publish-quicksy-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish Quicksy release
on:
repository_dispatch:
types: [distribution]
types: [quicksy_release]
jobs:
extractChangelog:
runs-on: self-hosted
Expand All @@ -28,52 +28,3 @@ jobs:
touch "$OUTPUT_FILE"
cat "$OUTPUT_FILE" >> "$GITHUB_OUTPUT"
# notifyMuc:
# name: Notify support MUC about new stable release
# runs-on: ubuntu-latest
# needs: [extractChangelog]
# steps:
# - name: Notify support MUC
# uses: monal-im/xmpp-notifier@master
# with: # Set the secrets as inputs
# jid: ${{ secrets.BOT_JID }}
# password: ${{ secrets.BOT_PASSWORD }}
# server_host: ${{ secrets.BOT_SERVER }}
# recipient: [email protected]
# recipient_is_room: true
# bot_alias: "Monal Release Bot"
# message: |
# ${{ needs.extractChangelog.outputs.release-name }} was released:
# ${{ needs.extractChangelog.outputs.release-notes }}
#
# notifyMastodon:
# name: Post release info on mastodon
# runs-on: ubuntu-latest
# needs: [extractChangelog]
# steps:
# - name: Patch changelog length
# id: changelog
# env:
# NOTES: ${{ needs.extractChangelog.outputs.release-notes }}
# run: |
# if [ "${#NOTES}" -gt 400 ]; then
# NOTES="To see the complete list of bugfixes and improvements, check our releases page: https://github.com/monal-im/Monal/releases/tag/${{ needs.extractChangelog.outputs.release-tag }}"
# fi
# echo "notes<<__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
# echo "$NOTES" >> "$GITHUB_OUTPUT"
# echo "__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
# - name: Post release info on mastodon
# id: toot
# uses: cbrgm/[email protected]
# with:
# access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
# url: ${{ secrets.MASTODON_URL }}
#
# message: "${{ needs.extractChangelog.outputs.release-name }} released.\n\n${{ steps.changelog.outputs.notes }}\n\n#Monal #quicksy #ios #macos #xmpp #im #chat #messaging"
# visibility: "public"
# language: "en"
# - name: Get toot information
# run: |
# echo "Toot ID: ${{ steps.toot.outputs.id }}"
# echo "Toot URL: ${{ steps.toot.outputs.url }}"
# echo "Scheduled at: ${{ steps.toot.outputs.scheduled_at }}"
7 changes: 4 additions & 3 deletions .github/workflows/publish-stable-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish release
on:
repository_dispatch:
types: [distribution]
types: [monal_release]
jobs:
extractChangelog:
runs-on: self-hosted
Expand All @@ -13,6 +13,7 @@ jobs:
release-notes: ${{ steps.releasenotes.outputs.notes }}
release-notes_ios: ${{ steps.releasenotes.outputs.notes_ios }}
release-notes_macos: ${{ steps.releasenotes.outputs.notes_macos }}
release-id: ${{ steps.releasenotes.outputs.releaseID }}
# create release only if the ios app made it to the appstore and ignore the macos appstore state
if: github.event.client_payload.Platform == 'iOS'
steps:
Expand All @@ -36,13 +37,13 @@ jobs:
steps:
- name: Promote draft release to live release
run: |
echo "ID: ${{ steps.releasenotes.outputs.releaseID }}"
echo "ID: ${{ needs.extractChangelog.outputs.release-id }}"
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${{ github.repository }}/releases/${{ steps.draftrelease.outputs.id }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/${{ needs.extractChangelog.outputs.release-id }}" \
-d '{"draft": false, "prerelease": false, "make_latest": true}'
notifyMuc:
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/quicksy.build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: git submodule update -f --init --remote
- name: Get last build tag and increment it
run: |
oldBuildNumber=$(git tag --sort="v:refname" |grep "Quicksy_Build_iOS" | tail -n1 | sed 's/Quicksy_Build_iOS_//g')
oldBuildNumber=$(git tag --sort="v:refname" | grep "Quicksy_Build_iOS" | tail -n1 | sed 's/Quicksy_Build_iOS_//g')
buildNumber=$(expr $oldBuildNumber + 1)
echo "New buildNumber is $buildNumber"
git tag Quicksy_Build_iOS_$buildNumber
Expand All @@ -58,15 +58,16 @@ jobs:
printf("\n")
}'
}
buildNumber="$(git tag --sort="v:refname" | grep "Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')"
buildNumber="$(git tag --sort="v:refname" | grep "Quicksy_Build_iOS" | tail -n1 | sed 's/Quicksy_Build_iOS_//g')"
version="$(git log -n 1 --merges --pretty=format:%s | sed -E 's/^[\t\n ]*([^\n\t ]+)[\t\n ]+\(([^\n\t ]+)\)[\t\n ]*$/\1/g')"
version="6.4.2"
mkdir -p /Users/ci/releases
OUTPUT_FILE="/Users/ci/releases/$buildNumber.output"
touch "$OUTPUT_FILE"
echo "OUTPUT_FILE=$OUTPUT_FILE" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "buildNumber=$buildNumber" | tee /dev/stderr >> "$OUTPUT_FILE"
echo "tag=Build_iOS_$buildNumber" | tee /dev/stderr >> "$OUTPUT_FILE"
echo "tag=Quicksy_Build_iOS_$buildNumber" | tee /dev/stderr >> "$OUTPUT_FILE"
echo "version=$version" | tee /dev/stderr >> "$OUTPUT_FILE"
echo "buildVersion=$(echo "$version" | grep -oE '^[0-9]+(\.[0-9]+){0,2}')" | tee /dev/stderr >> "$OUTPUT_FILE"
Expand Down Expand Up @@ -114,21 +115,28 @@ jobs:
- name: push tag to stable repo
run: |
buildNumber=$(git tag --sort="v:refname" | grep "Quicksy_Build_iOS" | tail -n1 | sed 's/Quicksy_Build_iOS_//g')
git push origin Build_iOS_$buildNumber
git push origin Quicksy_Build_iOS_$buildNumber
- name: Create fastlane metadata directory
id: metadata
env:
CHANGELOG: ${{ steps.releasenotes.outputs.notes_ios }}
run: |
path="$(mktemp -d)"
echo -n "$CHANGELOG" > "$path/release_notes.txt"
echo "path=$path" | tee /dev/stderr >> "$GITHUB_OUTPUT"
path_ios="$(mktemp -d)"
cp -av ./appstore_quicksy_metadata/* "$path_ios"
echo -n "$(date +%Y) Thilo Molitor" > "$path_ios/copyright.txt"
for dir in ./appstore_quicksy_metadata/*/; do
dir="$(basename "$dir")"
if [[ -d "./appstore_quicksy_metadata/$dir" ]]; then
echo -n "$CHANGELOG_IOS" > "$path_ios/${dir%/}/release_notes.txt"
fi
done
echo "path_ios=$path_ios" | tee /dev/stderr >> "$GITHUB_OUTPUT"
- name: Publish ios to appstore connect
#run: xcrun altool --upload-app --file ./Monal/build/ipa/Monal.ipa --type ios --asc-provider S8D843U34Y --team-id S8D843U34Y -u $(cat /Users/ci/apple_connect_upload_mail.txt) -p "$(cat /Users/ci/apple_connect_upload_secret.txt)"
env:
DELIVER_METADATA_PATH: ${{ steps.metadata.outputs.path }}
DELIVER_METADATA_PATH: ${{ steps.metadata.outputs.path_ios }}
run: |
fastlane run upload_to_app_store api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" ipa:"./Monal/build/ipa/Monal.ipa" app_version:"${{ steps.releasenotes.outputs.version }}" reject_if_possible:true submit_for_review:false automatic_release:false skip_metadata: true skip_screenshots: true
fastlane run upload_to_app_store api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" ipa:"./Monal/build/ipa/Monal.ipa" app_version:"${{ steps.releasenotes.outputs.version }}" platform:ios reject_if_possible:true submit_for_review:true automatic_release:true skip_metadata:false skip_screenshots:true precheck_include_in_app_purchases:false version_check_wait_retry_limit:10 force:true
- name: Remove fastlane metadata directory
run: |
rm -rf "${{ steps.metadata.outputs.path }}"
Loading

0 comments on commit d9d6506

Please sign in to comment.