Skip to content

Commit

Permalink
ci: Add Jsonnet Script
Browse files Browse the repository at this point in the history
  • Loading branch information
jshlbrd committed Oct 27, 2024
1 parent c681674 commit 255c6d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ jobs:
- name: Compiling
run: |
go install github.com/google/go-jsonnet/cmd/jsonnet@latest
sh build/scripts/config/compile.sh
sh .github/workflows/code_jsonnet.sh
9 changes: 9 additions & 0 deletions .github/workflows/code_jsonnet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
files=$(find . -name "*.jsonnet")

for file in $files
do
# 'rev | cut | rev' converts "path/to/file.jsonnet" to "path/to/file.json"
f=$(echo $file | rev | cut -c 4- | rev)
jsonnet $file > $f
done

0 comments on commit 255c6d0

Please sign in to comment.