@ihason/rust-portable-linux-arm64 1.100.0 → 1.100.1-r2
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/README.md +3 -1
- package/archive.json +7 -6
- package/extract.js +31 -5
- package/install.js +0 -6
- package/package.json +4 -4
- package/setup.js +6 -13
package/README.md
CHANGED
package/archive.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"platform": "linux-arm64",
|
|
3
|
-
"asset": "rust-portable-v1.100.
|
|
3
|
+
"asset": "rust-portable-v1.100.1-r2-linux-arm64.tar.gz",
|
|
4
4
|
"type": "tar.gz",
|
|
5
|
-
"bundleVersion": "1.100.
|
|
6
|
-
"bundleRevision": "",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
5
|
+
"bundleVersion": "1.100.1",
|
|
6
|
+
"bundleRevision": "r2",
|
|
7
|
+
"releaseVersion": "1.100.1-r2",
|
|
8
|
+
"size": 132772419,
|
|
9
|
+
"sha256": "0fb2c02e2b85cdb499c620990d7535027cd44f7c10d97d9a7170eea46fcc3b4e",
|
|
9
10
|
"parts": [
|
|
10
11
|
{
|
|
11
12
|
"package": "@ihason/rust-portable-linux-arm64-chunk-01",
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
{
|
|
16
17
|
"package": "@ihason/rust-portable-linux-arm64-chunk-02",
|
|
17
18
|
"file": "part02",
|
|
18
|
-
"bytes":
|
|
19
|
+
"bytes": 27914819
|
|
19
20
|
}
|
|
20
21
|
]
|
|
21
22
|
}
|
package/extract.js
CHANGED
|
@@ -151,11 +151,24 @@ function readText(file) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
function readRelease(directory) {
|
|
154
|
-
const
|
|
154
|
+
const rustVersion = readText(path.join(directory, 'RUST_VERSION')).trim()
|
|
155
|
+
|| readText(path.join(directory, 'VERSION')).trim();
|
|
156
|
+
const releaseVersion = readText(path.join(directory, 'RELEASE_VERSION')).trim();
|
|
155
157
|
const buildInfo = readText(path.join(directory, 'BUILD-INFO.txt'));
|
|
156
158
|
const match = /^Bundle revision:[ \t]*(\S+)[ \t]*$/m.exec(buildInfo);
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
let revision = match && match[1] !== 'none' ? match[1] : '';
|
|
160
|
+
if (!revision) {
|
|
161
|
+
const revisionMatch = /-r(\d+)$/.exec(releaseVersion);
|
|
162
|
+
if (revisionMatch) {
|
|
163
|
+
revision = `r${revisionMatch[1]}`;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
version: releaseVersion || rustVersion,
|
|
168
|
+
rustVersion,
|
|
169
|
+
releaseVersion,
|
|
170
|
+
revision
|
|
171
|
+
};
|
|
159
172
|
}
|
|
160
173
|
|
|
161
174
|
function installedInfo(directory, platform) {
|
|
@@ -203,9 +216,22 @@ function isEmptyDirectory(directory) {
|
|
|
203
216
|
}
|
|
204
217
|
}
|
|
205
218
|
|
|
219
|
+
function releaseKey(info) {
|
|
220
|
+
if (info.releaseVersion) {
|
|
221
|
+
return info.releaseVersion;
|
|
222
|
+
}
|
|
223
|
+
if (info.version && info.revision) {
|
|
224
|
+
return `${info.version}-${info.revision}`;
|
|
225
|
+
}
|
|
226
|
+
return info.version || info.rustVersion || '';
|
|
227
|
+
}
|
|
228
|
+
|
|
206
229
|
function sameRelease(info, archive) {
|
|
207
|
-
|
|
208
|
-
|
|
230
|
+
const archiveKey = archive.releaseVersion
|
|
231
|
+
|| (archive.bundleRevision
|
|
232
|
+
? `${archive.bundleVersion}-${archive.bundleRevision}`
|
|
233
|
+
: archive.bundleVersion);
|
|
234
|
+
return releaseKey(info) === (archiveKey || '');
|
|
209
235
|
}
|
|
210
236
|
|
|
211
237
|
module.exports = {
|
package/install.js
CHANGED
|
@@ -74,12 +74,6 @@ function main() {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const destination = defaultDestination();
|
|
77
|
-
if (archive.platform === 'win32-x64' && /\s/.test(destination)) {
|
|
78
|
-
fail(
|
|
79
|
-
`Install path contains spaces: ${destination}\n` +
|
|
80
|
-
'Set RUST_PORTABLE_INSTALL_DIR to a path without spaces, for example C:\\rust-portable.'
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
77
|
|
|
84
78
|
const force = process.env.RUST_PORTABLE_FORCE === '1';
|
|
85
79
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ihason/rust-portable-linux-arm64",
|
|
3
|
-
"version": "1.100.
|
|
4
|
-
"description": "Portable Rust 1.100.
|
|
3
|
+
"version": "1.100.1-r2",
|
|
4
|
+
"description": "Portable Rust 1.100.1 toolchain for Linux arm64",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rust",
|
|
7
7
|
"toolchain",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"postinstall": "node install.js"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ihason/rust-portable-linux-arm64-chunk-01": "1.100.
|
|
40
|
-
"@ihason/rust-portable-linux-arm64-chunk-02": "1.100.
|
|
39
|
+
"@ihason/rust-portable-linux-arm64-chunk-01": "1.100.1-r2",
|
|
40
|
+
"@ihason/rust-portable-linux-arm64-chunk-02": "1.100.1-r2"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=18"
|
package/setup.js
CHANGED
|
@@ -232,7 +232,7 @@ async function decideExisting(directory) {
|
|
|
232
232
|
if (same && !options.force) {
|
|
233
233
|
if (rl) {
|
|
234
234
|
const again = await askYesNo(
|
|
235
|
-
`rust-portable ${archive.bundleVersion} is already installed at ${directory}. Reinstall`,
|
|
235
|
+
`rust-portable ${archive.releaseVersion || archive.bundleVersion} is already installed at ${directory}. Reinstall`,
|
|
236
236
|
false
|
|
237
237
|
);
|
|
238
238
|
if (!again) return { install: false, force: false };
|
|
@@ -265,7 +265,7 @@ async function decideExisting(directory) {
|
|
|
265
265
|
const installed = info.version || 'an unknown version';
|
|
266
266
|
if (rl) {
|
|
267
267
|
const replace = await askYesNo(
|
|
268
|
-
`The destination contains rust-portable ${installed}. Replace it with ${archive.bundleVersion}`,
|
|
268
|
+
`The destination contains rust-portable ${installed}. Replace it with ${archive.releaseVersion || archive.bundleVersion}`,
|
|
269
269
|
false
|
|
270
270
|
);
|
|
271
271
|
if (!replace) {
|
|
@@ -298,7 +298,7 @@ async function confirm(summary) {
|
|
|
298
298
|
|
|
299
299
|
function summaryWindows(destination, install) {
|
|
300
300
|
const lines = [
|
|
301
|
-
`rust-portable ${archive.bundleVersion}`,
|
|
301
|
+
`rust-portable ${archive.releaseVersion || archive.bundleVersion}`,
|
|
302
302
|
' Platform: win32-x64',
|
|
303
303
|
` Directory: ${destination}`,
|
|
304
304
|
` Configure: ${options.configurePath ? 'yes' : 'no'}`,
|
|
@@ -312,7 +312,7 @@ function summaryWindows(destination, install) {
|
|
|
312
312
|
|
|
313
313
|
function summaryLinux(prefix, userLevel, install) {
|
|
314
314
|
const lines = [
|
|
315
|
-
`rust-portable ${archive.bundleVersion}`,
|
|
315
|
+
`rust-portable ${archive.releaseVersion || archive.bundleVersion}`,
|
|
316
316
|
` Platform: ${archive.platform}`,
|
|
317
317
|
` Prefix: ${prefix}`,
|
|
318
318
|
` Type: ${userLevel ? 'user-level' : 'system-level'}`,
|
|
@@ -379,13 +379,6 @@ async function runWindows() {
|
|
|
379
379
|
options.runDoctor = await askYesNo('Run the self-check after extraction', true);
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
if (/\s/.test(destination)) {
|
|
383
|
-
fail(
|
|
384
|
-
`The install directory contains spaces: ${destination}\n` +
|
|
385
|
-
'Use --dir with a path without spaces, for example D:\\rust-portable.'
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
382
|
const decision = await decideExisting(destination);
|
|
390
383
|
if (decision.install || options.configurePath || options.runDoctor) {
|
|
391
384
|
await confirm(summaryWindows(destination, decision.install));
|
|
@@ -400,7 +393,7 @@ async function runWindows() {
|
|
|
400
393
|
fs.renameSync(staging, destination);
|
|
401
394
|
log(`Extracted to ${destination}`);
|
|
402
395
|
} else {
|
|
403
|
-
log(`rust-portable ${archive.bundleVersion} is already installed at ${destination}`);
|
|
396
|
+
log(`rust-portable ${archive.releaseVersion || archive.bundleVersion} is already installed at ${destination}`);
|
|
404
397
|
}
|
|
405
398
|
|
|
406
399
|
if (options.configurePath) {
|
|
@@ -483,7 +476,7 @@ async function runLinux() {
|
|
|
483
476
|
closePrompts();
|
|
484
477
|
|
|
485
478
|
if (!decision.install) {
|
|
486
|
-
log(`rust-portable ${archive.bundleVersion} is already installed at ${prefix}`);
|
|
479
|
+
log(`rust-portable ${archive.releaseVersion || archive.bundleVersion} is already installed at ${prefix}`);
|
|
487
480
|
printLinuxNextSteps(prefix);
|
|
488
481
|
return;
|
|
489
482
|
}
|