Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ cd github-watch

Release installs show whether the installed plugin is current or whether a newer release is available. `Update to latest release` runs in the background, writes to `GITHUBWATCH_UPDATE_LOG`, and replaces the plugin with the latest release asset. Source checkout installs show the current branch and commit for diagnostics, but hide the menu updater to avoid overwriting checkout-managed files. Development updates should use normal git commands in the checkout.

The development installer uses a symlink, matching the `agent-watch` and `menutube` development workflow. The release installer copies a standalone plugin script. The menu updater is only for copied release installs; source checkout installs should be updated with `git pull`.
The development installer uses a symlink, matching the `agent-watch` and `menutube` development workflow. The release installer copies a standalone plugin script. The menu updater is only shown for copied release installs; source checkout installs show git metadata and should be updated with normal git commands.

## Requirements

Expand Down
14 changes: 9 additions & 5 deletions bin/github-watch.5m.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1088,18 +1088,22 @@ print_plugin_rows() {
local root git_summary version_label release_status release_color latest_release
root="$(plugin_repo_root)"
version_label="$(plugin_version_label "$root")"
maybe_refresh_release_check
release_status="$(release_status_label "$version_label")"
release_color="$(release_status_color "$release_status")"
emit "--Version: ${version_label} (${release_status}) | font=Menlo color=$release_color"
if [[ -z "$root" ]]; then
maybe_refresh_release_check
release_status="$(release_status_label "$version_label")"
release_color="$(release_status_color "$release_status")"
emit "--Version: ${version_label} (${release_status}) | font=Menlo color=$release_color"
else
emit "--Version: ${version_label} | font=Menlo"
fi
emit "--Config: $(shorten_path "$CONFIG_FILE") | font=Menlo"
emit "--Script: $(shorten_path "$PLUGIN_PATH") | font=Menlo"
print_gh_status_rows
if [[ -n "$root" ]]; then
git_summary="$(plugin_git_summary "$root")"
emit "--Repo: $(shorten_path "$root") | font=Menlo"
emit "--Git: ${git_summary:-unknown} | font=Menlo"
emit "----Source/dev install: update with git pull, not script replacement | color=gray"
emit "----Use git commands for development updates | color=gray"
else
latest_release="$(cached_latest_release_tag 2>/dev/null || true)"
if [[ -n "$latest_release" && "$(release_tag_norm "$latest_release")" != "$(release_tag_norm "$version_label")" ]]; then
Expand Down
22 changes: 22 additions & 0 deletions scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,28 @@ print -r -- "$output" | grep -q '^GH setup needed'
print -r -- "$output" | grep -q '^GitHub Watch$'
print -r -- "$output" | grep -q 'Open config file'
print -r -- "$output" | grep -q 'Open project page'
print -r -- "$output" | grep -q 'Use git commands for development updates'
if print -r -- "$output" | grep -q 'Update to latest release'; then
print -u2 "source checkout installs should not show the release updater"
exit 1
fi

tmp_release_dir="$(mktemp -d)"
cp "$PLUGIN" "$tmp_release_dir/github-watch.5m.sh"
chmod +x "$tmp_release_dir/github-watch.5m.sh"
release_output="$(
GITHUBWATCH_CONFIG_FILE="$tmp_release_dir/config.env" \
GITHUBWATCH_CACHE_FILE="$tmp_release_dir/inventory.json" \
GITHUBWATCH_RELEASE_CHECK_CACHE="$tmp_release_dir/release-check.tsv" \
GITHUBWATCH_DISABLE_GH=1 \
GITHUBWATCH_CHECK_RELEASE_UPDATES=0 \
"$tmp_release_dir/github-watch.5m.sh"
)"
print -r -- "$release_output" | grep -q 'Update to latest release'
if print -r -- "$release_output" | grep -q 'Use git commands for development updates'; then
print -u2 "copied release installs should not show source checkout update guidance"
exit 1
fi

missing_gh_output="$(
GITHUBWATCH_CONFIG_FILE="$config_file" \
Expand Down
Loading