unoverse 0.1.95 → 0.1.96
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/operator/lib/common.sh +14 -1
- package/operator/lib/help.sh +7 -2
- package/package.json +1 -1
package/operator/lib/common.sh
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Shared colors, helpers, and constants
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
# THE VERSION IS THE CLI'S, READ FROM IT. This was the literal "1.0.0", hardcoded when the
|
|
5
|
+
# operator was a script in a repo and never touched again — so `unoverse help` announced
|
|
6
|
+
# v1.0.0 while the published CLI was on 0.1.95, and the one number a developer uses to say
|
|
7
|
+
# which version they are running was wrong by two hundred releases.
|
|
8
|
+
#
|
|
9
|
+
# THE MONOREPO PATH IS TRIED FIRST, and the order matters. Two levels up from scripts/lib
|
|
10
|
+
# is the PLATFORM's package.json, which is genuinely 1.0.0 — so looking there first found a
|
|
11
|
+
# real version that was not this CLI's, and reported it confidently. packages/cli exists
|
|
12
|
+
# only in the monorepo; published, that path misses and the package's own is two levels up.
|
|
13
|
+
GRAVITY_VERSION=$(
|
|
14
|
+
node -p "require('$GRAVITY_LIB/../../packages/cli/package.json').version" 2>/dev/null \
|
|
15
|
+
|| node -p "require('$GRAVITY_LIB/../../package.json').version" 2>/dev/null \
|
|
16
|
+
|| echo "unknown"
|
|
17
|
+
)
|
|
5
18
|
DOCR_REGISTRY="registry.digitalocean.com"
|
|
6
19
|
|
|
7
20
|
# Colors
|
package/operator/lib/help.sh
CHANGED
|
@@ -25,8 +25,13 @@ cmd_help() {
|
|
|
25
25
|
# THE ARGUMENT IS ON THE LINE, not in a footnote. It read as a special case for people
|
|
26
26
|
# with two clouds; it is simply how the command is shaped. A cloud is optional when only
|
|
27
27
|
# one ground exists and required when two do.
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
# SHOW THE COMMAND, not a description of it. "aws or digitalocean" told a reader the
|
|
29
|
+
# clouds exist without telling them what to type, so the shape of the command still had
|
|
30
|
+
# to be guessed. Print the line they will actually run.
|
|
31
|
+
echo -e " ${GREEN}deploy${NC} Ship it to a server ${DIM}(first run asks which cloud)${NC}"
|
|
32
|
+
echo -e " ${DIM}unoverse deploy aws · unoverse deploy digitalocean${NC}"
|
|
33
|
+
echo -e " ${GREEN}destroy${NC} Take it down ${DIM}(shows what goes, and what stays)${NC}"
|
|
34
|
+
echo -e " ${DIM}unoverse destroy aws · unoverse destroy digitalocean${NC}"
|
|
30
35
|
echo -e " ${GREEN}db-allow${NC} Let this machine reach the database ${DIM}(run it when you change network)${NC}"
|
|
31
36
|
echo ""
|
|
32
37
|
# Owner-only lane. Printed ONLY when publish.sh is present, so a starter kit never
|
package/package.json
CHANGED