Skip to content

Commit 567a30a

Browse files
committed
Merge remote-tracking branch 'origin/gutenberg/integrate_release_1.31.0' into gutenberg/try-enabling-build-from-monorepo
2 parents ca40c71 + 934b630 commit 567a30a

45 files changed

Lines changed: 1545 additions & 166 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ orbs:
66
git: wordpress-mobile/git@1.0
77
slack: circleci/slack@3.4.2
88

9+
parameters:
10+
translation_review_build:
11+
type: boolean
12+
default: false
13+
translation_review_lang_id:
14+
type: string
15+
default: all-lang
16+
917
commands:
1018
fix-path:
1119
steps:
@@ -170,9 +178,50 @@ jobs:
170178
webhook: '${SLACK_BUILD_WEBHOOK}'
171179
failure_message: '${SLACK_FAILURE_MESSAGE}'
172180
success_message: '${SLACK_SUCCESS_MESSAGE}'
181+
translation-review-build:
182+
executor:
183+
name: ios/default
184+
xcode-version: "11.2.1"
185+
environment:
186+
HOMEBREW_NO_AUTO_UPDATE: 1
187+
steps:
188+
- git/shallow-checkout
189+
- ios/install-dependencies:
190+
bundle-install: true
191+
pod-install: true
192+
- run:
193+
name: Copy Secrets
194+
command: bundle exec fastlane run configure_apply
195+
- run:
196+
name: Install other tools
197+
command: |
198+
brew unlink python@2
199+
brew install imagemagick
200+
brew install ghostscript
201+
curl -sL https://sentry.io/get-cli/ | bash
202+
- run:
203+
name: Build
204+
working_directory: Scripts
205+
command: |
206+
bundle exec fastlane build_for_translation_review
207+
208+
VERSION_NAME="all-land-build-${CIRCLE_BUILD_NUM}"
209+
echo "export VERSION_NAME=$VERSION_NAME" >> $BASH_ENV
210+
211+
mkdir -p ../Artifacts
212+
mv /var/tmp/Debug-iphonesimulator/WordPress.zip "../Artifacts/WordPress-${VERSION_NAME}.zip"
213+
no_output_timeout: 60m
214+
- run:
215+
name: Upload APP
216+
command: |
217+
curl --http1.1 https://${APPET_TOKEN}@api.appetize.io/v1/apps/${APPET_APPID} -F "file=@Artifacts/WordPress-${VERSION_NAME}.zip" -F "platform=ios"
218+
- store_artifacts:
219+
path: Artifacts
220+
destination: Artifacts
173221

174222
workflows:
175223
wordpress_ios:
224+
unless: << pipeline.parameters.translation_review_build >>
176225
jobs:
177226
- Build Tests
178227
- Unit Tests:
@@ -216,6 +265,7 @@ workflows:
216265
device: iPad Air \\(3rd generation\\)
217266
requires: [ "Optional Tests" ]
218267
Installable Build:
268+
unless: << pipeline.parameters.translation_review_build >>
219269
jobs:
220270
- Hold:
221271
type: approval
@@ -228,11 +278,16 @@ workflows:
228278
branches:
229279
ignore: /pull\/[0-9]+/
230280
Release Build:
281+
unless: << pipeline.parameters.translation_review_build >>
231282
jobs:
232283
- Release Build:
233284
filters:
234285
branches:
235286
ignore: /.*/
236287
tags:
237-
only: /^\d.\d?(.\d)?(.\d)?(.\d{1,4})$/
288+
only: /^\d.\d?(.\d)?(.\d)?(.\d{1,4})$/
289+
Translation Review Build:
290+
when: << pipeline.parameters.translation_review_build >>
291+
jobs:
292+
- translation-review-build
238293

