Skip to content
Permalink
Browse files

implemented 'make git-tag-push-latest' - git push most recent git tag…

…. (Environment variable make_git_tag_push_targets, that defaults to 'origin'.) - https://phabricator.whonix.org/T292
  • Loading branch information...
adrelanos committed May 1, 2015
1 parent 78d6ed8 commit 472850c285714a080316778296dda4aefd2b06c6
Showing with 23 additions and 2 deletions.
  1. +20 −2 usr/share/genmkfile/make-helper.bsh
  2. +3 −0 usr/share/genmkfile/makefile-full
@@ -254,6 +254,12 @@ make_parse_cmd() {
exit 0
shift
;;
git-tag-push-latest)
matched="true"
make_function_run make_git_tag_push_latest
exit 0
shift
;;
reprepro-add)
matched="true"
make_function_run make_reprepro-add
@@ -474,7 +480,9 @@ make git-commit-verify
make git-verify
Combination of tag-check and commit-verify. Only a repository sanity check. Not for security purposes!
make git-tag-push
git push repositories (Environment variable make_git_tag_push_targets, that defaults to 'origin'.)
git push latest pkg_version_with_revision from debian/changelog. (Environment variable make_git_tag_push_targets, that defaults to 'origin'.)
make git-tag-push-latest
git push most recent git tag. (Environment variable make_git_tag_push_targets, that defaults to 'origin'.)
make reprepro-add
Add main deb package using reprepro wrapper (Environment variable make_reprepro_wrapper, that default to 'reprepro'.)
to repository (Environment variable make_reprepro_codename, that defaults to 'developers'.)."
@@ -938,6 +946,7 @@ make_git_tag_shared() {
return 0
fi
make_function_run make_get_variables
[ -n "$make_git_tag_push_targets" ] || make_git_tag_push_targets="origin"
command -v git >/dev/null
make_git_tag_shared_done="true"
}
@@ -1018,13 +1027,22 @@ make_git_verify() {

make_git_tag_push() {
make_function_run make_git_tag_shared
[ -n "$make_git_tag_push_targets" ] || make_git_tag_push_targets="origin"
local repository
for repository in $make_git_tag_push_targets; do
git push "$repository" "$make_pkg_version_with_revision"
done
}

make_git_tag_push_latest() {
make_function_run make_git_tag_shared
## Thanks to kilianc - http://stackoverflow.com/a/7979255/2605155
make_git_tag_latest="$(git describe --tags $(git rev-list --tags --max-count=1))"
local repository
for repository in $make_git_tag_push_targets; do
git push "$repository" "$make_git_tag_latest"
done
}

make_reprepro-add() {
make_function_run make_get_variables
test -f "$make_main_deb_file"
@@ -127,6 +127,9 @@ git-verify:
git-tag-push:
$(GENMKFILE_PATH)/make-helper.bsh git-tag-push

git-tag-push:
$(GENMKFILE_PATH)/make-helper.bsh git-tag-push-latest

reprepro-add:
$(GENMKFILE_PATH)/make-helper.bsh reprepro-add

0 comments on commit 472850c

Please sign in to comment.
You can’t perform that action at this time.