-
-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ed4025
commit d72ad9d
Showing
3 changed files
with
38 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:; set -eo pipefail | ||
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) | ||
:; ${SCRIPT_DIR}/accept.sh "$@" | ||
:; exit $? | ||
|
||
./build.cmd accept |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,3 @@ | ||
#!/bin/zsh | ||
|
||
# Use a variable to keep track of whether any directories were found | ||
found_mismatch=false | ||
|
||
# Use a variable to check if the header has been printed | ||
header_printed=false | ||
|
||
# Find all __MISMATCH__ folders | ||
find . -type d -name "__MISMATCH__" | while read mismatch_dir; do | ||
# Mark that we found a mismatch directory | ||
found_mismatch=true | ||
|
||
# Get the parent __snapshots__ directory | ||
snapshot_dir="$(dirname "$mismatch_dir")" | ||
|
||
# If there are files in the directory, copy them | ||
if [ "$(ls -A "$mismatch_dir")" ]; then | ||
for file in "$mismatch_dir"/*; do | ||
if [ -f "$file" ]; then | ||
cp "$file" "$snapshot_dir/" | ||
|
||
# Print the header only once | ||
if [ "$header_printed" = false ]; then | ||
echo "Found Updated Snapshots:" | ||
header_printed=true | ||
fi | ||
|
||
# Extract relevant path details and print | ||
relative_path="${snapshot_dir#./src/HotChocolate/}" # strip the common prefix | ||
echo "- $relative_path/$(basename "$file")" | ||
fi | ||
done | ||
fi | ||
|
||
# Remove the __MISMATCH__ directory | ||
rm -r "$mismatch_dir" | ||
done | ||
|
||
# Check if any directories were found | ||
if [ "$found_mismatch" = false ]; then | ||
echo "All snapshots are up to date!" | ||
else | ||
echo "\nDone!" | ||
fi | ||
./build.sh accept |