.github/workflows/danger.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Run Checks with Danger
22
on:
3+
issues:
4+
types: [milestoned, demilestoned]
35
pull_request:
46
# Because we have a rule that validates the PR labels, we want it to run
57
# when the labels change, not only when a PR is opened/reopened or changes
@@ -14,12 +16,19 @@ jobs:
1416
# Till https://github.com/danger/danger-js/issues/1042 is fixed, we need
1517
# this workaround
1618
DANGER_GITHUB_API_BASE_URL: "https://api.github.com"
19+
if:
20+
# One of the Danger checks we run on PRs is for milestones, but the event
21+
# that triggers it is for issues. PRs are special issues but, unlike
22+
# labels, don't have a dedicated milestone event. In order to run this
23+
# workflow only for PRs, we need to check the context to see if this was
24+
# triggered by a PR or a plain issue.
25+
github.event.pull_request != null || github.event.issue.pull_request != null
1726
steps:
1827
- uses: actions/checkout@v2
1928

2029
- uses: actions/setup-node@v1
2130
with:
22-
node_version: 10.x
31+
node-version: 10.x
2332

2433
- name: Install Yarn
2534
run: npm install -g yarn

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GIT
22
remote: https://github.com/wordpress-mobile/release-toolkit
3-
revision: f04b19fddf1f3a9485a48a7ba4a93d32c0af62d5
4-
tag: 0.9.7
3+
revision: b515c0b26b78bfffc3cbe5ceb3b51bb6eb979ab4
4+
ref: 0.9.8
55
specs:
6-
fastlane-plugin-wpmreleasetoolkit (0.9.7)
6+
fastlane-plugin-wpmreleasetoolkit (0.9.8)
77
activesupport (~> 4)
88
chroma (= 0.2.0)
99
diffy (~> 3.3)
@@ -224,7 +224,7 @@ GEM
224224
optimist (3.0.1)
225225
options (2.3.2)
226226
os (1.1.0)
227-
parallel (1.19.1)
227+
parallel (1.19.2)
228228
plist (3.5.0)
229229
progress_bar (1.3.1)
230230
highline (>= 1.6, < 3)

MIGRATIONS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
This file documents changes in the data model. Please explain any changes to the
44
data model as well as any custom migrations.
55

6+
## WordPress 97
7+
8+
@aerych 2020-06-17
9+
10+
- All stats entities were reviewed for consistency of Optional settings for strings and dates and default values for scalar numerical fields.
11+
- Categories entity updated to make numeric fields scalar and non-optional.
12+
13+
## WordPress 96
14+
15+
@Gio2018 2020-06-12
16+
17+
- Add fileds `supportPriority`, `supportName` and `nonLocalizedShortname` to the `Plan` entity for Zendesk integration.
618

719
## WordPress 94
820

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ target 'WordPress' do
188188

189189
pod 'Gridicons', '~> 1.0.1'
190190

191-
pod 'WordPressAuthenticator', '~> 1.18.0'
191+
pod 'WordPressAuthenticator', '~> 1.19.0-beta'
192192
# While in PR
193193
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => ''
194194
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => ''

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ PODS:
383383
- WordPress-Aztec-iOS (1.19.2)
384384
- WordPress-Editor-iOS (1.19.2):
385385
- WordPress-Aztec-iOS (= 1.19.2)
386-
- WordPressAuthenticator (1.18.0):
386+
- WordPressAuthenticator (1.19.0-beta.3):
387387
- 1PasswordExtension (= 1.8.6)
388388
- Alamofire (= 4.8)
389389
- CocoaLumberjack (~> 3.5)
@@ -487,7 +487,7 @@ DEPENDENCIES:
487487
- Starscream (= 3.0.6)
488488
- SVProgressHUD (= 2.2.5)
489489
- WordPress-Editor-iOS (~> 1.19.2)
490-
- WordPressAuthenticator (~> 1.18.0)
490+
- WordPressAuthenticator (~> 1.19.0-beta)
491491
- WordPressKit (= 4.11.0-beta.1)
492492
- WordPressMocks (~> 0.0.8)
493493
- WordPressShared (= 1.9.0)
@@ -716,7 +716,7 @@ SPEC CHECKSUMS:
716716
UIDeviceIdentifier: 44f805037d21b94394821828f4fcaba34b38c2d0
717717
WordPress-Aztec-iOS: d01bf0c5e150ae6a046f06ba63b7cc2762061c0b
718718
WordPress-Editor-iOS: 5b726489e5ae07b7281a2862d69aba2d5c83f140
719-
WordPressAuthenticator: 7c7f442088af2022f7ee5d7baa6bd73d87df9e25
719+
WordPressAuthenticator: 6d6b085a895ce00bd616c2132d58e59cd1f26745
720720
WordPressKit: cf04f034a376fe54a44edff62c3bd0ece5ef13a6
721721
WordPressMocks: b4064b99a073117bbc304abe82df78f2fbe60992
722722
WordPressShared: b887b17aa949e4b142a1421fd479de495db9a054
@@ -733,6 +733,6 @@ SPEC CHECKSUMS:
733733
ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc
734734
ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0
735735

736-
PODFILE CHECKSUM: 2c8892c6ae44d7c9daf523681b6bc30384022c63
736+
PODFILE CHECKSUM: 2c789d1b70eae40c75502de7a3e4ce7acb93c779
737737

738738
COCOAPODS: 1.8.4

RELEASE-NOTES.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
15.2
22
----
33
* [**] Block editor: Display content metrics information (blocks, words, characters count).
4+
* [***] Reader content improved: a lot of fixes in how the content appears when you're reading a post.
45

56
-----
6-
7+
78
15.1
89
-----
910
* [**] Block Editor: Add support to upload videos to Cover Blocks after the editor has closed.
@@ -13,10 +14,10 @@
1314
* [*] Fix a bug where the Latest Post date on Insights Stats was being calculated incorrectly.
1415
* Block editor: [*] Support for breaking out of captions/citation authors by pressing enter on the following blocks: image, video, gallery, quote, and pullquote.
1516
* Block editor: [**] Adds editor support for theme defined colors and theme defined gradients on cover and button blocks.
16-
* [*] Fixed a bug where "Follow another site" was using the wrong steps in the "Grow Your Audience" Quick Start tour.
17+
* [*] Fixed a bug where "Follow another site" was using the wrong steps in the "Grow Your Audience" Quick Start tour.
1718
* [*] Fix a bug where Quick Start completed tasks were not communicated to VoiceOver users.
1819
* [**] Quick Start: added VoiceOver support to the Next Steps section.
19-
* [*] Fixed a bug where the "Publish a post" Quick Start tour didn't reflect the app's new information architecture
20+
* [*] Fixed a bug where the "Publish a post" Quick Start tour didn't reflect the app's new information architecture
2021
* [***] Free GIFs can now be added to the media library, posts, and pages.
2122
* [**] You can now set pages as your site's homepage or posts page directly from the Pages list.
2223
* [*] Block editor: Fix 'Take a Photo' option failing after adding an image to gallery block

Scripts/fastlane/Fastfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,38 @@ import "./ScreenshotFastfile"
435435
end
436436
end
437437

438+
#####################################################################################
439+
# build_for_translation_review
440+
# -----------------------------------------------------------------------------------
441+
# This lane builds the app with pending translations for reviewers
442+
# -----------------------------------------------------------------------------------
443+
# Usage:
444+
# bundle exec fastlane build_for_translation_review
445+
#
446+
# Example:
447+
# bundle exec fastlane build_for_translation_review
448+
#####################################################################################
449+
desc "Builds and uploads for translation review"
450+
lane :build_for_translation_review do | options |
451+
ios_build_preflight() unless (options[:skip_prechecks])
452+
453+
sh("cd ../.. && ./Scripts/update-translations.rb review current")
454+
sh("cd ../.. && ./Scripts/update-translations.rb review waiting")
455+
sh("cd ../.. && ./Scripts/update-translations.rb review fuzzy")
456+
457+
ios_merge_translators_strings(strings_folder:"../WordPress/Resources/")
458+
sh("cd ../.. && ./Scripts/extract-framework-translations.swift")
459+
460+
xcbuild(
461+
workspace: "../WordPress.xcworkspace",
462+
scheme: "WordPress",
463+
configuration: "Debug",
464+
xcargs: "-sdk iphonesimulator SYMROOT='/var/tmp/'"
465+
)
466+
467+
zip(path: "/var/tmp/Debug-iphonesimulator/WordPress.app", output_path: "/var/tmp/Debug-iphonesimulator/WordPress.zip")
468+
end
469+
438470
#####################################################################################
439471
# register_new_device
440472
# -----------------------------------------------------------------------------------

