File tree Expand file tree Collapse file tree 2 files changed +13
-16
lines changed
scriptmodules/supplementary Expand file tree Collapse file tree 2 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,13 @@ function _get_goroot_golang() {
18
18
}
19
19
20
20
function install_bin_golang() {
21
+ local target_version=1.11.13
21
22
local version
22
23
if [[ -e " $md_inst /bin/go" ]]; then
23
- local version=$( GOROOT=" $md_inst " " $md_inst /bin/go" version | sed ' s/.*\(go1 [^ ]*\).*/\1/' )
24
+ local version=$( GOROOT=" $md_inst " " $md_inst /bin/go" version | sed ' s/.*go\(1 [^ ]*\).*/\1/' )
24
25
fi
25
26
printMsgs " console" " Current Go version: $version "
26
- if [[ ! " ${ version} " < " go1.11.13 " ]] ; then
27
+ if compareVersions " $ version" ge " $target_version " ; then
27
28
return 0
28
29
fi
29
30
@@ -40,6 +41,6 @@ function install_bin_golang() {
40
41
if isPlatform " aarch64" ; then
41
42
arch=" arm64"
42
43
fi
43
- printMsgs " console" " Downloading go1.11.13 .linux-$arch .tar.gz"
44
- downloadAndExtract " https://storage.googleapis.com/golang/go1.11.13 .linux-$arch .tar.gz" " $md_inst " --strip-components 1 --exclude=" go/test"
44
+ printMsgs " console" " Downloading go $target_version .linux-$arch .tar.gz"
45
+ downloadAndExtract " https://storage.googleapis.com/golang/go ${target_version} .linux-$arch .tar.gz" " $md_inst " --strip-components 1 --exclude=" go/test"
45
46
}
Original file line number Diff line number Diff line change @@ -21,27 +21,23 @@ function depends_scraper() {
21
21
}
22
22
23
23
function sources_scraper() {
24
- local goroot=" $( _get_goroot_golang) "
25
- GOPATH=" $md_build " GOROOT=" $goroot " " $goroot /bin/go" get -u github.com/sselph/scraper
26
- # Use an older version of the TGDB go REST bindings, since the new one is not compatible with scraper
27
- git -C " $md_build /src/github.com/J-Swift/thegamesdb-swagger-client-go/" checkout 43ed8a0b364ed2d8521d0
28
- # Fix ScreenScraper scraping with the patch from PR-#265
29
- git -C " $md_build /src/github.com/sselph/scraper" apply " $md_data /00-fix-screenscraper-response-parsing-265.diff"
30
- # manually set repo_dir for packaging info / version checking
31
- __mod_info[$md_id /repo_dir]=" $md_build /src/github.com/sselph/scraper"
24
+ gitPullOrClone
25
+ applyPatch " $md_data /00-fix-screenscraper-response-parsing-265.diff"
32
26
}
33
27
34
28
function build_scraper() {
35
29
local goroot=" $( _get_goroot_golang) "
36
- GOPATH=" $md_build " GOROOT=" $goroot " " $goroot /bin/go" build github.com/sselph/scraper
30
+ GOROOT=" $goroot " " $goroot /bin/go" mod init github.com/sselph/scraper
31
+ GOROOT=" $goroot " " $goroot /bin/go" get github.com/J-Swift/thegamesdb-swagger-client-go@43ed8a0b364ed2d8521d0
32
+ GOROOT=" $goroot " " $goroot /bin/go" build -o scraper
37
33
}
38
34
39
35
function install_scraper() {
40
36
md_ret_files=(
41
37
' scraper'
42
- ' src/github.com/sselph/scraper/ LICENSE'
43
- ' src/github.com/sselph/scraper/ README.md'
44
- ' src/github.com/sselph/scraper/ hash.csv'
38
+ ' LICENSE'
39
+ ' README.md'
40
+ ' hash.csv'
45
41
)
46
42
}
47
43
You can’t perform that action at this time.
0 commit comments