mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 03:42:09 +00:00
gha: fix git-helper issues reported by shellcheck
./tests/git-helper.sh:20:5: note: Prefer [[ ]] over [ ] for tests in Bash/Ksh. [SC2292] ./tests/git-helper.sh:22:26: note: Double quote to prevent globbing and word splitting. [SC2086] ./tests/git-helper.sh:23:7: note: Prefer [[ ]] over [ ] for tests in Bash/Ksh. [SC2292] Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
parent
04adcdace6
commit
7b63f256e5
@ -17,10 +17,10 @@ function add_kata_bot_info() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function rebase_atop_of_the_latest_target_branch() {
|
function rebase_atop_of_the_latest_target_branch() {
|
||||||
if [ -n "${TARGET_BRANCH}" ]; then
|
if [[ -n "${TARGET_BRANCH}" ]]; then
|
||||||
echo "Rebasing atop of the latest ${TARGET_BRANCH}"
|
echo "Rebasing atop of the latest ${TARGET_BRANCH}"
|
||||||
if ! git rebase origin/${TARGET_BRANCH}; then
|
if ! git rebase "origin/${TARGET_BRANCH}"; then
|
||||||
if [ -n "${GITHUB_WORKSPACE}" ] ; then
|
if [[ -n "${GITHUB_WORKSPACE}" ]] ; then
|
||||||
echo "Rebase failed, cleaning up the local repository and exiting"
|
echo "Rebase failed, cleaning up the local repository and exiting"
|
||||||
cd "${GITHUB_WORKSPACE}"/..
|
cd "${GITHUB_WORKSPACE}"/..
|
||||||
sudo rm -rf "${GITHUB_WORKSPACE}"
|
sudo rm -rf "${GITHUB_WORKSPACE}"
|
||||||
|
Loading…
Reference in New Issue
Block a user