v-wordpress-plugin-updater/vendor/php-stubs/wp-cli-stubs/release.sh
nikolai@vontainment.com afe656c55b modified: .gitignore
modified:   composer.lock
	modified:   mu-plugin/v-sys-plugin-updater-mu.php
	modified:   mu-plugin/v-sys-plugin-updater.php
	modified:   mu-plugin/v-sys-theme-updater-mu.php
	modified:   mu-plugin/v-sys-theme-updater.php
	modified:   tests/ApiKeyHelperTest.php
	modified:   update-api/app/Controllers/ApiController.php
	modified:   update-api/app/Controllers/HomeController.php
	deleted:    update-api/app/Controllers/KeyController.php
	modified:   update-api/app/Core/Router.php
	modified:   update-api/app/Models/HostsModel.php
	modified:   update-api/config.php
	modified:   update-api/public/install.php
	deleted:    update-api/storage/test.sqlite
2025-10-20 06:55:25 -04:00

27 lines
826 B
Bash

#!/usr/bin/env bash
set -e
for V in 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.9.0 2.10.0 \
2.11.0 2.12.0; do
echo "Releasing version ${V} ..."
if git rev-parse "refs/tags/v${V}" >/dev/null 2>&1; then
echo "Tag exists!"
continue;
fi
# Get composer.lock from wp-cli/wp-cli-bundle
wget -nv -O "source/composer.lock" "https://github.com/wp-cli/wp-cli-bundle/raw/v${V}/composer.lock"
printf -v SED_EXP 's#\\("version"\\): "[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+"#\\1: "%s"#' "${V}"
sed -i -e "$SED_EXP" source/composer.json
composer --working-dir=source/ install --no-interaction --no-dev
# Generate stubs
echo "Generating stubs ..."
./generate.sh
# Tag version
git commit --all -m "Generate stubs for WP-CLI ${V}"
git tag "v${V}"
done