clavarium 0.1.0 → 0.1.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/deploy/install.sh +10 -3
- package/deploy/online.mjs +3 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/deploy/install.sh
CHANGED
|
@@ -263,15 +263,22 @@ if [ "$KEEP_RELEASE" = "yes" ]; then
|
|
|
263
263
|
release="$(basename "$(readlink -f "$CODE/current")")"
|
|
264
264
|
echo " the release that runs is kept: $release"
|
|
265
265
|
else
|
|
266
|
-
if [ -n "$VERSION" ]; then
|
|
266
|
+
if [ -n "$VERSION" ] && [ -L "$CODE/current" ] && [ "$(basename "$(readlink -f "$CODE/current")")" = "$VERSION" ]; then
|
|
267
|
+
# Run again with the version that runs already (a step after it failed, a
|
|
268
|
+
# DNS record made late): kept as it is, and the rest goes on.
|
|
269
|
+
release="$VERSION"
|
|
270
|
+
echo " clavarium@$VERSION runs here already: kept"
|
|
271
|
+
elif [ -n "$VERSION" ]; then
|
|
267
272
|
echo " clavarium@$VERSION from npm: fetched, checked, built, tried (a few minutes)"
|
|
268
273
|
release="$(updater prepare --version "$VERSION")" || refuse "clavarium@$VERSION was not installed (above: why)"
|
|
269
274
|
else
|
|
270
275
|
echo " the working tree $FROM_DIR (development): copied, built, tried"
|
|
271
276
|
release="$(updater prepare --from-dir "$FROM_DIR")" || refuse "the working tree was not installed (above: why)"
|
|
272
277
|
fi
|
|
273
|
-
|
|
274
|
-
|
|
278
|
+
if [ "$(basename "$(readlink -f "$CODE/current" 2>/dev/null)")" != "$release" ]; then
|
|
279
|
+
systemctl stop clavarium.service 2>/dev/null || true
|
|
280
|
+
updater switch "$release"
|
|
281
|
+
fi
|
|
275
282
|
fi
|
|
276
283
|
APP="$CODE/current/app"
|
|
277
284
|
NODE="$CODE/current/node/bin/node"
|
package/deploy/online.mjs
CHANGED
|
@@ -81,9 +81,9 @@ export function parseOnline(args) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
if (o.relay && o.port) throw new Bad('say how it will be reached: --relay HOST or --port, not both');
|
|
84
|
-
/* Neither:
|
|
85
|
-
|
|
86
|
-
if (!o.relay && !o.port) o.
|
|
84
|
+
/* Neither: the usual case -- the domain points to the relay, which is
|
|
85
|
+
reached by the domain itself (its address is not needed). */
|
|
86
|
+
if (!o.relay && !o.port) o.relay = o.domain;
|
|
87
87
|
if (!DOMAIN.test(o.domain)) throw new Bad('--domain is a host name, lower case, like clav.example.com');
|
|
88
88
|
o.admin ||= `admin@${o.domain}`;
|
|
89
89
|
if (!EMAIL.test(o.admin)) throw new Bad('--admin is an e-mail address, lower case');
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|