Skip to content

Commit

Permalink
Merge pull request #96 from wings-software/ss/CI-13685
Browse files Browse the repository at this point in the history
fix:[CI-13685]: DRONE_NETRC_PRE_FETCH command fix
  • Loading branch information
HenAmar authored Aug 8, 2024
2 parents 3629f42 + bb0b0ad commit 1447142
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion posix/clone
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e

# if PLUGIN_ONLY_COPY_FILE_CONTENT is set, only copy the file content
if [ "$PLUGIN_ONLY_COPY_FILE_CONTENT" = "true" ]; then
echo "PLUGIN_ONLY_COPY_FILE_CONTENT is set as true, codebase won't be cloned"
copy-file-content
exit 0
fi
Expand Down Expand Up @@ -99,7 +100,7 @@ case $DRONE_COMMIT_REF in
refs/merge-requests/* ) CLONE_TYPE=pull_request ;;
esac

common
. common

case $CLONE_TYPE in
pull_request)
Expand Down
5 changes: 1 addition & 4 deletions posix/common
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,5 @@ if [ -n "$DRONE_NETRC_SPARSE_CHECKOUT" ]; then
fi

if [ -n "$DRONE_NETRC_PRE_FETCH" ]; then
echo "$DRONE_NETRC_PRE_FETCH" | while IFS= read -r line; do
echo "+ $line"
eval "$line"
done
eval "$(printf '%b\n' "$DRONE_NETRC_PRE_FETCH")"
fi
2 changes: 1 addition & 1 deletion windows/clone.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ switch -regex ($Env:DRONE_COMMIT_REF)

}

Invoke-Expression "${PSScriptRoot}\common.ps1"
. "${PSScriptRoot}\common.ps1"

switch ($CLONE_TYPE) {
"pull_request" {
Expand Down

0 comments on commit 1447142

Please sign in to comment.