forked from kubernetes-sigs/kustomize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.sh
35 lines (30 loc) · 743 Bytes
/
helpers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
# Copyright 2022 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
function createBranch {
branch=$1
title=$2
echo "Making branch $branch : \"$title\""
git branch -D $branch # delete if it exists
git checkout -b $branch
git commit -a -m "$title"
git push -f origin $branch
}
function createPr {
gh pr create --title "$title" --body "ALLOW_MODULE_SPAN" --base master
}
function refreshMaster {
git checkout master
git fetch upstream
git rebase upstream/master
}
function testKustomizeRepo {
make IS_LOCAL=true verify-kustomize-repo >& /tmp/k.txt
local code=$?
if [ $code -ne 0 ]; then
echo "**** FAILURE ******************"
tail /tmp/k.txt
else
echo "LGTM"
fi
}