Compare commits

..

2 Commits
26.3.1 ... main

Author SHA1 Message Date
3b6ace12e9 feat(scripts): add shellspec installation to dfm (#296)
* feat(scripts): add shellspec installation to dfm

Add install-shellspec.sh script that clones shellspec to
~/.cache/shellspec and installs via make to ~/.local/bin.
Wire it into dfm install menu and the Tier 4 install-all pipeline.

* fix(scripts): address PR review feedback for shellspec installer

Add companion install-shellspec.md documentation file to match
codebase convention. Add --depth=1 to git pull for consistent
shallow clone behavior.

* fix(scripts): pin shellspec install to latest release tag

Use x-gh-get-latest-version to fetch the latest release tag from
GitHub and clone/checkout that specific version. Addresses supply
chain concern and normalizes --depth=1 style.

* docs(scripts): update shellspec docs to reflect release-tag pinning
2026-03-02 16:39:17 +02:00
renovate[bot]
f92e4a606f chore(deps): lock file maintenance (#295)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-02 00:58:41 +02:00
4 changed files with 67 additions and 6 deletions

View File

@@ -88,6 +88,7 @@ section_install()
"nvm-latest:Install latest lts node using nvm"
"nvm:Install Node Version Manager (nvm)"
"python-packages:Install Python packages via uv"
"shellspec:Install shellspec testing framework"
"xcode-cli-tools:Install Xcode CLI tools (macOS)"
"z:Install z"
)
@@ -121,6 +122,7 @@ section_install()
$0 install ntfy
# Tier 4: Independent utilities
$0 install shellspec
$0 install z
msgr msg "Reloading configurations again..."
@@ -245,6 +247,12 @@ section_install()
&& msgr yay "Xcode CLI tools installed!"
;;
shellspec)
msgr run "Installing shellspec..."
bash "$DOTFILES/scripts/install-shellspec.sh" \
&& msgr yay "shellspec has been installed!"
;;
z)
msgr run "Installing z..."
bash "$DOTFILES/scripts/install-z.sh" \

View File

@@ -0,0 +1,16 @@
# install-shellspec
Installs [shellspec](https://github.com/shellspec/shellspec), a BDD-style
testing framework for shell scripts.
## Usage
```bash
scripts/install-shellspec.sh
```
The script resolves the latest release tag via `x-gh-get-latest-version`,
clones shellspec to `~/.cache/shellspec` pinned to that tag, and runs
`make install PREFIX=$HOME/.local`, placing the binary in `~/.local/bin/`.
Re-running the script fetches and checks out the newest release tag
before reinstalling.

37
scripts/install-shellspec.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -euo pipefail
# @description Install shellspec testing framework
#
# shellcheck source=shared.sh
source "${DOTFILES}/config/shared.sh"
SHELLSPEC_REPO="https://github.com/shellspec/shellspec.git"
SHELLSPEC_CACHE="$HOME/.cache/shellspec"
install_shellspec()
{
local version
version=$(x-gh-get-latest-version shellspec/shellspec)
msgr ok "Latest shellspec version: $version"
if [[ -d "$SHELLSPEC_CACHE" ]]; then
msgr ok "shellspec repo already cloned, fetching $version..."
git -C "$SHELLSPEC_CACHE" fetch --depth=1 origin "refs/tags/$version"
git -C "$SHELLSPEC_CACHE" checkout "$version"
else
git clone --branch "$version" --depth=1 "$SHELLSPEC_REPO" "$SHELLSPEC_CACHE"
fi
msgr run "Running make install..."
make -C "$SHELLSPEC_CACHE" install PREFIX="$HOME/.local"
msgr run_done "shellspec $version installed to $HOME/.local/bin/shellspec"
return 0
}
main()
{
install_shellspec
return 0
}
main "$@"

View File

@@ -97,11 +97,11 @@ __metadata:
linkType: hard
"@types/node@npm:^25.3.2":
version: 25.3.2
resolution: "@types/node@npm:25.3.2"
version: 25.3.3
resolution: "@types/node@npm:25.3.3"
dependencies:
undici-types: "npm:~7.18.0"
checksum: 10c0/946c8758668762d3c3b475281b420e580d0ce828c6847534a822b92be791e23e5879b53001ea928e5352dec8908082d854b8076b7bcfc69549e23ad54b1f98ab
checksum: 10c0/63e1d3816a9f4a706ab5d588d18cb98aa824b97748ff585537d327528e9438f58f69f45c7762e7cd3a1ab32c1619f551aabe8075d13172f9273cf10f6d83ab91
languageName: node
linkType: hard
@@ -122,11 +122,11 @@ __metadata:
linkType: hard
"brace-expansion@npm:^5.0.2":
version: 5.0.3
resolution: "brace-expansion@npm:5.0.3"
version: 5.0.4
resolution: "brace-expansion@npm:5.0.4"
dependencies:
balanced-match: "npm:^4.0.2"
checksum: 10c0/e474d300e581ec56851b3863ff1cf18573170c6d06deb199ccbd03b2119c36975f6ce2abc7b770f5bebddc1ab022661a9fea9b4d56f33315d7bef54d8793869e
checksum: 10c0/359cbcfa80b2eb914ca1f3440e92313fbfe7919ee6b274c35db55bec555aded69dac5ee78f102cec90c35f98c20fa43d10936d0cd9978158823c249257e1643a
languageName: node
linkType: hard