Skip to content

Commit

Permalink
Merge release 2.34 into trunk (#1695)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio authored Sep 20, 2024
2 parents a7dba55 + 1030049 commit f0c98fa
Show file tree
Hide file tree
Showing 32 changed files with 291 additions and 133 deletions.
24 changes: 24 additions & 0 deletions .buildkite/release-pipelines/finalize-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

steps:
- label: Finalize Release
plugins: [$CI_TOOLKIT_PLUGIN]
command: |
echo '--- :robot_face: Use bot for git operations'
source use-bot-for-git wpmobilebot
echo '--- :git: Checkout Release Branch'
.buildkite/commands/checkout-release-branch.sh
echo '--- :ruby: Set up Ruby Tools'
install_gems
echo '--- :shipit: Finalize Release'
bundle exec fastlane finalize_release skip_confirm:true
agents:
queue: tumblr-metal
retry:
manual:
# If those jobs fail, one should always prefer re-triggering a new build from ReleaseV2 rather than retrying the individual job from Buildkite
allowed: false
24 changes: 24 additions & 0 deletions .buildkite/release-pipelines/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

steps:
- label: Publish Release
plugins: [$CI_TOOLKIT_plugin]
command: |
echo '--- :robot_face: Use bot for git operations'
source use-bot-for-git wpmobilebot
echo '--- :git: Checkout Release Branch'
.buildkite/commands/checkout-release-branch.sh
echo '--- :ruby: Setup Ruby Tools'
install_gems
echo '--- :package: Publish Release'
bundle exec fastlane publish_release skip_confirm:true
agents:
queue: tumblr-metal
retry:
manual:
# If those jobs fail, one should always prefer re-triggering a new build from ReleaseV2 rather than retrying the individual job from Buildkite
allowed: false
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ package com.automattic.simplenote.authentication

import android.app.Activity
import android.content.Intent
import android.graphics.Color
import android.net.Uri
import android.os.Bundle
import android.text.Html
import android.text.method.LinkMovementMethod
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.EditText
import android.widget.TextView
import android.widget.Toast
import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.content.ContextCompat
import androidx.fragment.app.viewModels
import com.automattic.simplenote.R
import com.automattic.simplenote.Simplenote
Expand Down Expand Up @@ -101,6 +106,20 @@ class SignInFragment: MagicLinkableFragment() {
"wpcc_button_press_signin_activity"
)
}
val manualLoginTextView = view.findViewById<TextView>(R.id.sign_in_login_manually)
context?.let {
val colorLink = Integer.toHexString(ContextCompat.getColor(it, R.color.text_link) and 16777215)
manualLoginTextView.text = Html.fromHtml(
String.format(
getString(R.string.signin_login_with_email_manually),
"<span style=\"color:#", colorLink, "\">", "</span>"
)
)
}
manualLoginTextView.setOnClickListener {
val email = getEmailEditText()
showLoginWithPassword(activity, email?.text?.toString())
}
return view
}

Expand Down Expand Up @@ -154,6 +173,8 @@ class SignInFragment: MagicLinkableFragment() {
}

