Repository navigation
Update from project-template v0.75.1 #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b2a0909
Plan step 1: Update from project-template v0.75.1
polewskm b42818e
Plan step 3: Record ADR-1002, the project's Node.js selector
polewskm ef953b3
Plan step 4: Describe tag-release.yml and the selector override in AG…
polewskm c13990f
Plan step 5: Name the manual release workflow Release (manual)
polewskm 29795b8
Plan step 6: Write the changelog entry
polewskm 2e999ce
Keep the git push approval prompt in Claude Code settings
polewskm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # ensure-pwsh.sh - make PowerShell available in a Claude Code cloud session. | ||
| # | ||
| # This project's scripts and commands run with `pwsh`, and a cloud session's | ||
| # container doesn't have it, so a session would stop and ask to install it. | ||
| # The SessionStart hook in .claude/settings.json runs this file instead. | ||
| # | ||
| # It does nothing outside a cloud session (CLAUDE_CODE_REMOTE is not "true"), | ||
| # so it never installs software on a developer's own machine, and nothing when | ||
| # pwsh is already on the PATH, such as when the cloud environment's setup script | ||
| # installed it. Otherwise, on Ubuntu 24.04 x86_64 it installs the pinned | ||
| # PowerShell package from Microsoft's apt repository, which a cloud session's | ||
| # network reaches by default, after checking its SHA-256. Any other system, or | ||
| # any failure, prints one line and exits 0: the hook never blocks a session. | ||
| # | ||
| # To move to a newer PowerShell, change PWSH_VERSION and PWSH_SHA256 to the values of the | ||
| # `powershell` entry in | ||
| # https://packages.microsoft.com/ubuntu/24.04/prod/dists/noble/main/binary-amd64/Packages.gz | ||
| # | ||
| # This file comes from the project template, and template updates replace it. | ||
|
|
||
| [ "${CLAUDE_CODE_REMOTE:-}" = "true" ] || exit 0 | ||
| command -v pwsh >/dev/null 2>&1 && exit 0 | ||
|
|
||
| PWSH_VERSION=7.6.9-1.deb | ||
| PWSH_SHA256=491b1a51e257e2ac86af33e3a4dc9aa91adb1b3926a57967af39d9a1ca38dc79 | ||
|
|
||
| os=$(. /etc/os-release 2>/dev/null && echo "${ID:-}:${VERSION_ID:-}:${PRETTY_NAME:-unknown}") | ||
| case "$os:$(uname -m)" in | ||
| ubuntu:24.04:*:x86_64) ;; | ||
| *) | ||
| echo "ensure-pwsh: pwsh is missing and this system (${os#*:*:}, $(uname -m)) has no pinned package; install PowerShell 7 to run this project's scripts." | ||
| exit 0 | ||
| ;; | ||
| esac | ||
|
|
||
| sudo= | ||
| if [ "$(id -u)" != 0 ]; then | ||
| command -v sudo >/dev/null 2>&1 && sudo="sudo -n" || { | ||
| echo "ensure-pwsh: pwsh is missing and this session is not root and has no sudo." | ||
| exit 0 | ||
| } | ||
| fi | ||
|
|
||
| # env sets DEBIAN_FRONTEND for apt-get itself, which sudo would otherwise strip; the package lists are refreshed | ||
| # only when the first install fails, since a fresh container's lists may be empty or stale. | ||
| apt_install() { $sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y "$dir/$file" >/dev/null; } | ||
|
|
||
| dir=$(mktemp -d) || exit 0 | ||
| file="powershell_${PWSH_VERSION}_amd64.deb" | ||
| curl -fsS -m 120 -o "$dir/$file" "https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/p/powershell/$file" && | ||
| echo "$PWSH_SHA256 $dir/$file" | sha256sum -c - >/dev/null && | ||
| { apt_install || { $sudo apt-get update -qq >/dev/null 2>&1 && apt_install; }; } && | ||
| echo "ensure-pwsh: installed PowerShell $(pwsh -NoProfile -Command '$PSVersionTable.PSVersion.ToString()')" || | ||
| echo "ensure-pwsh: installing PowerShell failed; the project's scripts need pwsh." | ||
| rm -rf "$dir" | ||
| exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.