Skip to content

Commit

Permalink
Add argument to tag-porting script for specifying git remote repo to …
Browse files Browse the repository at this point in the history
…push tags to

- Input arguments for the script are now `package_name`, `remote`, `release_commits_regex` in that order.
  • Loading branch information
MajorLift committed Oct 18, 2023
1 parent b8f41b6 commit 1cde98c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/migrate-tags.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env bash

package_name="$1"
release_commits_regex=${2:-'^\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}'}
remote=${2:-'origin'}
release_commits_regex=${3:-'^\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}'}

get-version-commit-pairs() {
for log in "$(git log --oneline --grep $release_commits_regex merged-packages/$package_name)"; do
Expand All @@ -22,5 +23,5 @@ for pair in "$tag_commit_pairs"; do
done

for pair in "$tag_commit_pairs"; do
echo "$pair" | cut -d' ' -f1 | xargs -n 1 bash -c 'git push origin "$0"'
echo "$pair" | cut -d' ' -f1 | xargs -n 1 bash -c 'git push '"$remote"' "$0"'
done

0 comments on commit 1cde98c

Please sign in to comment.