Scripts/fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ group :screenshots, optional: true do
66
gem 'rmagick', '~> 3.2.0'
77
end
88

9-
gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', tag: '0.9.7'
9+
gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', ref:'0.9.8'
1010
gem 'fastlane-plugin-sentry'
1111
gem 'fastlane-plugin-appcenter', '1.8.0'
1212
gem 'fastlane-plugin-test_center'

Scripts/update-translations.rb

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,23 @@
8282
}
8383

8484
langs = {}
85+
strings_filter = ""
86+
strings_file_ext = ""
8587
if ARGV.count > 0
86-
for key in ARGV
87-
unless local = ALL_LANGS[key]
88-
puts "Unknown language #{key}"
89-
exit 1
88+
if (ARGV[0] == "review") then
89+
langs = ALL_LANGS
90+
91+
strings_filter = "filters[status]=#{ARGV[1]}\&"
92+
strings_file_ext = "_#{ARGV[1]}"
93+
else
94+
for key in ARGV
95+
unless local = ALL_LANGS[key]
96+
puts "Unknown language #{key}"
97+
exit 1
98+
end
99+
langs[key] = local
90100
end
91-
langs[key] = local
92-
end
101+
end
93102
else
94103
langs = ALL_LANGS
95104
end
@@ -98,21 +107,23 @@
98107
lang_dir = File.join('WordPress', 'Resources', "#{local}.lproj")
99108
puts "Updating #{code}"
100109
system "mkdir -p #{lang_dir}"
101-
system "if [ -e #{lang_dir}/Localizable.strings ]; then cp #{lang_dir}/Localizable.strings #{lang_dir}/Localizable.strings.bak; fi"
102110

103-
url = "https://translate.wordpress.org/projects/apps/ios/dev/#{code}/default/export-translations?format=strings"
104-
destination = "#{lang_dir}/Localizable.strings"
111+
# Download for production
112+
system "if [ -e #{lang_dir}/Localizable#{strings_file_ext}.strings ]; then cp #{lang_dir}/Localizable#{strings_file_ext}.strings #{lang_dir}/Localizable#{strings_file_ext}.strings.bak; fi"
113+
114+
url = "https://translate.wordpress.org/projects/apps/ios/dev/#{code}/default/export-translations?#{strings_filter}format=strings"
115+
destination = "#{lang_dir}/Localizable#{strings_file_ext}.strings"
105116

106-
system "curl -fLso #{destination} #{url}" or begin
117+
system "curl -fLso #{destination} \"#{url}\"" or begin
107118
puts "Error downloading #{code}"
108119
end
109120

110121
if File.size(destination).to_f == 0
111-
abort("\e[31mFatal Error: #{destination} appears to be empty. Exiting.\e[0m")
122+
abort("\e[31mFatal Error: #{destination} appears to be empty. Exiting.\e[0m")
112123
end
113124

114-
system "./Scripts/fix-translation #{lang_dir}/Localizable.strings"
115-
system "plutil -lint #{lang_dir}/Localizable.strings" and system "rm #{lang_dir}/Localizable.strings.bak"
116-
system "grep -a '\\x00\\x20\\x00\\x22\\x00\\x22\\x00\\x3b$' #{lang_dir}/Localizable.strings"
125+
system "./Scripts/fix-translation #{lang_dir}/Localizable#{strings_file_ext}.strings"
126+
system "plutil -lint #{lang_dir}/Localizable#{strings_file_ext}.strings" and system "rm #{lang_dir}/Localizable#{strings_file_ext}.strings.bak"
127+
system "grep -a '\\x00\\x20\\x00\\x22\\x00\\x22\\x00\\x3b$' #{lang_dir}/Localizable#{strings_file_ext}.strings"
117128
end
118-
system "Scripts/extract-framework-translations.swift"
129+
system "Scripts/extract-framework-translations.swift" if strings_filter.empty?

0 commit comments

Comments
 (0)