devzone 0.58.0 → 1.0.0
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/.devcontainer/agent-workspace.sh +1 -1
- package/.devcontainer/argocd/argocd.sh +0 -12
- package/.devcontainer/catalogue/mysql/mysql.sh +0 -12
- package/.devcontainer/catalogue.sh +1 -13
- package/.devcontainer/command-aliases.sh +78 -114
- package/.devcontainer/devzone +21 -36
- package/.devcontainer/gitlab/gitlab.sh +0 -12
- package/.devcontainer/gitlab/test-gitlab.sh +1 -1
- package/.devcontainer/help.sh +3 -3
- package/.devcontainer/paquets.sh +0 -12
- package/.devcontainer/ports.sh +0 -12
- package/.devcontainer/postgres/postgres.sh +0 -12
- package/.devcontainer/skills/devzone/SKILL.md +2 -2
- package/README.md +12 -2
- package/manage/devzone +61 -569
- package/manage/scripts/argocd-services.sh +2 -2
- package/manage/scripts/create-cluster.sh +107 -0
- package/manage/scripts/create-mode.sh +10 -0
- package/manage/scripts/devzone-create.sh +138 -0
- package/manage/scripts/devzone-manifest.sh +171 -0
- package/manage/scripts/devzone-update.sh +222 -0
- package/manage/scripts/migrer.sh +2 -6
- package/manage/scripts/workspace-aliases.sh +4 -31
- package/manage/workspace.sh +7 -12
- package/package.json +1 -1
package/manage/scripts/migrer.sh
CHANGED
|
@@ -33,14 +33,10 @@ fail() {
|
|
|
33
33
|
# Reads the single accepted flag ($1) from following args ($3…): prints 1 if
|
|
34
34
|
# present, 0 otherwise; any other flag: error with usage ($2), exit code 1.
|
|
35
35
|
read_flag() {
|
|
36
|
-
local flag="$1" usage="$2" a found=0
|
|
36
|
+
local flag="$1" usage="$2" a found=0
|
|
37
37
|
shift 2
|
|
38
|
-
case "$flag" in
|
|
39
|
-
--yes) legacy="--oui" ;;
|
|
40
|
-
--bring-back) legacy="--rapatrier" ;;
|
|
41
|
-
esac
|
|
42
38
|
for a in "$@"; do
|
|
43
|
-
if [ "$a" = "$flag" ]
|
|
39
|
+
if [ "$a" = "$flag" ]; then found=1; continue; fi
|
|
44
40
|
fail "unknown option: $a (devzone workspace $usage)"
|
|
45
41
|
return 1
|
|
46
42
|
done
|
|
@@ -1,35 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# sourced by manage/workspace.sh
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# compatibility aliases of the renamed functions, kept until lot 4 (#509)
|
|
7
|
-
# Why: command_canonical (.devcontainer/command-aliases.sh) still gives the
|
|
8
|
-
# French name; workspace.sh switches on the English ones. bash 3.2 (macOS).
|
|
9
|
-
|
|
10
|
-
workspace_command() {
|
|
11
|
-
case "${1:-}" in
|
|
12
|
-
demarrer) echo start ;;
|
|
13
|
-
mettre-a-jour) echo update ;;
|
|
14
|
-
arreter) echo stop ;;
|
|
15
|
-
etat) echo status ;;
|
|
16
|
-
copier-vers) echo copy-to ;;
|
|
17
|
-
copier-depuis) echo copy-from ;;
|
|
18
|
-
migrer) echo migrate ;;
|
|
19
|
-
revenir) echo revert ;;
|
|
20
|
-
nettoyer-docker) echo clean-docker ;;
|
|
21
|
-
*) echo "${1:-}" ;;
|
|
22
|
-
esac
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
workspace_ports_command() {
|
|
26
|
-
case "${1:-}" in
|
|
27
|
-
demarrer) echo start ;;
|
|
28
|
-
arreter) echo stop ;;
|
|
29
|
-
etat) echo status ;;
|
|
30
|
-
*) echo "${1:-}" ;;
|
|
31
|
-
esac
|
|
32
|
-
}
|
|
2
|
+
# Compatibility aliases of the workspace functions renamed during the English
|
|
3
|
+
# migration (#502, lot 3), sourced by manage/workspace.sh. The old French names
|
|
4
|
+
# of the subcommands are refused by reject_renamed (.devcontainer/command-aliases.sh, #695).
|
|
5
|
+
# bash 3.2 (macOS).
|
|
33
6
|
|
|
34
7
|
# compatibility aliases, removed with lot 4 (#509); RACINE and ICI are still
|
|
35
8
|
# read by the scripts of the lot 5 files (argocd-*.sh, services-workspace.sh)
|
package/manage/workspace.sh
CHANGED
|
@@ -192,24 +192,19 @@ copy_from() {
|
|
|
192
192
|
# shellcheck source=manage/scripts/workspace-egress.sh
|
|
193
193
|
. "$HERE/scripts/workspace-egress.sh"
|
|
194
194
|
|
|
195
|
-
#
|
|
196
|
-
#
|
|
195
|
+
# Renamed names (#695): an old French name is refused before anything runs, with
|
|
196
|
+
# its English name (« devzone workspace start »). A copied devzone may miss the
|
|
197
|
+
# aliases file: then no check.
|
|
197
198
|
# shellcheck source=../.devcontainer/command-aliases.sh
|
|
198
199
|
# shellcheck disable=SC1091
|
|
199
200
|
if [ -f "$ROOT/.devcontainer/command-aliases.sh" ]; then
|
|
200
201
|
. "$ROOT/.devcontainer/command-aliases.sh"
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
fi
|
|
205
|
-
set -- "$(command_canonical "$1")" "${@:2}"
|
|
202
|
+
reject_renamed workspace "$@" || exit 1
|
|
203
|
+
if [ "${1:-}" = ports ] && [ "$#" -gt 1 ]; then
|
|
204
|
+
reject_renamed "workspace ports" "${@:2}" || exit 1
|
|
206
205
|
fi
|
|
207
206
|
fi
|
|
208
207
|
|
|
209
|
-
if [ "$#" -gt 0 ]; then set -- "$(workspace_command "$1")" "${@:2}"; fi
|
|
210
|
-
if [ "${1:-}" = "ports" ] && [ "$#" -gt 1 ]; then
|
|
211
|
-
set -- "$1" "$(workspace_ports_command "$2")" "${@:3}"
|
|
212
|
-
fi
|
|
213
208
|
|
|
214
209
|
case "${1:-}" in
|
|
215
210
|
start) start_workspace "${@:2}" ;;
|
|
@@ -228,7 +223,7 @@ case "${1:-}" in
|
|
|
228
223
|
services) services "${@:2}" ;;
|
|
229
224
|
argocd) argocd_cmd "${@:2}" ;;
|
|
230
225
|
egress) egress_workspace "${@:2}" ;;
|
|
231
|
-
'' | -h | --help |
|
|
226
|
+
'' | -h | --help | help)
|
|
232
227
|
echo "devzone workspace start|stop|status|shell|vscode|copy-to|copy-from|clone|ports|services|argocd|migrate|revert|clean-docker|update|egress"
|
|
233
228
|
echo " start [--image repository:tag] install workspace (image for devzone version by default)"
|
|
234
229
|
echo " update [--version X.Y.Z] [--yes] move to the latest stable release (or X.Y.Z); the pod is recreated"
|