Skip to content

Commit e327930

Browse files
committed
adjust scripts to fix CI
1 parent 59579c9 commit e327930

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

scripts/validate-ci

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
#!/bin/bash
22
set -e
33

4+
source $(dirname $0)/version
45
cd $(dirname $0)/..
56

7+
echo "[validate-ci] starting to validate"
68
echo "Running go mod tidy"
79
go mod tidy
810

911
echo "Running go mod verify"
1012
go mod verify
1113

12-
echo "Verifying code is generated and repo is clean"
13-
go generate
14-
15-
source ./scripts/version
14+
if [ -f "generate.go" ]; then
15+
echo "Verifying code is generated and repo is clean"
16+
go generate
17+
fi
1618

1719
if [ -n "$DIRTY" ]; then
1820
echo Git is dirty
1921
git status
2022
git diff
2123
exit 1
2224
fi
25+
26+
echo "[validate-ci] success"

scripts/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
set -x
32

43
CHARTS_BUILD_SCRIPTS_REPO=https://github.com/rancher/charts-build-scripts.git
54
CHARTS_BUILD_SCRIPT_VERSION=v0.9.2
@@ -44,6 +43,7 @@ fi
4443
IMAGE=${IMAGE:-"$REPO/${BUILD_TARGET}:${TAG}"}
4544

4645
function print_version_debug() {
46+
echo "DIRTY: $DIRTY"
4747
echo "BUILD_TARGET: $BUILD_TARGET";
4848
echo "SUFFIX: $SUFFIX";
4949
echo "HELM_IMAGE_TAG: $HELM_IMAGE_TAG";

0 commit comments

Comments
 (0)