oh-my-devpod 0.14.3 → 0.14.4
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/package.json +1 -1
- package/runtime/VERSION +1 -1
- package/runtime/bin/omd +0 -0
- package/runtime/install/bootstrap.sh +1 -0
- package/runtime/install/update.sh +41 -1
package/package.json
CHANGED
package/runtime/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.14.
|
|
1
|
+
0.14.4
|
package/runtime/bin/omd
CHANGED
|
Binary file
|
|
@@ -32,6 +32,40 @@ omd_update_archive_version() {
|
|
|
32
32
|
printf '%s\n' "${version}"
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
omd_update_install_archive() {
|
|
36
|
+
local archive="$1" prefix="$2" bin_dir="$3" cache_dir="$4"
|
|
37
|
+
local staging_dir candidate_root candidate_bootstrap installed_version
|
|
38
|
+
staging_dir="$(mktemp -d "${cache_dir}/.candidate-bootstrap.XXXXXX")" || return 1
|
|
39
|
+
if ! tar -xzf "${archive}" -C "${staging_dir}"; then
|
|
40
|
+
rm -rf "${staging_dir}"
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
43
|
+
candidate_root="${staging_dir}/oh-my-devpod"
|
|
44
|
+
if ! omd_validate_bundle "${candidate_root}"; then
|
|
45
|
+
rm -rf "${staging_dir}"
|
|
46
|
+
return 1
|
|
47
|
+
fi
|
|
48
|
+
candidate_bootstrap="${candidate_root}/install/bootstrap.sh"
|
|
49
|
+
if ! installed_version="$(
|
|
50
|
+
OHMYDEVPOD_BOOTSTRAP_LIB_ONLY=1 \
|
|
51
|
+
bash -c '
|
|
52
|
+
set -euo pipefail
|
|
53
|
+
source "$1"
|
|
54
|
+
omd_install_archive "$2" "$3" "$4"
|
|
55
|
+
' _ \
|
|
56
|
+
"${candidate_bootstrap}" \
|
|
57
|
+
"${archive}" \
|
|
58
|
+
"${prefix}" \
|
|
59
|
+
"${bin_dir}"
|
|
60
|
+
)"; then
|
|
61
|
+
rm -rf "${staging_dir}"
|
|
62
|
+
return 1
|
|
63
|
+
fi
|
|
64
|
+
rm -rf "${staging_dir}"
|
|
65
|
+
[[ -n "${installed_version}" ]] || return 1
|
|
66
|
+
printf '%s\n' "${installed_version}"
|
|
67
|
+
}
|
|
68
|
+
|
|
35
69
|
omd_update_snapshot_source_config() {
|
|
36
70
|
local config_dir="$1" snapshot_dir="$2" name
|
|
37
71
|
mkdir -p "${snapshot_dir}" || return 1
|
|
@@ -374,7 +408,13 @@ omd_update_main() {
|
|
|
374
408
|
fi
|
|
375
409
|
|
|
376
410
|
if [[ -n "${archive}" ]]; then
|
|
377
|
-
if ! installed_version="$(
|
|
411
|
+
if ! installed_version="$(
|
|
412
|
+
omd_update_install_archive \
|
|
413
|
+
"${archive}" \
|
|
414
|
+
"${prefix}" \
|
|
415
|
+
"${bin_dir}" \
|
|
416
|
+
"${cache_dir}"
|
|
417
|
+
)"; then
|
|
378
418
|
if [[ "${manage_source}" == "1" ]]; then
|
|
379
419
|
omd_update_abort_with_rollback "Self-update installation failed" "${config_dir}" "${snapshot_dir}"
|
|
380
420
|
fi
|