mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 02:10:45 -06:00
0fe200ce41
* Add file blacklist to `grafana-cli cue gen-ts` cmd * Add CI step checking all cuetsification is done * Add dummy command to make the next one fail * Generate drone bits * Check diff output failure * Echo list of untracked files, for failure locality * Move git cleanness checking into script * Blacklist of cue files is complete and correct * Remove news panel plugin from cuetsify blacklist * Dummy commit, check that untracked gen still fail * Tie off remaining errors * Re-add barchart to blacklist * Remove file left around by earlier pipeline * Commit generated news models.gen.ts * Include eslint as part of cuetsified output gen * Update pkg/cmd/grafana-cli/commands/cuetsify_command.go Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com> * Update scripts/drone/steps/lib.star Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com> * Update drone.yml * Last fix on .drone.yml Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com> Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
27 lines
795 B
Bash
Executable File
27 lines
795 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Checks that a git working tree is clean. Exit 0 if it is, or exit 1 with a list of
|
|
# dirty files - including modifications, removals, and untracked+unignored files.
|
|
|
|
# Primarily intended for ensuring in CI that codegen operations are a no-op/have
|
|
# already been performed.
|
|
|
|
STAT="$(git status --porcelain 2>/dev/null)"
|
|
if [ -z "$STAT" ]
|
|
then
|
|
exit 0
|
|
else
|
|
echo "$STAT"
|
|
exit 1
|
|
fi
|
|
|
|
# For safekeeping, alternative commands that meet a similar goal (in case the
|
|
# above approach ends up being problematic)
|
|
#
|
|
# List modified/removed files and exit nonzero if any exist:
|
|
# git diff --stat --exit-code
|
|
#
|
|
# List untracked files, and exit nonzero if any exist:
|
|
# git ls-files --others --exclude-standard',
|
|
# u="$(git ls-files --others --exclude-standard)" && test -z "$u" |