Skip to content

Commit

Permalink
adjust scripts to fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mallardduck committed Oct 10, 2024
1 parent 59579c9 commit e327930
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions scripts/validate-ci
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
#!/bin/bash
set -e

source $(dirname $0)/version
cd $(dirname $0)/..

echo "[validate-ci] starting to validate"
echo "Running go mod tidy"
go mod tidy

echo "Running go mod verify"
go mod verify

echo "Verifying code is generated and repo is clean"
go generate

source ./scripts/version
if [ -f "generate.go" ]; then
echo "Verifying code is generated and repo is clean"
go generate
fi

if [ -n "$DIRTY" ]; then
echo Git is dirty
git status
git diff
exit 1
fi

echo "[validate-ci] success"
2 changes: 1 addition & 1 deletion scripts/version
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
set -x

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

function print_version_debug() {
echo "DIRTY: $DIRTY"
echo "BUILD_TARGET: $BUILD_TARGET";
echo "SUFFIX: $SUFFIX";
echo "HELM_IMAGE_TAG: $HELM_IMAGE_TAG";
Expand Down

0 comments on commit e327930

Please sign in to comment.