codrut.pro
  • CV
  • Projects
  • Snippets
  • Tags
  • More

Check for Git differences in CI

May 3, 2022 One-minute read
git • CI • linux

The command is:

git diff --exit-code

Prints the diff and exits with status code 1.

CI Link to heading

generate:
  image: ruby:3.1.2-alpine
  script:
    - apk add --update git make
    - make generate
    - git diff --exit-code