-
Notifications
You must be signed in to change notification settings - Fork 22
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
b598870
commit 6e70894
Showing
5 changed files
with
181 additions
and
15 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
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,12 @@ | ||
#!/bin/bash | ||
|
||
# pre-req for this mock script would be to have the actual astro cli installed at /usr/local/bin/astro-original | ||
|
||
if [ "$1" = "deploy" ]; then | ||
# Change directory to 'e2e-setup/astro-project' and then call original `astro deploy` | ||
# so that we could simulate the default behavior without needing to have the astro project in base folder | ||
echo "cd into astro project" && cd e2e-setup/astro-project && /usr/local/bin/astro-original "$@" | ||
else | ||
# If it's not a `deploy` command, run the original `astro` | ||
/usr/local/bin/astro-original "$@" | ||
fi |
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,13 @@ | ||
#!/bin/bash | ||
|
||
# hack to mock git commands as part of action.yaml so that we could simulate no deploy scenario without making any additional commits | ||
|
||
# Check if the script was invoked with "git diff" | ||
if [[ "$1" == "diff" ]]; then | ||
echo "README.md" | ||
elif [[ "$1" == "fetch" ]]; then | ||
echo "Handling git fetch, doing nothing" | ||
else | ||
echo "Error: git mock script isn't configured to handle $1" >&2 | ||
exit 1 | ||
fi |