Skip to content

Commit

Permalink
chore(ci): prohibit the build causes source changes (aws#3508)
Browse files Browse the repository at this point in the history
* chore(ci): prohibit the build causes source changes

Verify that the build process does not cause changes in git tracked
files.

Fixes aws#3451

* correctly detect untracked files, too

* Update .travis.yml

* make it propper!

* add missing lockfile
  • Loading branch information
RomainMuller authored and mergify[bot] committed Aug 12, 2019
1 parent 8ac7389 commit 9f1bfae
Show file tree
Hide file tree
Showing 4 changed files with 34,297 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ cache:
- pip

install: ./install.sh
script: ./build.sh

script:
- ./build.sh
- git update-index --refresh
- git diff-index --exit-code --stat HEAD
- untracked=$(git ls-files --others --exclude-standard) && echo "${untracked}" && test -z "${untracked}"
2 changes: 1 addition & 1 deletion buildspec-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ phases:
- /bin/bash ./install.sh
build:
commands:
- /bin/bash ./build.sh
- /bin/bash ./build.sh && git diff-index --exit-code --ignore-space-at-eol --stat HEAD
2 changes: 1 addition & 1 deletion buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ phases:
- /bin/bash ./fetch-dotnet-snk.sh
build:
commands:
- /bin/bash ./build.sh
- /bin/bash ./build.sh && git diff-index --exit-code --ignore-space-at-eol --stat HEAD
post_build:
commands:
- "[ -f .BUILD_COMPLETED ] && /bin/bash ./pack.sh"
Expand Down
Loading

0 comments on commit 9f1bfae

Please sign in to comment.