Skip to content

Commit 657dbe5

Browse files
authored
chore: Report missing UIDs (#439)
1 parent 3c1d7b4 commit 657dbe5

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/check-uids.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Check UIDs
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
name: Check UIDs
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Setup Godot
18+
uses: chickensoft-games/setup-godot@v1
19+
with:
20+
version: 4.4.0
21+
use-dotnet: false
22+
include-templates: false
23+
- name: Verify setup
24+
run: godot --version
25+
- name: Check UIDs
26+
run: sh/check-uids.sh
27+

sh/check-uids.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Assume we're running from project root
4+
source sh/shared.sh
5+
6+
# Check Godot version
7+
if ! godot --version | grep ^4.4; then
8+
print "Wrong Godot version!"
9+
godot --version
10+
exit 1;
11+
fi
12+
13+
print "::group::Import project"
14+
godot --headless --import .
15+
print "::endgroup::"
16+
17+
UNTRACKED_FILES="$(git ls-files --others --exclude-standard)"
18+
if [[ "$UNTRACKED_FILES" ]]; then
19+
print "Missing UIDs detected!"
20+
echo "$UNTRACKED_FILES"
21+
exit 1
22+
else
23+
print "All UIDs are present!"
24+
fi

0 commit comments

Comments
 (0)