generated from im-open/javascript-action-template
-
Notifications
You must be signed in to change notification settings - Fork 8
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
35669b4
commit 878ca9e
Showing
10 changed files
with
845 additions
and
101 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,38 @@ | ||
#!/bin/bash | ||
|
||
name='' | ||
string='' | ||
substring='' | ||
|
||
|
||
for arg in "$@"; do | ||
case $arg in | ||
--name) | ||
name=$2 | ||
shift # Remove argument --name from `$@` | ||
shift # Remove argument value from `$@` | ||
;; | ||
--string) | ||
string=$2 | ||
shift # Remove argument --expected from `$@` | ||
shift # Remove argument value from `$@` | ||
;; | ||
--substring) | ||
substring=$2 | ||
shift # Remove argument --actual from `$@` | ||
shift # Remove argument value from `$@` | ||
;; | ||
|
||
esac | ||
done | ||
|
||
echo " | ||
Full value of $name: '$string' | ||
Substring for $name: '$substring'" | ||
|
||
if [[ $string == *"$substring"* ]]; then | ||
echo "The substring was found in $name" | ||
else | ||
echo "The substring was not found in $name" | ||
exit 1 | ||
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,10 @@ | ||
#!/bin/bash | ||
|
||
echo "PRIOR_VERSION=" >> $GITHUB_ENV | ||
echo "NEXT_VERSION=" >> $GITHUB_ENV | ||
echo "NEXT_MINOR_VERSION=" >> $GITHUB_ENV | ||
echo "NEXT_MAJOR_VERSION=" >> $GITHUB_ENV | ||
echo "PRIOR_VERSION_NO_PREFIX=" >> $GITHUB_ENV | ||
echo "NEXT_VERSION_NO_PREFIX=" >> $GITHUB_ENV | ||
echo "NEXT_MINOR_VERSION_NO_PREFIX=" >> $GITHUB_ENV | ||
echo "NEXT_MAJOR_VERSION_NO_PREFIX=" >> $GITHUB_ENV |
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,35 @@ | ||
#!/bin/bash | ||
|
||
commitMessage='' | ||
|
||
for arg in "$@"; do | ||
case $arg in | ||
--message) | ||
commitMessage=$2 | ||
shift # Remove argument --name from `$@` | ||
shift # Remove argument value from `$@` | ||
;; | ||
esac | ||
done | ||
|
||
echo "Remove the last commit message" | ||
git reset --soft HEAD~1 | ||
|
||
echo " | ||
Make a message only commit:"; | ||
git commit --allow-empty -m "$commitMessage" | ||
|
||
echo " | ||
Print the last five commits:"; | ||
git log -5 --oneline | ||
|
||
echo " | ||
Reset the environment variables that git-version-lite will set"; | ||
echo "PRIOR_VERSION=" >> $GITHUB_ENV | ||
echo "NEXT_VERSION=" >> $GITHUB_ENV | ||
echo "NEXT_MINOR_VERSION=" >> $GITHUB_ENV | ||
echo "NEXT_MAJOR_VERSION=" >> $GITHUB_ENV | ||
echo "PRIOR_VERSION_NO_PREFIX=" >> $GITHUB_ENV | ||
echo "NEXT_VERSION_NO_PREFIX=" >> $GITHUB_ENV | ||
echo "NEXT_MINOR_VERSION_NO_PREFIX=" >> $GITHUB_ENV | ||
echo "NEXT_MAJOR_VERSION_NO_PREFIX=" >> $GITHUB_ENV |