Merge pull request #6739 from AndrewKvalheim/plugins/git/sync/annotated-tag
Dereference annotated tags
This commit is contained in:
2 files changed
+25
-1
No files matched your search
@@ -457,7 +457,7 @@ fn-git-fetch() {
|
|||||||
GIT_TERMINAL_PROMPT=0 fn-git-cmd "$APP_ROOT" fetch --update-head-ok remote "$DOKKU_DEPLOY_BRANCH"
|
GIT_TERMINAL_PROMPT=0 fn-git-cmd "$APP_ROOT" fetch --update-head-ok remote "$DOKKU_DEPLOY_BRANCH"
|
||||||
else
|
else
|
||||||
GIT_TERMINAL_PROMPT=0 fn-git-cmd "$APP_ROOT" fetch --update-head-ok remote
|
GIT_TERMINAL_PROMPT=0 fn-git-cmd "$APP_ROOT" fetch --update-head-ok remote
|
||||||
fn-git-cmd "$APP_ROOT" update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF"
|
fn-git-cmd "$APP_ROOT" update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF^{commit}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fn-git-cmd "$APP_ROOT" config --add core.bare true
|
fn-git-cmd "$APP_ROOT" config --add core.bare true
|
||||||
|
|||||||
@@ -378,6 +378,30 @@ teardown() {
|
|||||||
assert_output_contains "$SMOKE_TEST_APP_2_0_0_SHA"
|
assert_output_contains "$SMOKE_TEST_APP_2_0_0_SHA"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(git) git:sync existing [--no-build annotated-tag]" {
|
||||||
|
run /bin/bash -c "dokku git:sync $TEST_APP https://github.com/dokku/smoke-test-app.git 1.0.0"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run /bin/bash -c "cat /home/dokku/$TEST_APP/refs/heads/master"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
assert_output_contains "$SMOKE_TEST_APP_1_0_0_SHA"
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku git:sync $TEST_APP https://github.com/dokku/smoke-test-app.git 2.0.0-annotated"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run /bin/bash -c "cat /home/dokku/$TEST_APP/refs/heads/master"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
assert_output_contains "$SMOKE_TEST_APP_2_0_0_SHA"
|
||||||
|
}
|
||||||
|
|
||||||
@test "(git) git:sync existing [--no-build commit]" {
|
@test "(git) git:sync existing [--no-build commit]" {
|
||||||
run /bin/bash -c "dokku git:sync $TEST_APP https://github.com/dokku/smoke-test-app.git 1.0.0"
|
run /bin/bash -c "dokku git:sync $TEST_APP https://github.com/dokku/smoke-test-app.git 1.0.0"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
|
|||||||
Reference in new issue
Block a user