You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 rivejä
587 B

  1. #!/usr/bin/env bash
  2. GIT_ROOT=$(git rev-parse --show-toplevel)
  3. CURRENT_DIR=$PWD
  4. cd $GIT_ROOT
  5. echo Updating version to $1
  6. sed -E -i.bak "s/\"version\": \"[0-9]\.[0-9]\.[0-9]+\"/\"version\": \"$1\"/" composer.json
  7. grep -HEo "\"version\": \"[0-9]\.[0-9]\.[0-9]+\"" composer.json
  8. sed -E -i.bak "s/const VERSION = \"[0-9]\.[0-9]\.[0-9]+\"/const VERSION = \"$1\"/" src/Cloudinary.php
  9. grep -HEo "const VERSION = \"[0-9]\.[0-9]\.[0-9]+\"" src/Cloudinary.php
  10. git add composer.json src/Cloudinary.php CHANGELOG.md
  11. git commit -m "Version $1"
  12. git tag -a $1 -m "Version $1"
  13. cd $CURRENT_DIR