@goreleaser/goreleaser-pro 2.7.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.js +2 -0
- package/lib.js +20 -0
- package/package.json +41 -11
- package/run-goreleaser.js +2 -0
package/install.js
CHANGED
package/lib.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// This file was generated by GoReleaser. DO NOT EDIT.
|
|
1
2
|
const { archives } = require("./package.json");
|
|
2
3
|
const fs = require("fs");
|
|
4
|
+
const crypto = require("crypto");
|
|
3
5
|
const path = require("path");
|
|
4
6
|
const JSZip = require("jszip");
|
|
5
7
|
const tar = require("tar");
|
|
@@ -80,6 +82,8 @@ const install = async () => {
|
|
|
80
82
|
let tmp = fs.mkdtempSync("archive-");
|
|
81
83
|
let archivePath = path.join(tmp, archive.name);
|
|
82
84
|
await download(archive.url, archivePath);
|
|
85
|
+
verify(archivePath, archive.checksum);
|
|
86
|
+
|
|
83
87
|
if (!fs.existsSync(binDir)) {
|
|
84
88
|
fs.mkdirSync(binDir);
|
|
85
89
|
}
|
|
@@ -107,6 +111,22 @@ const install = async () => {
|
|
|
107
111
|
}
|
|
108
112
|
};
|
|
109
113
|
|
|
114
|
+
const verify = (filename, checksum) => {
|
|
115
|
+
if (checksum.algorithm == "" || checksum.digest == "") {
|
|
116
|
+
console.warn("Warning: No checksum provided for verification");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
let digest = crypto
|
|
120
|
+
.createHash(checksum.algorithm)
|
|
121
|
+
.update(fs.readFileSync(filename))
|
|
122
|
+
.digest("hex");
|
|
123
|
+
if (digest != checksum.digest) {
|
|
124
|
+
throw new Error(
|
|
125
|
+
`${filename}: ${checksum.algorithm} does not match, expected ${checksum.digest}, got ${digest}`,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
110
130
|
const download = async (url, filename) => {
|
|
111
131
|
try {
|
|
112
132
|
console.log(`Downloading ${url} to ${filename}...`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goreleaser/goreleaser-pro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "Release engineering, simplified.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node install.js",
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/goreleaser/goreleaser-pro"
|
|
12
12
|
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"release",
|
|
15
|
+
"golang",
|
|
16
|
+
"go",
|
|
17
|
+
"rust",
|
|
18
|
+
"zig",
|
|
19
|
+
"bun",
|
|
20
|
+
"deno",
|
|
21
|
+
"docker"
|
|
22
|
+
],
|
|
13
23
|
"author": "Carlos Alexandro Becker \u003ccarlos@becker.software\u003e",
|
|
14
24
|
"license": "Copyright Becker Software LTDA",
|
|
15
25
|
"bugs": {
|
|
@@ -27,43 +37,63 @@
|
|
|
27
37
|
"archives": {
|
|
28
38
|
"darwin-arm64": {
|
|
29
39
|
"name": "goreleaser-pro_Darwin_arm64.tar.gz",
|
|
30
|
-
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.
|
|
40
|
+
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.8.1/goreleaser-pro_Darwin_arm64.tar.gz",
|
|
31
41
|
"bins": [
|
|
32
42
|
"goreleaser"
|
|
33
43
|
],
|
|
34
|
-
"format": "tar.gz"
|
|
44
|
+
"format": "tar.gz",
|
|
45
|
+
"checksum": {
|
|
46
|
+
"algorithm": "sha256",
|
|
47
|
+
"digest": "8016843231f285d501dd2cdcb2795505aff427bb4ed5a40485ea03c89ea4e330"
|
|
48
|
+
}
|
|
35
49
|
},
|
|
36
50
|
"darwin-x64": {
|
|
37
51
|
"name": "goreleaser-pro_Darwin_x86_64.tar.gz",
|
|
38
|
-
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.
|
|
52
|
+
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.8.1/goreleaser-pro_Darwin_x86_64.tar.gz",
|
|
39
53
|
"bins": [
|
|
40
54
|
"goreleaser"
|
|
41
55
|
],
|
|
42
|
-
"format": "tar.gz"
|
|
56
|
+
"format": "tar.gz",
|
|
57
|
+
"checksum": {
|
|
58
|
+
"algorithm": "sha256",
|
|
59
|
+
"digest": "8b171cc71ec26185fd2d276315820032132c10ceb05b1e033d8be1bce4b23c1b"
|
|
60
|
+
}
|
|
43
61
|
},
|
|
44
62
|
"linux-arm64": {
|
|
45
63
|
"name": "goreleaser-pro_Linux_arm64.tar.gz",
|
|
46
|
-
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.
|
|
64
|
+
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.8.1/goreleaser-pro_Linux_arm64.tar.gz",
|
|
47
65
|
"bins": [
|
|
48
66
|
"goreleaser"
|
|
49
67
|
],
|
|
50
|
-
"format": "tar.gz"
|
|
68
|
+
"format": "tar.gz",
|
|
69
|
+
"checksum": {
|
|
70
|
+
"algorithm": "sha256",
|
|
71
|
+
"digest": "12ff83592c619004744f550869d643e280a8c22e60dfd0d916f59720e7818c0d"
|
|
72
|
+
}
|
|
51
73
|
},
|
|
52
74
|
"linux-x64": {
|
|
53
75
|
"name": "goreleaser-pro_Linux_x86_64.tar.gz",
|
|
54
|
-
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.
|
|
76
|
+
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.8.1/goreleaser-pro_Linux_x86_64.tar.gz",
|
|
55
77
|
"bins": [
|
|
56
78
|
"goreleaser"
|
|
57
79
|
],
|
|
58
|
-
"format": "tar.gz"
|
|
80
|
+
"format": "tar.gz",
|
|
81
|
+
"checksum": {
|
|
82
|
+
"algorithm": "sha256",
|
|
83
|
+
"digest": "8b4454820c25b9a27ba6a66f47e438932f7719a104db1dc15501c3525313a94a"
|
|
84
|
+
}
|
|
59
85
|
},
|
|
60
86
|
"win32-x64": {
|
|
61
87
|
"name": "goreleaser-pro_Windows_x86_64.zip",
|
|
62
|
-
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.
|
|
88
|
+
"url": "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.8.1/goreleaser-pro_Windows_x86_64.zip",
|
|
63
89
|
"bins": [
|
|
64
90
|
"goreleaser.exe"
|
|
65
91
|
],
|
|
66
|
-
"format": "zip"
|
|
92
|
+
"format": "zip",
|
|
93
|
+
"checksum": {
|
|
94
|
+
"algorithm": "sha256",
|
|
95
|
+
"digest": "1c9ebaaf544d3ab4850ed248e651912c665b42bab44ba15fa03890121f29da21"
|
|
96
|
+
}
|
|
67
97
|
}
|
|
68
98
|
}
|
|
69
99
|
}
|