fix: always set the git rev env var when building an app via git:sync
Closes #6827
This commit is contained in:
@@ -235,10 +235,11 @@ cmd-git-sync() {
|
|||||||
if [[ "$SHOULD_BUILD" == "true" ]]; then
|
if [[ "$SHOULD_BUILD" == "true" ]]; then
|
||||||
if [[ -n "$GIT_REF" ]]; then
|
if [[ -n "$GIT_REF" ]]; then
|
||||||
GIT_REF="$(fn-git-cmd "$APP_ROOT" rev-parse "$GIT_REF")"
|
GIT_REF="$(fn-git-cmd "$APP_ROOT" rev-parse "$GIT_REF")"
|
||||||
plugn trigger receive-app "$APP" "$GIT_REF"
|
|
||||||
else
|
else
|
||||||
plugn trigger receive-app "$APP"
|
GIT_REF="$UPDATED_REF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
plugn trigger receive-app "$APP" "$GIT_REF"
|
||||||
plugn trigger deploy-source-set "$APP" "git-sync" "${GIT_REMOTE}#${GIT_REF}"
|
plugn trigger deploy-source-set "$APP" "git-sync" "${GIT_REMOTE}#${GIT_REF}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,11 @@ teardown() {
|
|||||||
assert_success
|
assert_success
|
||||||
assert_output_contains "Application deployed"
|
assert_output_contains "Application deployed"
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku config:get $TEST_APP GIT_REV"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_output_exists
|
||||||
|
|
||||||
run /bin/bash -c "cat /home/dokku/$TEST_APP/refs/heads/master"
|
run /bin/bash -c "cat /home/dokku/$TEST_APP/refs/heads/master"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
|
|||||||
Reference in New Issue
Block a user