Changeset 3447652
- Timestamp:
- 01/27/2026 09:13:25 AM (2 months ago)
- Location:
- simple-block-animations/trunk
- Files:
-
- 3 edited
-
bin/deploy-to-svn.sh (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
simple-block-animations.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-block-animations/trunk/bin/deploy-to-svn.sh
r3418495 r3447652 19 19 PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" 20 20 21 # Get version from main plugin file22 VERSION=$(grep -i "Version:" "$PLUGIN_DIR"/*.php | head -1 | awk '{print $3}')23 24 if [ -z "$ VERSION" ]; then21 # Get current version from main plugin file 22 CURRENT_VERSION=$(grep -i "Version:" "$PLUGIN_DIR"/*.php | head -1 | awk '{print $3}') 23 24 if [ -z "$CURRENT_VERSION" ]; then 25 25 echo "❌ Error: Could not determine plugin version" 26 26 exit 1 27 27 fi 28 28 29 echo "🚀 Deploying $PLUGIN_SLUG v$VERSION" 29 echo "📌 Current version: $CURRENT_VERSION" 30 echo "" 31 echo "Select release type:" 32 echo " 1) Patch (bug fix) - e.g., $CURRENT_VERSION → $(echo $CURRENT_VERSION | awk -F. '{print $1"."$2"."$3+1}')" 33 echo " 2) Minor (new feature) - e.g., $CURRENT_VERSION → $(echo $CURRENT_VERSION | awk -F. '{print $1"."$2+1".0"}')" 34 echo " 3) Major (breaking) - e.g., $CURRENT_VERSION → $(echo $CURRENT_VERSION | awk -F. '{print $1+1".0.0"}')" 35 echo " 4) Custom version" 36 echo " 5) Use current version ($CURRENT_VERSION)" 37 echo "" 38 read -p "Enter choice (1-5): " -n 1 -r RELEASE_TYPE 39 echo 40 echo 41 42 case $RELEASE_TYPE in 43 1) 44 # Patch: increment last digit (1.0.1 → 1.0.2) 45 VERSION=$(echo $CURRENT_VERSION | awk -F. '{print $1"."$2"."$3+1}') 46 RELEASE_NAME="Patch" 47 ;; 48 2) 49 # Minor: increment middle digit, reset last (1.0.1 → 1.1.0) 50 VERSION=$(echo $CURRENT_VERSION | awk -F. '{print $1"."$2+1".0"}') 51 RELEASE_NAME="Minor" 52 ;; 53 3) 54 # Major: increment first digit, reset others (1.0.1 → 2.0.0) 55 VERSION=$(echo $CURRENT_VERSION | awk -F. '{print $1+1".0.0"}') 56 RELEASE_NAME="Major" 57 ;; 58 4) 59 # Custom version 60 read -p "Enter custom version (e.g., 1.2.3): " VERSION 61 RELEASE_NAME="Custom" 62 ;; 63 5) 64 # Keep current version 65 VERSION=$CURRENT_VERSION 66 RELEASE_NAME="Current" 67 ;; 68 *) 69 echo "❌ Invalid choice. Exiting." 70 exit 1 71 ;; 72 esac 73 74 echo "🚀 Deploying $PLUGIN_SLUG v$VERSION ($RELEASE_NAME release)" 75 76 # Function to update version in plugin file 77 update_version_in_file() { 78 local file="$1" 79 local new_version="$2" 80 81 # Update Version header 82 sed -i "s/Version:.*$/Version: $new_version/" "$file" 83 84 # Update version constant if it exists 85 sed -i "s/define( 'SIMPBLAN_VERSION', '[^']*' );/define( 'SIMPBLAN_VERSION', '$new_version' );/" "$file" 86 87 echo "✅ Updated version in $file" 88 } 89 90 # Update version in main plugin file if version changed 91 if [ "$VERSION" != "$CURRENT_VERSION" ]; then 92 echo "📝 Updating version in plugin file..." 93 MAIN_FILE=$(find "$PLUGIN_DIR" -maxdepth 1 -name "*.php" -type f | head -1) 94 update_version_in_file "$MAIN_FILE" "$VERSION" 95 96 # Update readme.txt stable tag if it exists 97 if [ -f "$PLUGIN_DIR/readme.txt" ]; then 98 sed -i "s/^Stable tag:.*$/Stable tag: $VERSION/" "$PLUGIN_DIR/readme.txt" 99 echo "✅ Updated stable tag in readme.txt" 100 fi 101 fi 30 102 31 103 # Build the project … … 121 193 # Check if tag already exists 122 194 if svn ls "$SVN_URL/tags/$VERSION" > /dev/null 2>&1; then 123 echo "⚠️ Tag $VERSION already exists" 124 read -p "Delete and recreate tag? (y/n) " -n 1 -r 195 echo "" 196 echo "⚠️ Tag $VERSION already exists in repository!" 197 echo "This usually means the version was already released." 198 echo "" 199 echo "Options:" 200 echo " 1) Skip tag creation (trunk updated only)" 201 echo " 2) Delete and recreate tag (⚠️ use with caution)" 202 echo " 3) Cancel deployment" 203 echo "" 204 read -p "Enter choice (1-3): " -n 1 -r TAG_CHOICE 125 205 echo 126 if [[ $REPLY =~ ^[Yy]$ ]]; then 127 echo "🗑️ Removing existing tag..." 128 svn rm "$SVN_URL/tags/$VERSION" -m "Removing tag $VERSION for recreation" 129 else 130 echo "✅ Trunk updated, skipping tag creation" 131 exit 0 132 fi 206 207 case $TAG_CHOICE in 208 1) 209 echo "✅ Trunk updated, skipping tag creation" 210 exit 0 211 ;; 212 2) 213 echo "🗑️ Removing existing tag..." 214 svn rm "$SVN_URL/tags/$VERSION" -m "Removing tag $VERSION for recreation" 215 ;; 216 3) 217 echo "❌ Deployment cancelled" 218 exit 1 219 ;; 220 *) 221 echo "❌ Invalid choice. Deployment cancelled." 222 exit 1 223 ;; 224 esac 133 225 fi 134 226 135 227 # Create tag from trunk URL (not local trunk) 136 228 echo "🏷️ Creating tag $VERSION..." 137 svn cp "$SVN_URL/trunk" "$SVN_URL/tags/$VERSION" -m "Tagging version $VERSION" 138 139 echo "✅ Deployment completed!" 229 svn cp "$SVN_URL/trunk" "$SVN_URL/tags/$VERSION" -m "Tagging version $VERSION - $RELEASE_NAME release" 230 231 echo "" 232 echo "✅ Deployment completed successfully!" 233 echo "" 234 echo "📦 Summary:" 235 echo " Plugin: $PLUGIN_SLUG" 236 echo " Version: $CURRENT_VERSION → $VERSION" 237 echo " Release Type: $RELEASE_NAME" 238 echo " SVN Tag: $SVN_URL/tags/$VERSION" 239 echo "" 140 240 else 141 241 echo "❌ Deployment cancelled" -
simple-block-animations/trunk/readme.txt
r3447648 r3447652 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1. 0.17 Stable tag: 1.1.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
simple-block-animations/trunk/simple-block-animations.php
r3447648 r3447652 5 5 * Plugin URI: https://github.com/valentin-grenier/simple-animations-for-gutenberg 6 6 * Description: Easily add animations to your Gutenberg blocks without coding. 7 * Version: 1. 0.17 * Version: 1.1.0 8 8 * Requires at least: 9 9 * Requires PHP: … … 22 22 } 23 23 24 define( 'SIMPBLAN_VERSION', '1. 0.1' );24 define( 'SIMPBLAN_VERSION', '1.1.0' ); 25 25 define( 'SIMPBLAN_PATH', plugin_dir_path( __FILE__ ) ); 26 26 define( 'SIMPBLAN_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.