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

Tooling: Plugin release script tweaks #41651

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions tools/release-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ function do_trunk_and_prelease_branch_prep() {
send_tracks_event "jetpack_release_prerelease_push" '{"result": "failure"}'
die "Branch push failed. Check #jetpack-releases and make sure no one is doing a release already, then delete the branch at https://github.com/Automattic/jetpack/branches"
fi
GITBASE=$( git rev-parse --verify HEAD )
send_tracks_event "jetpack_release_prerelease_push" '{"result": "success"}'
}

Expand Down Expand Up @@ -261,6 +260,7 @@ function do_packagist_check {
# We expect a new version when (1) the package is touched in this release and (2) it has no change entry files remaining.
POLL_ARGS=()
cd "$BASE"
GITBASE=$(git merge-base trunk HEAD)
for PKGDIR in $(git -c core.quotepath=off diff --name-only "$GITBASE..HEAD" projects/packages/ | sed 's!^\(projects/packages/[^/]*\)/.*!\1!' | sort -u); do
cd "$BASE/$PKGDIR"
CHANGES_DIR=$(jq -r '.extra.changelogger["changes-dir"] // "changelog"' composer.json)
Expand Down Expand Up @@ -458,7 +458,7 @@ for PLUGIN in "${!PROJECTS[@]}"; do
CUR_VERSION=$("$BASE/tools/plugin-version.sh" "$PLUGIN")
# shellcheck disable=SC2310
if version_compare "$CUR_VERSION" "$NORMALIZED_VERSION"; then
proceed_p "$PLUGIN: Version $NORMALIZED_VERSION is lower than $CUR_VERSION." || die "User aborted script."
proceed_p "$PLUGIN: Version $NORMALIZED_VERSION is not higher than $CUR_VERSION." || die "User aborted script."
fi
echo "$PLUGIN: $CUR_VERSION -> ${PROJECTS[$PLUGIN]}"
done
Expand Down
Loading