Skip to content

Commit 306f84a

Browse files
author
Romain Dartigues
committed
1 parent 2745592 commit 306f84a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ and the `rebase` parameter is not provided, the push will fail.
322322

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

325+
* `options`: *Optional.* When not null, add it to the
326+
[`--push-options`](https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt).
327+
325328
* `tag_prefix`: *Optional.* If specified, the tag read from the file will be
326329
prepended with this string. This is useful for adding `v` in front of
327330
version numbers.

assets/out

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ merge=$(jq -r '.params.merge // false' <<< "$payload")
3636
returning=$(jq -r '.params.returning // "merged"' <<< "$payload")
3737
force=$(jq -r '.params.force // false' <<< "$payload")
3838
only_tag=$(jq -r '.params.only_tag // false' <<< "$payload")
39+
options=$(jq -r '.params.options // ""' <<< "$payload")
3940
annotation_file=$(jq -r '.params.annotate // ""' <<< "$payload")
4041
notes_file=$(jq -r '.params.notes // ""' <<< "$payload")
4142
override_branch=$(jq -r '.params.branch // ""' <<< "$payload")
@@ -105,17 +106,17 @@ tag() {
105106
}
106107

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

111112
push_tags() {
112-
git push --tags push-target $forceflag
113+
git push ${options:+--push-options=${options}} --tags push-target $forceflag
113114
}
114115

115116
add_and_push_notes() {
116117
if [ -n "$notes_file" ]; then
117118
git notes add -F "../${notes_file}"
118-
git push push-target refs/notes/*
119+
git push ${options:+--push-options=${options}} push-target refs/notes/*
119120
fi
120121
}
121122

0 commit comments

Comments
 (0)