Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ jobs:
PKG_VERSION=$(node -p "require('./package.json').version")
CLASS_VERSION=$(grep -oP "const VERSION = '\K[^']+" inc/class-wp-ultimo.php)

# Composer drops VCS tags whose composer.json "version" disagrees with the tag (GH#2158).
if jq -e 'has("version")' composer.json > /dev/null; then
echo "Error: composer.json must not declare a version key; Composer derives it from the tag."
exit 1
fi

echo "Tag version: ${{ env.VERSION }}"
echo "Plugin header: $WP_VERSION"
echo "readme.txt Stable tag: $README_VERSION"
Expand Down
7 changes: 2 additions & 5 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euo pipefail
# bin/deploy.sh 2.4.6-beta.1 (pre-release)
#
# This script:
# 1) Updates versions in plugin header, WP_Ultimo::VERSION, composer.json, package.json
# 1) Updates versions in plugin header, WP_Ultimo::VERSION, package.json
# (and readme.txt Stable tag for stable releases only)
# For stable releases, also replaces `@since n.e.x.t` placeholders (and the other
# forms handled by bin/replace-next-version.sh) with the release version
Expand Down Expand Up @@ -125,9 +125,6 @@ update_versions() {
# WP_Ultimo const VERSION
sed -i.bak -E "s/(const VERSION = ')[^']+(';)/\\1$VERSION\\2/" inc/class-wp-ultimo.php

# composer.json version
sed -i.bak -E '0,/"version"[[:space:]]*:[[:space:]]*"[^"]+"/ s//"version": '"\"$VERSION\""'/' composer.json

# package.json version
sed -i.bak -E '0,/"version"[[:space:]]*:[[:space:]]*"[^"]+"/ s//"version": '"\"$VERSION\""'/' package.json

Expand All @@ -136,7 +133,7 @@ update_versions() {
printf '%s\n' "$VERSION" > VERSION
fi

rm -f readme.txt.bak ultimate-multisite.php.bak inc/class-wp-ultimo.php.bak composer.json.bak package.json.bak
rm -f readme.txt.bak ultimate-multisite.php.bak inc/class-wp-ultimo.php.bak package.json.bak

# `@since n.e.x.t` -> `@since $VERSION`. Pre-releases keep the placeholder:
# the code ships in the final X.Y.Z, not in the beta.
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "ultimate-multisite/ultimate-multisite",
"homepage": "https://UltimateMultisite.com",
"description": "The Multisite Website as a Service (WaaS) plugin.",
"version": "2.18.0",
"authors": [
{
"name": "Arindo Duque",
Expand Down
Loading