-
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.
Merge pull request #24 from maxisoft/dev
Implement case-insensitive check for private repositories (improved)
- Loading branch information
Showing
2 changed files
with
11 additions
and
2 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 |
---|---|---|
|
@@ -189,11 +189,18 @@ jobs: | |
run: | | ||
mkdir tmpgit | ||
EXIT_CODE=0 | ||
git clone -q --sparse --depth 1 https://github.com/${{ env.DESTINATION_REPOSITORY_USERNAME }}/${{ env.DESTINATION_REPOSITORY_NAME }}.git tmpgit 2>&1 || { | ||
if (grep --ignore-case -q "could not read Username"); then | ||
git clone -q --sparse --depth 1 'https://github.com/${{ env.DESTINATION_REPOSITORY_USERNAME }}/${{ env.DESTINATION_REPOSITORY_NAME }}.git' &> tmp_git.out 2>&1 || { | ||
if (grep --ignore-case -q "could not read Username" tmp_git.out); then | ||
echo "Repository is private (1)" | ||
EXIT_CODE=$? | ||
else | ||
if (grep --ignore-case -q "Authentication failed" tmp_git.out); then | ||
echo "Repository is private (2)" | ||
EXIT_CODE=$? | ||
fi | ||
fi | ||
} | ||
rm -rf tmp_git.out | ||
if [[ $EXIT_CODE -eq 128 ]]; then | ||
echo "Repository is private" | ||
|
@@ -211,6 +218,7 @@ jobs: | |
GIT_CONFIG_SYSTEM: '' | ||
GIT_CONFIG_GLOBAL: '' | ||
GIT_CONFIG_LOCAL: '' | ||
GIT_TERMINAL_PROMPT: 0 | ||
|
||
- name: Push kernels directory to another repository | ||
uses: cpina/[email protected] | ||
|
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 |
---|---|---|
|
@@ -786,3 +786,4 @@ fabric.properties | |
# Android studio 3.1+ serialized cache file | ||
.idea/caches/build_file_checksums.ser | ||
|
||
/test.sh |