Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
Check for dirty git
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed May 14, 2019
1 parent dde4459 commit 1589ad1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ trash-keep: .dapper

deps: trash

.DEFAULT_GOAL := ci
.DEFAULT_GOAL := default

.PHONY: $(TARGETS)
1 change: 1 addition & 0 deletions scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ cd $(dirname $0)
./build
./test
./validate
./validate-ci
./package
9 changes: 9 additions & 0 deletions scripts/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

cd $(dirname $0)

./build
./test
./validate
./package
3 changes: 0 additions & 3 deletions scripts/validate
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ golangci-lint run

echo Running: go fmt
test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)"

echo Running: go mod verify
go mod verify
15 changes: 15 additions & 0 deletions scripts/validate-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e

cd $(dirname $0)/..

go generate

source ./scripts/version

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

0 comments on commit 1589ad1

Please sign in to comment.