Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

13 linhas
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