@goodfoot/git-mesh 1.0.24 → 1.0.26
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/man/git-mesh.1 +2 -2
- package/package.json +6 -6
- package/scripts/postinstall.js +22 -0
package/man/git-mesh.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH git-mesh 1 "git-mesh 1.0.
|
|
3
|
+
.TH git-mesh 1 "git-mesh 1.0.26"
|
|
4
4
|
.ie \n(.g .ds Aq \(aq
|
|
5
5
|
.el .ds Aq '
|
|
6
6
|
.SH NAME
|
|
@@ -132,7 +132,7 @@ Print this message or the help of the given subcommand(s)
|
|
|
132
132
|
.ie \n(.g .ds Aq \(aq
|
|
133
133
|
.el .ds Aq '
|
|
134
134
|
.SH VERSION
|
|
135
|
-
v1.0.
|
|
135
|
+
v1.0.26
|
|
136
136
|
.SH EXAMPLES
|
|
137
137
|
Anchor a new mesh alongside a code change:
|
|
138
138
|
.PP
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodfoot/git-mesh",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"bin": "bin/git-mesh",
|
|
5
5
|
"man": [
|
|
6
6
|
"man/git-mesh.1"
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"scripts/postinstall.js"
|
|
22
22
|
],
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@goodfoot/git-mesh-darwin-arm64": "1.0.
|
|
25
|
-
"@goodfoot/git-mesh-darwin-x64": "1.0.
|
|
26
|
-
"@goodfoot/git-mesh-linux-arm64": "1.0.
|
|
27
|
-
"@goodfoot/git-mesh-linux-x64": "1.0.
|
|
28
|
-
"@goodfoot/git-mesh-win32-x64": "1.0.
|
|
24
|
+
"@goodfoot/git-mesh-darwin-arm64": "1.0.26",
|
|
25
|
+
"@goodfoot/git-mesh-darwin-x64": "1.0.26",
|
|
26
|
+
"@goodfoot/git-mesh-linux-arm64": "1.0.26",
|
|
27
|
+
"@goodfoot/git-mesh-linux-x64": "1.0.26",
|
|
28
|
+
"@goodfoot/git-mesh-win32-x64": "1.0.26"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
package/scripts/postinstall.js
CHANGED
|
@@ -54,7 +54,29 @@ function buildFromSource(destBinary, binaryName) {
|
|
|
54
54
|
fs.chmodSync(destBinary, 0o755);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
function isInsideSourceTree() {
|
|
58
|
+
// Walk up from this script looking for a `.git` entry. If found, this is
|
|
59
|
+
// the @goodfoot/git-mesh source repo (developer doing `yarn install`), not
|
|
60
|
+
// a consumer install under node_modules. Mutating the tracked `bin/git-mesh`
|
|
61
|
+
// shim in that case dirties the working tree and — if committed — ships a
|
|
62
|
+
// dangling symlink in the published tarball (see git-mesh-v1.0.25 regression).
|
|
63
|
+
let dir = path.resolve(__dirname, '..');
|
|
64
|
+
for (let i = 0; i < 16; i++) {
|
|
65
|
+
if (fs.existsSync(path.join(dir, '.git'))) return true;
|
|
66
|
+
const parent = path.dirname(dir);
|
|
67
|
+
if (parent === dir) return false;
|
|
68
|
+
if (path.basename(parent) === 'node_modules') return false;
|
|
69
|
+
dir = parent;
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
57
74
|
function main() {
|
|
75
|
+
if (isInsideSourceTree()) {
|
|
76
|
+
console.log('@goodfoot/git-mesh: postinstall skipped (running inside source tree).');
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
58
80
|
const platform = PLATFORM_MAP[process.platform];
|
|
59
81
|
const arch = ARCH_MAP[process.arch];
|
|
60
82
|
|