mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-09 01:49:49 -10:00
chore(installer): drop the new code comments added with the install fix
Repository rule: no new code comments; the reasoning belongs in commit messages. e9c9de775f's message already carries it: - `(dev)` in CODEWHALE_BUILD_VERSION marks an unstamped checkout. A release artifact carries its short SHA, and a Cargo source package carries the plain version. - A forced reinstall that fails puts the moved-aside command back. This removes the comment added in update.rs and the forced-backup comment blocks added in both installers. The edited comment that explains when existing binaries are replaced stays, because it now describes CODEWHALE_FORCE_REINSTALL. Comment-only change. Verified: `bash -n scripts/release/install.sh` and `sh -n web/public/install.sh` pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e9c9de775f
commit
b63e5af3ac
3 files changed
-12
No files matched your search
@@ -62,10 +62,6 @@ pub fn run_update(beta: bool, check_only: bool, proxy_arg: Option<String>) -> Re
|
||||
let channel = ReleaseChannel::from_beta_flag(beta);
|
||||
let current_version = env!("CARGO_PKG_VERSION");
|
||||
let build_version = env!("CODEWHALE_BUILD_VERSION");
|
||||
// The build script marks an unstamped checkout with `(dev)` and nothing
|
||||
// else: a release artifact carries its short SHA and a Cargo source
|
||||
// package carries the plain version. Only the checkout marker means the
|
||||
// installed file has no published artifact behind it.
|
||||
let unreleased_checkout_build = build_version.ends_with(" (dev)");
|
||||
let proxy = proxy_arg
|
||||
.as_deref()
|
||||
|
||||
@@ -147,9 +147,6 @@ check_destination() {
|
||||
|
||||
# The image is an explicit installer choice; presence never changes Core's
|
||||
# Node default. Archives carry notices/source beside any qualified image.
|
||||
# Backups this run made under CODEWHALE_FORCE_REINSTALL. A run that fails after
|
||||
# moving a command aside puts it back, so a forced install that does not
|
||||
# complete never leaves a command missing from the prefix.
|
||||
forced_backups=()
|
||||
stage=""
|
||||
stage_dir=""
|
||||
|
||||
@@ -245,9 +245,6 @@ esac
|
||||
tmpdir="$(mktemp -d 2>/dev/null || mktemp -d -t codewhale-install)"
|
||||
trap 'rm -rf "$tmpdir"' EXIT INT TERM
|
||||
|
||||
# Backups this run made under CODEWHALE_FORCE_REINSTALL, newest last. A run that
|
||||
# fails after moving a command aside puts it back, so a forced install that does
|
||||
# not complete never leaves the command missing from the install directory.
|
||||
forced_backups="$tmpdir/.forced-backups"
|
||||
: > "$forced_backups"
|
||||
|
||||
@@ -273,8 +270,6 @@ restore_forced_backups() {
|
||||
while IFS= read -r backup; do
|
||||
[ -n "$backup" ] || continue
|
||||
[ -e "$backup" ] || continue
|
||||
# The name this run generated ends in .bak-<utc-stamp>[-<n>]; the
|
||||
# destination is everything before it.
|
||||
destination="$(printf '%s' "$backup" | sed 's/\.bak-[0-9TZ]*\(-[0-9][0-9]*\)\{0,1\}$//')"
|
||||
if [ ! -e "$destination" ] && [ ! -L "$destination" ]; then
|
||||
mv "$backup" "$destination" && say "Restored $destination: this install did not complete." >&2
|
||||
|
||||
Reference in new issue
Block a user