Skip to content

Commit

Permalink
Merge pull request #136 from MITLibraries/catch3
Browse files Browse the repository at this point in the history
Third round of Pantheon updates
  • Loading branch information
matt-bernhardt authored Jul 11, 2023
2 parents d9b6f52 + b645c16 commit 148acb5
Show file tree
Hide file tree
Showing 33 changed files with 615 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# ssh-keygen -l -E md5 -f ed25519
- add_ssh_keys:
fingerprints:
- "d6:6c:3e:b6:92:36:04:fc:5a:23:1f:e2:9d:87:00:ef"
- "50:72:cc:79:5d:fa:9d:b9:83:40:af:e9:4a:37:4f:4b"
- run:
name: Copy commits to destination repo
command: devops/scripts/deploy-public-upstream.sh
Expand Down
10 changes: 0 additions & 10 deletions .github/dependabot.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 2023-02-02
* Adds Composer Patches plugin ([#66](https://github.com/pantheon-systems/wordpress-composer-managed/pull/66))

### 2023-01-11
* Remove Dependabot ([#58](https://github.com/pantheon-systems/wordpress-composer-managed/pull/58))
* Resolves issue where updates to commit choosing logic were causing a merge conflict. ([#60](https://github.com/pantheon-systems/wordpress-composer-managed/pull/60))
* Adds a Roots Sage install script. See [docs/Installing-Sage.md](docs/Installing-Sage.md) ([#61](https://github.com/pantheon-systems/wordpress-composer-managed/pull/61))

### 2022-11-30
* Set minimum-stability to "stable" in `composer.json` ([#55](https://github.com/pantheon-systems/wordpress-composer-managed/pull/55))
* Add Composer `post-install-cmd` to create symlinks to the `web/wp` directory (for better multisite support) ([#56](https://github.com/pantheon-systems/wordpress-composer-managed/pull/56))
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Code owners. See:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @pantheon-systems/cms-ecosystem
# @pantheon-systems/cms-ecosystem @pantheon-systems/cms-platform
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ composer upstream-require wpackagist-theme/twentytwentytwo
composer upstream-require wpackagist-plugin/advanced-custom-fields
```

### Using Roots Sage starter theme

We've included a Sage Install script that can be run via Composer. This will install the Sage starter theme from Roots, ensure all dependencies are installed, and adds a `post-install-cmd` hook to the `composer.json`. For more information see [Installing Sage](docs/Installing-Sage.md). The command to run the script is below.

```
composer install-sage
```

## Contributing

Contributions are welcome in the form of GitHub pull requests. However, the `pantheon-upstreams/wordpress-composer-managed` repository is a mirror that does not directly accept pull requests.
Expand Down
14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"wpengine/advanced-custom-fields-pro": "^5",
"composer/installers": "^2.2",
"connectthink/wp-scss": "^2.4@beta",
"cweagans/composer-patches": "^1.7",
"google/apiclient": "^2.12",
"mitlibraries/acf-location-field": "^1.0",
"mitlibraries/dynamic-menu-manager": "^1.0",
Expand Down Expand Up @@ -135,11 +136,13 @@
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"process-timeout": 0,
"allow-plugins": {
"composer/installers": true,
"roots/wordpress-core-installer": true,
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"pivvenit/acf-pro-installer": true
"pivvenit/acf-pro-installer": true,
"roots/wordpress-core-installer": true
},
"sort-packages": true
},
Expand Down Expand Up @@ -171,7 +174,9 @@
"locations": {
"web-root": "./"
}
}
},
"composer-exit-on-patch-failure": true,
"enable-patching": true
},
"autoload": {
"classmap": [
Expand Down Expand Up @@ -215,6 +220,9 @@
"syntax": [
"find . -path ./libs -prune -o \\( -name '*.php' \\) -exec php -lf {} \\;"
],
"install-sage": [
"bash ./private/scripts/sage-theme-install.sh"
],
"test": [
"phpcs"
],
Expand Down
50 changes: 49 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 27 additions & 6 deletions devops/scripts/deploy-decoupled-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,27 @@ echo
newcommits=$(git log decoupled-release-pointer..HEAD --reverse --pretty=format:"%h")
commits=()

# There are a small number of commits which must be manually excluded, usually
# due to changes in the commit type rules which would retroactively include commits
# which were not initially included, causing merge conflicts. Commits which should
# be excluded can be added to this array and will not be cherry picked.
exclude_list=(0099a8b)

# Identify commits that should be released
for commit in $newcommits; do
# Exclude commits which have been manually rejected
skip=false
for item in "${exclude_list[@]}"; do
if [[ $item == $commit ]]; then
echo "Commit ${commit} has been manually excluded."
skip=true
fi
done

if [[ $skip == true ]] ; then
continue
fi

commit_type=$(identify_commit_type "$commit")
if [[ $commit_type == "normal" ]] ; then
commits+=($commit)
Expand All @@ -41,11 +60,13 @@ for commit in $newcommits; do
echo "You may wish to ensure that nothing in this commit is meant for release."
delete=(${commit})
for remove in "${delete[@]}"; do
for i in "${commits[@]}"; do
if [ [ ${commits[i]} = $remove ]]; then
unset 'commits[i]'
fi
done
if (( ${#commits[@]} )); then
for i in "${commits[@]}"; do
if [[ ${commits[0]} = $remove ]]; then
unset 'commits[i]'
fi
done
fi
done
fi
done
Expand All @@ -72,7 +93,7 @@ for commit in "${commits[@]}"; do
fi
echo "Adding $commit:"
git --no-pager log --format=%B -n 1 "$commit"
git cherry-pick -rn "$commit" 2>&1
git cherry-pick -rn -X theirs "$commit" 2>&1
# Product request - single commit per release
# The commit message from the last commit will be used.
git log --format=%B -n 1 "$commit" > /tmp/commit_message
Expand Down
Loading

0 comments on commit 148acb5

Please sign in to comment.