mirror of
https://github.com/cashapp/redwood.git
synced 2026-03-09 21:58:16 +08:00
Add a CI check to enforce that files use git lfs when necessary. (#2025)
* Add a CI check to enforce that files use git lfs when necessary. * Remove echo. * Improve error message. * Improve error message. * Update scripts/enforce_git_lfs.sh Co-authored-by: Jake Wharton <jw@squareup.com> * Use bash substring matching. --------- Co-authored-by: Jake Wharton <jw@squareup.com>
This commit is contained in:
1
.github/workflows/build.yaml
vendored
1
.github/workflows/build.yaml
vendored
@@ -24,6 +24,7 @@ jobs:
|
||||
java-version: 21
|
||||
- uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- run: ./scripts/enforce_git_lfs.sh
|
||||
- run: ./gradlew kotlinUpgradeYarnLock build -PredwoodNoApps
|
||||
|
||||
emulator-tests:
|
||||
|
||||
10
scripts/enforce_git_lfs.sh
Executable file
10
scripts/enforce_git_lfs.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
output=$(git checkout .)
|
||||
|
||||
if [[ output == *"files that should have been pointers, but weren't"* ]]; then
|
||||
echo "Error: Encountered files that should have been checked in using Git LFS, but weren't."
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
Reference in New Issue
Block a user