Skip to content

Instantly share code, notes, and snippets.

@roberto-filho
Last active May 21, 2016 03:54
Show Gist options
  • Save roberto-filho/c5a0c317ebd1106307126919de557e13 to your computer and use it in GitHub Desktop.
Save roberto-filho/c5a0c317ebd1106307126919de557e13 to your computer and use it in GitHub Desktop.
Comando para subir a versão dos pom.xmls e dos XMLs
#!/bin/bash
# Pega as versões da linha de comando
old=$1
new=$2
# Executa o comando que faz a substituição do conteúdo dos arquivos
## <version>2.0.0</version>
## version="2.0.0"
sed -e "s/<version>$old<\/version>/<version>$new<\/version>/" \
-e "s/version=\"$old\"/version=\"$new\"/" \
-e "s/Bundle-Version: $old/Bundle-Version: $new/" \
-i $(grep -Ilr --exclude="*\.git*" "$old" *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment