Plugin Directory

Changeset 3447652


Ignore:
Timestamp:
01/27/2026 09:13:25 AM (2 months ago)
Author:
valentingrenier
Message:

Update trunk to version 1.1.0

Location:
simple-block-animations/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • simple-block-animations/trunk/bin/deploy-to-svn.sh

    r3418495 r3447652  
    1919PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
    2020
    21 # Get version from main plugin file
    22 VERSION=$(grep -i "Version:" "$PLUGIN_DIR"/*.php | head -1 | awk '{print $3}')
    23 
    24 if [ -z "$VERSION" ]; then
     21# Get current version from main plugin file
     22CURRENT_VERSION=$(grep -i "Version:" "$PLUGIN_DIR"/*.php | head -1 | awk '{print $3}')
     23
     24if [ -z "$CURRENT_VERSION" ]; then
    2525    echo "❌ Error: Could not determine plugin version"
    2626    exit 1
    2727fi
    2828
    29 echo "🚀 Deploying $PLUGIN_SLUG v$VERSION"
     29echo "📌 Current version: $CURRENT_VERSION"
     30echo ""
     31echo "Select release type:"
     32echo "  1) Patch (bug fix)     - e.g., $CURRENT_VERSION → $(echo $CURRENT_VERSION | awk -F. '{print $1"."$2"."$3+1}')"
     33echo "  2) Minor (new feature) - e.g., $CURRENT_VERSION → $(echo $CURRENT_VERSION | awk -F. '{print $1"."$2+1".0"}')"
     34echo "  3) Major (breaking)    - e.g., $CURRENT_VERSION → $(echo $CURRENT_VERSION | awk -F. '{print $1+1".0.0"}')"
     35echo "  4) Custom version"
     36echo "  5) Use current version ($CURRENT_VERSION)"
     37echo ""
     38read -p "Enter choice (1-5): " -n 1 -r RELEASE_TYPE
     39echo
     40echo
     41
     42case $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        ;;
     72esac
     73
     74echo "🚀 Deploying $PLUGIN_SLUG v$VERSION ($RELEASE_NAME release)"
     75
     76# Function to update version in plugin file
     77update_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
     91if [ "$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
     101fi
    30102
    31103# Build the project
     
    121193    # Check if tag already exists
    122194    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
    125205        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
    133225    fi
    134226   
    135227    # Create tag from trunk URL (not local trunk)
    136228    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 ""
    140240else
    141241    echo "❌ Deployment cancelled"
  • simple-block-animations/trunk/readme.txt

    r3447648 r3447652  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.1.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • simple-block-animations/trunk/simple-block-animations.php

    r3447648 r3447652  
    55 * Plugin URI: https://github.com/valentin-grenier/simple-animations-for-gutenberg
    66 * Description: Easily add animations to your Gutenberg blocks without coding.
    7  * Version: 1.0.1
     7 * Version: 1.1.0
    88 * Requires at least:
    99 * Requires PHP:
     
    2222}
    2323
    24 define( 'SIMPBLAN_VERSION', '1.0.1' );
     24define( 'SIMPBLAN_VERSION', '1.1.0' );
    2525define( 'SIMPBLAN_PATH', plugin_dir_path( __FILE__ ) );
    2626define( 'SIMPBLAN_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.