-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional info messages for users
Additional messages are needed to better understand the result of the script. Output codes have been changed to avoid generating interrupts in cases of normal termination.
- Loading branch information
Showing
2 changed files
with
34 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,25 +49,39 @@ jobs: | |
git config user.email "[email protected]" | ||
git config user.name "Your Name" | ||
- name: Test help flags | ||
- name: Zero exit code when use help flags | ||
working-directory: tornado | ||
run: | | ||
../go-mod-bump.sh -h | ||
../go-mod-bump.sh -help | ||
- name: Default exit code must be zero | ||
- name: Zero exit code when module name is not set | ||
working-directory: tornado | ||
run: | | ||
../go-mod-bump.sh | ||
- name: Test bump '${{ matrix.pkg }}' | ||
- name: Update dependencies when there is something to update | ||
working-directory: tornado | ||
run: | | ||
git checkout --quiet 029fe5d254ab71c1e72444adcda808f5a494084d | ||
git checkout --force --quiet 029fe5d254ab71c1e72444adcda808f5a494084d | ||
../go-mod-bump.sh ${{ matrix.pkg }} | ||
commit_count=$(git rev-list --count HEAD ^029fe5d254ab71c1e72444adcda808f5a494084d) | ||
if [[ "$commit_count" == 0 ]]; then | ||
echo "ERROR: No changes have been detected, but they must be exist" | ||
exit 1 | ||
fi | ||
git diff 029fe5d254ab71c1e72444adcda808f5a494084d | ||
- name: Zero exit code when nothing to update | ||
working-directory: tornado | ||
run: | | ||
git checkout --force --quiet 029fe5d254ab71c1e72444adcda808f5a494084d | ||
../go-mod-bump.sh ${{ matrix.pkg }} # update | ||
../go-mod-bump.sh ${{ matrix.pkg }} # nothing to update | ||
- name: Zero exit code when no have direct modules | ||
run: | | ||
mkdir testo | ||
cd testo | ||
go mod init testo | ||
../go-mod-bump.sh all |
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