Skip to content

Commit

Permalink
tests/build-pkg: fix wrong replacement git url
Browse files Browse the repository at this point in the history
[before]
job id: crystal.2558192

source=('git+https://github.com/pretix/pretixdesk.git' 'git+https://github.com/pretix/libpretixsync.git' 'launcher' 'pretixdesk.desktop')
=>
source=(
'pretixdesk::git://172.168.131.113/upstream/p/pretixdesk/pretixdesk#commit=628bc6d3990851dd16395b4d56ef18e657e423d0'
'pretixdesk::git://172.168.131.113/upstream/p/pretixdesk/pretixdesk#commit=628bc6d3990851dd16395b4d56ef18e657e423d0'
'launcher'
'pretixdesk.desktop'
)

[after]
job id: crystal.2558150

source=('git+https://github.com/pretix/pretixdesk.git' 'git+https://github.com/pretix/libpretixsync.git' 'launcher' 'pretixdesk.desktop')
=>
source=(
'pretixdesk::git://172.168.131.113/upstream/p/pretixdesk/pretixdesk#commit=628bc6d3990851dd16395b4d56ef18e657e423d0'
'git+https://github.com/pretix/libpretixsync.git'
'launcher'
'pretixdesk.desktop'
)

Signed-off-by: Lin Jiaxin <[email protected]>
  • Loading branch information
Lin Jiaxin authored and caoxueliang007 committed Jun 24, 2021
1 parent ed6f0ce commit 8fd0abe
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/build-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,9 @@ replace_source()
echo "source=(" > $1
for url in "${source[@]}"
do
echo "$url" | egrep 'git\+|\.git$' > /dev/null && {
[ -n "$repo_dir" ] && {
url="${repo_dir}git://${LKP_SERVER}/${upstream_dir}/${upstream_repo}#commit=${upstream_commit}"
[ -n "$git_tag" ] && {
url="${repo_dir}git://${LKP_SERVER}/${upstream_dir}/${upstream_repo}#tag=${git_tag}"
}
}
echo "$url" | grep -E 'git\+|\.git$' | grep -q "$upstream_url" && [ -n "$repo_dir" ] && {
url="${repo_dir}git://${LKP_SERVER}/${upstream_dir}/${upstream_repo}#commit=${upstream_commit}"
[ -n "$git_tag" ] && url="${repo_dir}git://${LKP_SERVER}/${upstream_dir}/${upstream_repo}#tag=${git_tag}"
}

echo \'$url\' >> $1
Expand Down

0 comments on commit 8fd0abe

Please sign in to comment.