Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master branch from original repo #4

Merged
merged 116 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
05e33f5
Fix android remote name
ceyhun Aug 18, 2020
9383b8a
Fix PR formatting
ceyhun Aug 18, 2020
2ae1364
Do not try to commit string update result if there are no changes
ceyhun Aug 24, 2020
80ccd7e
Update gutenberg-mobile submodules after checkout to prevent git stat…
ceyhun Aug 24, 2020
ffb8445
Add supported-blocks.json and expose it as part of the Pod
chipsnyder Sep 1, 2020
709b5f6
Add reminder documentation on where to update the file
chipsnyder Sep 1, 2020
4c6d340
Bump gutenberg version
chipsnyder Sep 1, 2020
0792ea1
Update pod spec to not overwrite resources
chipsnyder Sep 1, 2020
7ee68b4
Merge remote-tracking branch 'origin/develop' into issue/2444-support…
chipsnyder Sep 1, 2020
0839f3b
Testing UIStringContext
etoledom Sep 2, 2020
95a79a4
Adding custom string to be shown on missing block alert
etoledom Sep 11, 2020
f3fb203
Update gutenberg ref
etoledom Sep 11, 2020
13a23ab
Move pullquote to be common block
chipsnyder Sep 11, 2020
53a9f5d
Add set -e option
ceyhun Sep 14, 2020
c236846
Recognize both gb "tag" and "commit" in Podfile
ceyhun Sep 15, 2020
6e8a3d5
Updated gutenberg ref
jd-alexander Sep 16, 2020
83c8fc6
Gutenberg reference
Sep 18, 2020
3ee4127
Merge remote-tracking branch 'origin/develop' into issue-918/improve_…
jd-alexander Sep 18, 2020
7f8f1db
re-add contnet hash max items that was mistakenly removed.
jd-alexander Sep 18, 2020
cce44b7
fixed gutenberg reference
jd-alexander Sep 18, 2020
3ed3b08
Update gutenberg ref
malinajirka Sep 21, 2020
71f27c5
Create gutenberg/after_x.xx.x branches in main apps
ceyhun Sep 21, 2020
e0367b1
Update Releasing.md
ceyhun Sep 17, 2020
21a29cf
Update Releasing.md
ceyhun Sep 21, 2020
6017442
Update Releasing.md
ceyhun Sep 21, 2020
ade5c36
Update gutenberg ref
etoledom Sep 21, 2020
abcb7a4
Merge remote-tracking branch 'origin/develop' into dynamic-ui-strings…
etoledom Sep 21, 2020
80deb6b
Merge remote-tracking branch 'origin/develop' into issue/2444-support…
chipsnyder Sep 22, 2020
d1f6d44
Update gutenberg ref
etoledom Sep 22, 2020
4263473
Merge remote-tracking branch 'origin/develop' into dynamic-ui-strings…
etoledom Sep 22, 2020
dc7e710
Update gutenberg ref
etoledom Sep 22, 2020
b73064c
update gutenberg ref
malinajirka Sep 23, 2020
8a605e9
Merge branch 'develop' into update/android-target-and-compile-sdk-ver…
malinajirka Sep 23, 2020
4ceea85
Changing iOS Demo app product name to `gutenberg`
etoledom Sep 23, 2020
b36f1f7
Renaming GutenbergDemo to gutenberg on CI files
etoledom Sep 23, 2020
25f70d9
Adding CI check to diffs after running npm install
etoledom Sep 23, 2020
15a7f3a
Add check-diff parameter definition on config.yml
etoledom Sep 23, 2020
d2ba256
Fix git diff check script
etoledom Sep 23, 2020
1d2fa0b
Update gutenberg ref
etoledom Sep 23, 2020
33e2d82
config.yml: Checksum from gutenberg/package-lock.json
etoledom Sep 23, 2020
f006e47
Update gutenberg submodule ref
mchowning Sep 23, 2020
08d62f3
Update gutenberg
chipsnyder Sep 23, 2020
80ec09b
Merge pull request #2646 from wordpress-mobile/update/android-target-…
malinajirka Sep 23, 2020
0d7a951
Merge pull request #2589 from wordpress-mobile/issue/2444-supportedBl…
Sep 23, 2020
8e93f64
Updated ref
jd-alexander Sep 23, 2020
690e43a
Dynamically search for plugin-proposal-async-generator-functions
chipsnyder Sep 23, 2020
4a3fd93
Update dependencies after npm install
chipsnyder Sep 23, 2020
b575819
Update Gutenberg
chipsnyder Sep 23, 2020
722eaae
Fix typo
marecar3 Sep 24, 2020
080938c
Update gb reference
marecar3 Sep 24, 2020
afb3b4b
Using npm install to check package-lock.json diff on PRs
etoledom Sep 24, 2020
25063b1
Fix syntax error on .circleci/config.yml
etoledom Sep 24, 2020
c57cc96
Fix syntax error on .circleci/config.yml
etoledom Sep 24, 2020
f518bd0
Fix syntax error on .circleci/config.yml
etoledom Sep 24, 2020
e60b92f
MediaUpload - Remove dashicons and use icons instead (#2660)
Sep 24, 2020
f74f4c3
Adding faiulre message option to pFail on bin/ci-checks-js.sh
etoledom Sep 24, 2020
7e0db8c
bin/ci-checks-js.sh: Removing text coloring.
etoledom Sep 24, 2020
80884d5
CircleCI: Adding cache to npm-install-full command
etoledom Sep 24, 2020
5236f1b
Update gutenberg
chipsnyder Sep 24, 2020
6ec3a4d
Merge remote-tracking branch 'origin/develop' into fix/dynamicBabelPath
chipsnyder Sep 24, 2020
0ea29fd
Merge remote-tracking branch 'origin/develop' into test-check-pachage…
etoledom Sep 24, 2020
904d267
Update gutenberg ref
etoledom Sep 24, 2020
9ad8e55
Merge pull request #2662 from wordpress-mobile/fix/dynamicBabelPath
Sep 24, 2020
4258aa6
Update package-lock.json
etoledom Sep 24, 2020
c16e62d
[Modal Layout Picker] "Preview" button functionality (#2606)
Sep 24, 2020
eeafc74
Update Gutenberg ref
Sep 24, 2020
d2681aa
Update Gutenberg ref
Sep 24, 2020
6aa0607
Update gutenberg ref
etoledom Sep 24, 2020
841df27
Merge remote-tracking branch 'origin/develop' into dynamic-ui-strings…
etoledom Sep 24, 2020
f004c91
Update gb reference
marecar3 Sep 24, 2020
12d5e22
Merge remote-tracking branch 'origin/develop' into issue-918/improve_…
jd-alexander Sep 24, 2020
125da2e
Update ref
jd-alexander Sep 24, 2020
db8949e
Merge pull request #2630 from wordpress-mobile/issue-918/improve_azte…
jd-alexander Sep 24, 2020
130d21f
Update gb reference
marecar3 Sep 24, 2020
cb4a7af
Merge branch 'develop' into issue/2635_InvalidThemeColors
Sep 24, 2020
ee7f083
Update gb reference
marecar3 Sep 24, 2020
05aa58e
Merge branch 'develop' into dynamic-ui-strings-mk2
marecar3 Sep 24, 2020
6e35916
Update .circleci/config.yml
etoledom Sep 25, 2020
e6110b9
Update gutenberg ref
etoledom Sep 25, 2020
811aa60
Merge remote-tracking branch 'origin/develop' into fix-xcode12-run-na…
etoledom Sep 25, 2020
d777aee
Merge remote-tracking branch 'origin/develop' into test-check-pachage…
etoledom Sep 25, 2020
75984e4
Update ci-checks-js.sh
etoledom Sep 25, 2020
0dcee0e
Merge pull request #2658 from wordpress-mobile/fix-xcode12-run-native…
etoledom Sep 25, 2020
d4d4578
Update Gutenberg ref
Sep 25, 2020
418df0a
Update gutenberg ref
etoledom Sep 25, 2020
a51a33d
Merge remote-tracking branch 'origin/develop' into dynamic-ui-strings…
etoledom Sep 25, 2020
8c575fe
Remove extra dependencies not needed
etoledom Sep 25, 2020
08cab76
Recover eslint-plugin-jsdoc as dev dependency
etoledom Sep 25, 2020
6529f3c
Install previous version of eslint-plugin-jsdoc (no update)
etoledom Sep 25, 2020
577a023
Update gutenberg ref
etoledom Sep 25, 2020
ecb1c5c
Update Gutenberg ref (#2652)
Sep 25, 2020
bce5214
Merge branch 'develop' into issue/2635_InvalidThemeColors
Sep 25, 2020
5ee724c
Merge pull request #2639 from wordpress-mobile/issue/2635_InvalidThem…
Sep 25, 2020
8df9f34
Update capability name to canEnableUnsupportedBlockEditor
etoledom Sep 25, 2020
29b8f20
Fix lint issues
etoledom Sep 25, 2020
9b7b2eb
Update gutenberg ref
etoledom Sep 25, 2020
0545492
Merge remote-tracking branch 'origin/develop' into dynamic-ui-strings…
etoledom Sep 25, 2020
5c40419
Gutenberg ref
Sep 26, 2020
b167f28
Add option to skip npm ci
cameronvoell Sep 28, 2020
96df88c
Update branch from main to trunk
cameronvoell Sep 28, 2020
a21c363
Merge pull request #2558 from wordpress-mobile/fix/release-script
cameronvoell Sep 28, 2020
698d84b
Update gutenberg ref
ceyhun Sep 28, 2020
98f897b
Merge branch 'develop' into fix/buttons-text
ceyhun Sep 28, 2020
433db5d
Update gutenberg ref
etoledom Sep 28, 2020
a83fa81
Merge pull request #2665 from wordpress-mobile/fix/buttons-text
ceyhun Sep 28, 2020
2217b1c
Bundle:js
etoledom Sep 28, 2020
cdb0675
Merge remote-tracking branch 'origin/develop' into dynamic-ui-strings…
etoledom Sep 28, 2020
a0a5353
Merge pull request #2610 from wordpress-mobile/dynamic-ui-strings-mk2
etoledom Sep 28, 2020
85480f8
Bundle update
Sep 28, 2020
962d33e
Fix image block render in Xcode 12 (#2645)
guarani Sep 28, 2020
3b58aa6
Merge pull request #2664 from wordpress-mobile/test-check-pachage-loc…
etoledom Sep 29, 2020
840dd7d
Revert "Bundle update"
Sep 30, 2020
1e1f9ac
Reference update
Sep 30, 2020
be563a0
Merge branch 'develop' into issue/2452-Preview
Sep 30, 2020
b646cc6
Package lock update
Sep 30, 2020
4d2b4f6
Merge pull request #2674 from wordpress-mobile/issue/2452-Preview
Sep 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ commands:
paths:
- ~/.npm
- i18n-cache/data
npm-install-full:
steps:
- restore_cache:
name: Restore NPM Cache
keys:
- npm-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "gutenberg/package-lock.json" }}
- run:
name: NPM Install Full
command: npm install
- save_cache:
name: Save NPM Cache
key: npm-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "gutenberg/package-lock.json" }}
paths:
- ~/.npm
- i18n-cache/data
checkout-submodules:
steps:
- run:
Expand Down Expand Up @@ -47,7 +62,14 @@ jobs:
steps:
- checkout
- checkout-submodules
- npm-install
- when:
condition: <<parameters.check-correctness>>
steps:
- npm-install-full
- unless:
condition: <<parameters.check-correctness>>
steps:
- npm-install
- add-jest-reporter-dir
- run:
name: Set Environment Variables
Expand Down Expand Up @@ -162,7 +184,7 @@ jobs:
- dependencies-v4-
- run:
name: Build (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || SKIP_BUNDLING=true npm run core test:e2e:build-app:ios
command: test -e gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app || SKIP_BUNDLING=true npm run core test:e2e:build-app:ios
- save_cache:
name: Save Dependencies Cache
key: dependencies-v4-{{ checksum "gutenberg/packages/react-native-editor/ios/Gemfile.lock" }}-{{ checksum "gutenberg/packages/react-native-editor/ios/Podfile.lock" }}-{{ checksum "gutenberg/package-lock.json" }}
Expand All @@ -176,12 +198,12 @@ jobs:
command: npm run test:e2e:bundle:ios
- run:
name: Generate .app file for testing
command: WORK_DIR=$(pwd) && cd ./gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip GutenbergDemo.app
command: WORK_DIR=$(pwd) && cd ./gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/gutenberg/packages/react-native-editor/ios/gutenberg.app.zip gutenberg.app
- run:
name: Upload .app to sauce labs
command: |
source bin/sauce-pre-upload.sh
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.app.zip?overwrite=true --data-binary @./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.app.zip?overwrite=true --data-binary @./gutenberg/packages/react-native-editor/ios/gutenberg.app.zip
- run:
name: Run Device Tests
command: |
Expand All @@ -193,12 +215,12 @@ jobs:
path: ./reports/test-results
- run:
name: Prepare build cache
command: rm gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle
command: rm gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app/main.jsbundle
- save_cache:
name: Save Build Cache
key: ios-build-cache-{{ checksum "ios-checksums.txt" }}
paths:
- gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app
- gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app
- when:
condition: << parameters.post-to-slack >>
steps:
Expand Down
2 changes: 1 addition & 1 deletion Gutenberg.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.preserve_paths = 'bundle/ios/*'
s.swift_version = '5.0'
s.resources = 'gutenberg/packages/react-native-bridge/common/**/*.{js,css,json}', 'resources/**/*.js'
s.resources = ['gutenberg/packages/react-native-bridge/common/**/*.{js,css,json}', 'src/block-support/supported-blocks.json', 'resources/**/*.js']

s.dependency 'React', react_native_version
s.dependency 'React-CoreModules', react_native_version
Expand Down
20 changes: 18 additions & 2 deletions bin/ci-checks-js.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
function pOk() {
echo "[$(tput setaf 2)OK$(tput sgr0)]"
echo "[OK]"
}

function pFail() {
echo "[$(tput setaf 1)KO$(tput sgr0)]"
if [ -n "$1" ]
then
echo "Message: $1"
fi
echo "[KO]"
exit 1
}

function checkDiff() {
diff=$(git diff)
if [[ $? != 0 ]]; then
pFail
elif [[ $diff ]]; then
pFail "package-lock.json has changed. Please run npm install and commit the diff"
else
pOk
fi
}

# if both env variables are missing then force them to `true`. Otherwise will respect the combination passed externally
if [[ -z "${CHECK_CORRECTNESS}" ]] && [[ -z "${CHECK_TESTS}" ]] ; then
CHECK_CORRECTNESS=true
CHECK_TESTS=true
fi

if [ "$CHECK_CORRECTNESS" = true ] ; then
checkDiff
npm run lint || pFail
fi

Expand Down
53 changes: 39 additions & 14 deletions bin/release_automation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# - Release is being created off of a clean branch
# - Whether there are any open PRs targeting the milestone for the release

set -e

# Execute script commands from project's root directory
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPT_PATH/.."
Expand Down Expand Up @@ -48,9 +50,11 @@ if [[ -z "$VERSION_NUMBER" ]]; then
fi

# Ensure javascript dependencies are up-to-date
ohai "Run 'npm ci' to ensure javascript dependencies are up-to-date"
execute "npm" "ci"

read -p "Run 'npm ci' to ensure javascript dependencies are up-to-date? (y/n) " -n 1
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then
execute "npm" "ci"
fi

# If there are any open PRs with a milestone matching the release version number, notify the user and ask them if they want to proceed
number_milestone_prs=$(check_if_version_has_pending_prs_for_milestone "$VERSION_NUMBER")
Expand Down Expand Up @@ -195,26 +199,39 @@ cd "$TEMP_WP_ANDROID_DIRECTORY"

execute "git" "submodule" "update" "--init" "--recursive" "--depth=1" "--recommend-shallow"

ohai "Create after_x.xx.x branch in WordPress-Android"
execute "git" "switch" "-c" "gutenberg/after_$VERSION_NUMBER"

# Insure PR is created on proper remote
# see https://github.com/cli/cli/issues/800
WP_ANDROID_BASE_REMOTE=$(get_remote_name 'wordpress-mobile/WordPress-Android')
execute "git" "push" "-u" "$WP_ANDROID_BASE_REMOTE" "HEAD"

ohai "Create release branch in WordPress-Android"
execute "git" "switch" "-c" "gutenberg/integrate_release_$VERSION_NUMBER"

ohai "Update gutenberg-mobile ref"
cd libs/gutenberg-mobile
execute "git" "fetch" "--recurse-submodules=no" "origin" "$GB_MOBILE_PR_REF"
execute "git" "checkout" "$GB_MOBILE_PR_REF"
execute "git" "submodule" "update"
cd ../..

execute "git" "add" "libs/gutenberg-mobile"
execute "git" "commit" "-m" "Release script: Update gutenberg-mobile ref"

ohai "Update strings"
execute "python" "tools/merge_strings_xml.py"
execute "git" "add" "WordPress/src/main/res/values/strings.xml"
execute "git" "commit" "-m" "Release script: Update strings"
# If merge_strings_xml.py results in changes, commit them
if [[ ! -z "$(git status --porcelain)" ]]; then
ohai "Commit changes from 'python tools/merge_strings_xml.py'"
execute "git" "add" "WordPress/src/main/res/values/strings.xml"
execute "git" "commit" "-m" "Release script: Update strings"
else
ohai "There were no changes from 'python tools/merge_strings_xml.py' to be committed."
fi

# Insure PR is created on proper remote
# see https://github.com/cli/cli/issues/800
WP_ANDROID_BASE_REMOTE=$(get_remote_name 'wordpress-mobile/WordPress-android')
ohai "Push integration branch"
execute "git" "push" "-u" "$WP_ANDROID_BASE_REMOTE" "HEAD"

WP_ANDROID_PR_BODY="## Description
Expand All @@ -223,13 +240,14 @@ For more information about this release and testing instructions, please see the

Release Submission Checklist

- [ ] I have considered if this change warrants user-facing release notes and have added them to `RELEASE-NOTES.txt` if necessary."
- [ ] I have considered if this change warrants user-facing release notes and have added them to \`RELEASE-NOTES.txt\` if necessary."

# Create Draft WPAndroid Release PR in GitHub
ohai "Create Draft WPAndroid Release PR in GitHub"
WP_ANDROID_PR_URL=$(execute "gh" "pr" "create" "--title" "Integrate gutenberg-mobile release $VERSION_NUMBER" "--body" "$WP_ANDROID_PR_BODY" "--base" "develop" "--label" "gutenberg-mobile" "--draft")

ohai "WPAndroid PR Created: $WP_ANDROID_PR_URL"
echo ""


#####
Expand All @@ -242,21 +260,27 @@ execute "git" "clone" "--depth=1" "[email protected]:wordpress-mobile/WordPress-iOS

cd "$TEMP_WP_IOS_DIRECTORY"

ohai "Create after_x.xx.x branch in WordPress-iOS"
execute "git" "switch" "-c" "gutenberg/after_$VERSION_NUMBER"

# Insure PR is created on proper remote
# see https://github.com/cli/cli/issues/800
WP_IOS_BASE_REMOTE=$(get_remote_name 'wordpress-mobile/WordPress-iOS')
execute "git" "push" "-u" "$WP_IOS_BASE_REMOTE" "HEAD"

ohai "Create release branch in WordPress-iOS"
execute "git" "switch" "-c" "gutenberg/integrate_release_$VERSION_NUMBER"

ohai "Update gutenberg-mobile ref"
test -f "Podfile" || abort "Error: Could not find Podfile"
sed -i'.orig' -E "s/gutenberg :commit => '(.*)'/gutenberg :commit => '$GB_MOBILE_PR_REF'/" Podfile || abort "Error: Failed updating gutenberg ref in Podfile"
sed -i'.orig' -E "s/gutenberg :(commit|tag) => '(.*)'/gutenberg :commit => '$GB_MOBILE_PR_REF'/" Podfile || abort "Error: Failed updating gutenberg ref in Podfile"
execute "rake" "dependencies"


execute "git" "add" "Podfile" "Podfile.lock"
execute "git" "commit" "-m" "Release script: Update gutenberg-mobile ref"

# Insure PR is created on proper remote
# see https://github.com/cli/cli/issues/800
WP_IOS_BASE_REMOTE=$(get_remote_name 'wordpress-mobile/WordPress-iOS')
ohai "Push integration branch"
execute "git" "push" "-u" "$WP_IOS_BASE_REMOTE" "HEAD"

WP_IOS_PR_BODY="## Description
Expand All @@ -265,13 +289,14 @@ For more information about this release and testing instructions, please see the

Release Submission Checklist

- [ ] I have considered if this change warrants user-facing release notes and have added them to `RELEASE-NOTES.txt` if necessary."
- [ ] I have considered if this change warrants user-facing release notes and have added them to \`RELEASE-NOTES.txt\` if necessary."

# Create Draft WPiOS Release PR in GitHub
ohai "Create Draft WPiOS Release PR in GitHub"
WP_IOS_PR_URL=$(execute "gh" "pr" "create" "--title" "Integrate gutenberg-mobile release $VERSION_NUMBER" "--body" "$WP_IOS_PR_BODY" "--base" "develop" "--label" "Gutenberg integration" "--draft")

ohai "WPiOS PR Created: $WP_IOS_PR_URL"
echo ""

echo "Main apps PRs created"
echo "==========="
Expand Down
Loading