Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -euo pipefail
- #
- # Bump version
- #
- old=v1alpha1
- new=v1beta1
- replace() {
- for target in "pkg config test docs"; do
- find $target -type f | xargs -n1 sed -i "s|$old|$new|g"
- done
- }
- rename() {
- while read x; do
- mv $x $(sed "s|$old|$new|" <<< $x)
- done < <(find . -name "*$old*" -not -path "./vendor/*" -not -path "./.git/*")
- }
- replace
- rename
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement