OVMS3-idf/tools/ci/push_to_github.sh
Ivan Grokhotkov e94288da31 global: use '/usr/bin/env bash' instead of '/usr/bin/bash' in shebangs
Using the method from @cemeyer
(https://github.com/espressif/esp-idf/pull/3166):

find . -name \*.sh -exec sed -i "" -e 's|^#!.*bin/bash|#!/usr/bin/env bash|' {} +

Closes https://github.com/espressif/esp-idf/pull/3166.
2020-04-03 01:10:02 +02:00

15 lines
297 B
Bash
Executable file

#!/usr/bin/env bash
# gitlab-ci script to push current tested revision (tag or branch) to github
set -ex
if [ -n "${CI_COMMIT_TAG}" ]; then
# for tags
git push github "${CI_COMMIT_TAG}"
else
# for branches
git push github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
fi