Skip to content

Add options out parameter. #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ and the `rebase` parameter is not provided, the push will fail.

* `only_tag`: *Optional.* When set to 'true' push only the tags of a repo.

* `options`: *Optional.* When not null, add it to the
[`--push-options`](https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt).

* `tag_prefix`: *Optional.* If specified, the tag read from the file will be
prepended with this string. This is useful for adding `v` in front of
version numbers.
Expand Down
7 changes: 4 additions & 3 deletions assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ merge=$(jq -r '.params.merge // false' <<< "$payload")
returning=$(jq -r '.params.returning // "merged"' <<< "$payload")
force=$(jq -r '.params.force // false' <<< "$payload")
only_tag=$(jq -r '.params.only_tag // false' <<< "$payload")
options=$(jq -r '.params.options // ""' <<< "$payload")
annotation_file=$(jq -r '.params.annotate // ""' <<< "$payload")
notes_file=$(jq -r '.params.notes // ""' <<< "$payload")
override_branch=$(jq -r '.params.branch // ""' <<< "$payload")
Expand Down Expand Up @@ -105,17 +106,17 @@ tag() {
}

push_src_and_tags() {
git push --tags push-target HEAD:$refs_prefix/$branch $forceflag
git push ${options:+--push-options=${options}} --tags push-target HEAD:$refs_prefix/$branch $forceflag
}

push_tags() {
git push --tags push-target $forceflag
git push ${options:+--push-options=${options}} --tags push-target $forceflag
}

add_and_push_notes() {
if [ -n "$notes_file" ]; then
git notes add -F "../${notes_file}"
git push push-target refs/notes/*
git push ${options:+--push-options=${options}} push-target refs/notes/*
fi
}

Expand Down