/
go@1.21.7.json
51 lines (51 loc) · 2.08 KB
/
go@1.21.7.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"version": "1.21.7",
"description": "An open source programming language that makes it easy to build simple, reliable, and efficient software.",
"homepage": "https://golang.org",
"license": "BSD-3-Clause",
"extract_dir": "go",
"pre_install": [
"# GOPATH",
"# respect USER value, if defined",
"if ($env:GOPATH) { } else {",
"# otherwise, 1st existing known default; otherwise, 1st of known defaults",
"$default_dirs = @( \"$env:USERPROFILE\\go\", \"$env:USERPROFILE\\.go\" )",
"$val = $( @($default_dirs |% { get-item $_ -ea silent }) + $default_dirs[0] ) | select -first 1",
"# ensure directory exists",
"new-item $val -type directory -force | out-null",
"env GOPATH -t $global $val",
"env GOPATH $val",
"}"
],
"post_install": [
"$default_dirs = @( $env:GOPATH, \"$env:USERPROFILE\\go\", \"$env:USERPROFILE\\.go\" )",
"$val = $( @($default_dirs |% { get-item $_ -ea silent }) + $default_dirs[0] ) | select -first 1",
"ensure_in_path \"$val\\bin\" $global"
],
"bin": ["bin/go.exe", "bin/gofmt.exe"],
"architecture": {
"64bit": {
"url": "https://go.dev/dl/go1.21.7.windows-amd64.zip",
"hash": "sha256:9ba8652778baded6e9a758c3129aae73393b4b75b230933bb0cf3ab65b19be35"
},
"32bit": {
"url": "https://go.dev/dl/go1.21.7.windows-386.zip",
"hash": "sha256:f0574bc4a1e2964d4073a8de34f871f37d9bcebb3dbeccd1dc7d35e58904aa97"
},
"arm64": {
"url": "https://go.dev/dl/go1.21.7.windows-arm64.zip",
"hash": "sha256:42924b8732c32b7fc1c1683ff0cff85fb779b6b9abf1f9933b8ac2fe3db218a5"
}
},
"checkver": { "url": "https://golang.org/dl/", "regex": "go([\\d.]+)\\.windows-" },
"autoupdate": {
"architecture": {
"64bit": { "url": "https://dl.google.com/go/go$version.windows-amd64.zip" },
"32bit": { "url": "https://dl.google.com/go/go$version.windows-386.zip" },
"arm64": { "url": "https://dl.google.com/go/go$version.windows-arm64.zip" }
},
"hash": { "url": "$url.sha256" }
}
// "installer": { "script": "add_first_in_path \"$env:USERPROFILE\\go\\bin\" $global" },
// "uninstaller": { "script": "remove_from_path \"$env:USERPROFILE\\go\\bin\" $global" }
}