companion object {
const val LOGIN_MANUALLY_SUBSTRING = "log in manually"

fun showLoginWithPassword(activity: Activity?, username: String?) {
activity?.let { act ->
val intent = Intent(act, NewCredentialsActivity::class.java)
Expand Down
17 changes: 16 additions & 1 deletion Simplenote/src/main/res/layout/fragment_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,22 @@
android:textAllCaps="true"
android:textColor="@android:color/white" />

<include layout="@layout/authentication_fancy_or" />
<TextView
android:id="@+id/sign_in_login_manually"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="@string/signin_login_with_email_manually"
android:layout_below="@id/button"
android:textSize="15sp"
android:gravity="center_horizontal"
android:layout_marginVertical="10dp"/>

<include layout="@layout/authentication_fancy_or"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/sign_in_login_manually"
android:layout_marginVertical="10dp"
/>

<com.google.android.material.button.MaterialButton
android:id="@+id/button_login_with_wordpress"
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 09:54:03+0000
Translation-Revision-Date: 2024-09-17 15:54:03+0000
Plural-Forms: nplurals=2; plural=n > 1;
Generator: GlotPress/2.4.0-alpha
Language: fr
-->
<resources>
<string name="login_with_password_message">Saisir le mot de passe associé au compte %1$s</string>
<string name="magic_link_confirm_code_message">Nous avons envoyé un code à \n%1$s. Ce code sera valide pendant quelques minutes.</string>
<string name="magic_link_confirm_code_enter_pass_label">Saisir le mot de passe</string>
<string name="magic_link_login_with_wordpress_or_break">Ou</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-id/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 09:54:03+0000
Translation-Revision-Date: 2024-09-17 09:54:02+0000
Plural-Forms: nplurals=2; plural=n > 1;
Generator: GlotPress/2.4.0-alpha
Language: id
-->
<resources>
<string name="login_with_password_message">Masukkan kata sandi untuk akun %1$s</string>
<string name="magic_link_confirm_code_message">Kami telah mengirimkan kode ke \n%1$s. Kode ini valid selama beberapa menit.</string>
<string name="magic_link_confirm_code_enter_pass_label">Masukkan kata sandi</string>
<string name="magic_link_login_with_wordpress_or_break">Atau</string>
Expand Down
5 changes: 3 additions & 2 deletions Simplenote/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 11:54:03+0000
Translation-Revision-Date: 2024-09-17 15:54:03+0000
Plural-Forms: nplurals=2; plural=n != 1;
Generator: GlotPress/2.4.0-alpha
Language: it
-->
<resources>
<string name="login_with_password_message">Digita la password per l\'account %1$s</string>
<string name="magic_link_confirm_code_message">Abbiamo inviato un codice a \n%1$s. Il codice sarà valido per pochi minuti.</string>
<string name="magic_link_confirm_code_enter_pass_label">Inserisci password</string>
<string name="magic_link_login_with_wordpress_or_break">Oppure</string>
Expand Down Expand Up @@ -372,7 +373,7 @@ Language: it
<string name="edit_tags">Modifica i tag</string>
<string name="characters">Caratteri</string>
<string name="words">Parole</string>
<string name="font_size">Dimensione carattere</string>
<string name="font_size">Dimensione font</string>
<string name="detect_links">Rileva link</string>
<string name="account">Account</string>
<string name="new_note">Nuova nota</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 09:54:03+0000
Translation-Revision-Date: 2024-09-17 09:54:03+0000
Plural-Forms: nplurals=1; plural=0;
Generator: GlotPress/2.4.0-alpha
Language: ja_JP
-->
<resources>
<string name="login_with_password_message">アカウント %1$s のパスワードを入力</string>
<string name="magic_link_confirm_code_message">コードを \n に送信しました%1$s。 コードは数分間有効です。</string>
<string name="magic_link_confirm_code_enter_pass_label">パスワードを入力</string>
<string name="magic_link_login_with_wordpress_or_break">または</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-07-31 15:54:09+0000
Translation-Revision-Date: 2024-09-18 11:54:02+0000
Plural-Forms: nplurals=2; plural=n != 1;
Generator: GlotPress/2.4.0-alpha
Language: nl
-->
<resources>
<string name="login_with_password_message">Voer het wachtwoord van het account %1$s in</string>
<string name="magic_link_confirm_code_message">We hebben een code gestuurd naar \n%1$s. De code is een paar minuten geldig.</string>
<string name="magic_link_confirm_code_enter_pass_label">Voer wachtwoord in</string>
<string name="magic_link_login_with_wordpress_or_break">Of</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 15:54:03+0000
Translation-Revision-Date: 2024-09-18 17:54:02+0000
Plural-Forms: nplurals=2; plural=(n > 1);
Generator: GlotPress/2.4.0-alpha
Language: pt_BR
-->
<resources>
<string name="login_with_password_message">Digite a senha da conta %1$s</string>
<string name="magic_link_confirm_code_message">Enviamos um código para \n%1$s. O código será válido por alguns minutos.</string>
<string name="magic_link_confirm_code_enter_pass_label">Digite a senha</string>
<string name="magic_link_login_with_wordpress_or_break">Ou</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 15:54:03+0000
Translation-Revision-Date: 2024-09-18 09:54:03+0000
Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);
Generator: GlotPress/2.4.0-alpha
Language: ru
-->
<resources>
<string name="login_with_password_message">Введите пароль учётной записи %1$s</string>
<string name="magic_link_confirm_code_message">Код отправлен на адрес \n%1$s. Код будет действителен в течение нескольких минут.</string>
<string name="magic_link_confirm_code_enter_pass_label">Введите пароль</string>
<string name="magic_link_login_with_wordpress_or_break">или</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-sv/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-15 12:08:19+0000
Translation-Revision-Date: 2024-09-14 07:12:10+0000
Plural-Forms: nplurals=2; plural=n != 1;
Generator: GlotPress/2.4.0-alpha
Language: sv_SE
-->
<resources>
<string name="login_with_password_message">Ange lösenordet för kontot %1$s</string>
<string name="magic_link_confirm_code_message">Vi har skickat en kod till \n%1$s. Koden kommer vara giltig i några minuter.</string>
<string name="magic_link_confirm_code_enter_pass_label">Ange lösenord</string>
<string name="magic_link_login_with_wordpress_or_break">Eller</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 15:54:03+0000
Translation-Revision-Date: 2024-09-17 09:54:02+0000
Plural-Forms: nplurals=2; plural=(n > 1);
Generator: GlotPress/2.4.0-alpha
Language: tr
-->
<resources>
<string name="login_with_password_message">%1$s hesabınızın şifresini girin</string>
<string name="magic_link_confirm_code_message">Şuraya bir kod gönderildi: \n%1$s. Kod birkaç dakikalığına geçerli olacak.</string>
<string name="magic_link_confirm_code_enter_pass_label">Şifre girin</string>
<string name="magic_link_login_with_wordpress_or_break">Veya</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 11:54:03+0000
Translation-Revision-Date: 2024-09-18 09:54:02+0000
Plural-Forms: nplurals=1; plural=0;
Generator: GlotPress/2.4.0-alpha
Language: zh_CN
-->
<resources>
<string name="login_with_password_message">输入账户 %1$s 的密码</string>
<string name="magic_link_confirm_code_message">我们已向 \n 发送代码%1$s。 此代码将在几分钟后失效。</string>
<string name="magic_link_confirm_code_enter_pass_label">输入密码</string>
<string name="magic_link_login_with_wordpress_or_break">或</string>
Expand Down
3 changes: 2 additions & 1 deletion Simplenote/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2024-08-01 15:54:03+0000
Translation-Revision-Date: 2024-09-17 09:54:02+0000
Plural-Forms: nplurals=1; plural=0;
Generator: GlotPress/2.4.0-alpha
Language: zh_TW
-->
<resources>
<string name="login_with_password_message">輸入 %1$s 帳號的密碼</string>
<string name="magic_link_confirm_code_message">我們已傳送驗證碼到 \n%1$s。 此驗證碼在幾分鐘內有效。</string>
<string name="magic_link_confirm_code_enter_pass_label">輸入密碼</string>
<string name="magic_link_login_with_wordpress_or_break">或</string>
Expand Down
2 changes: 2 additions & 0 deletions Simplenote/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,4 +451,6 @@
<string name="magic_link_confirm_code_enter_pass_label">Enter password</string>
<string name="magic_link_confirm_code_message">We\'ve sent a code to \n%1$s. The code will be valid for a few minutes.</string>
<string name="login_with_password_message">Enter the password for the account %1$s</string>

<string name="signin_login_with_email_manually">We\'ll email you a code to log in, or you can %1$s%2$s%3$slog in manually%4$s.</string>
</resources>
58 changes: 0 additions & 58 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -169,64 +169,6 @@ platform :android do
trigger_release_build(branch_to_build: release_branch_name)
end

desc 'Updates store metadata and runs the release checks'
lane :finalize_release do |skip_confirm: false|
UI.user_error!('Please use `finalize_hotfix_release` lane for hotfixes') if android_current_branch_is_hotfix(version_properties_path: VERSION_PROPERTIES_PATH)

ensure_git_status_clean
ensure_git_branch_is_release_branch!

UI.important("Finalizing release: #{release_version_current}")
UI.user_error!("Terminating as requested. Don't forget to run the remainder of this automation manually.") unless skip_confirm || UI.confirm('Do you want to continue?')

configure_apply(force: is_ci)

check_translation_progress_all unless is_ci
download_translations

UI.message 'Bumping final release version and build code...'
VERSION_FILE.write_version(
version_name: release_version_current,
version_code: build_code_next
)
commit_version_bump

# Print computed version and build to let user double-check outcome in logs
version = release_version_current
build_code = build_code_current
UI.success("Done! Final release version: #{version}. Final build code: #{build_code}.")

download_metadata_strings(version: version, build_number: build_code)

UI.important('Will push changes to remote and trigger the release build.')
UI.user_error!("Terminating as requested. Don't forget to run the remainder of this automation manually.") unless skip_confirm || UI.confirm('Do you want to continue?')

push_to_git_remote(tags: false)

build_and_upload_release(create_release: true)

create_release_backmerge_pr(version_to_merge: version, next_version: release_version_next)

remove_branch_protection(
repository: GITHUB_REPO,
branch: release_branch_name
)

begin
set_milestone_frozen_marker(
repository: GITHUB_REPO,
milestone: version,
freeze: false
)
close_milestone(
repository: GITHUB_REPO,
milestone: version
)
rescue StandardError => e
report_milestone_error(error_title: "Error in milestone finalization process for `#{version}`: #{e.message}")
end
end

desc 'Build a Prototype Build and make it available for download'
lane :build_and_upload_prototype_build do
UI.user_error!("'BUILDKITE_ARTIFACTS_S3_BUCKET' must be defined as an environment variable.") unless ENV['BUILDKITE_ARTIFACTS_S3_BUCKET']
Expand Down
1 change: 0 additions & 1 deletion fastlane/lanes/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
version = VERSION_FILE.read_version_name

build_and_upload_apk(
version: version,
upload_track: beta ? 'beta' : 'production'
)

Expand Down
26 changes: 0 additions & 26 deletions fastlane/lanes/ci_releases.rb

This file was deleted.

Loading

0 comments on commit f0c98fa

Please sign in to comment.