Skip to content

Commit

Permalink
Update bootstrap SHA (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescurtin authored Sep 8, 2023
1 parent 8311d3f commit c22dc20
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ jobs:
run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
- name: Check formatting
run: shfmt -f . | grep -v meta/dotbot | xargs shfmt -s -d
correct-sha256:
name: SHA256 in README is correct
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Update SHA script
run: bin/update-bootstrap-sha
- name: Check that there is no diff
run: git diff --exit-code
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ $ cd ~/repos/dotfiles
./install-profile mac
```

## Testing
## Developing and Testing

If you update the `bootstrap/bootstrap.sh` file, you must also run

```bash
bin/update-bootstrap-sha
```

To run all lints and tests:
```bash
$ ./test.sh
bin/test
```
File renamed without changes.
5 changes: 5 additions & 0 deletions bin/update-bootstrap-sha
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
BOOTSTRAP_SHA=$(sha256sum "${SCRIPT_DIR}/../bootstrap/bootstrap.sh" | awk '{ print $1 }')
# shellcheck disable=SC2016
sed -i -e 's/\(sha256 checksum: `\)\(.*\)\(`\)/\1'"${BOOTSTRAP_SHA}"'\3/g' "${SCRIPT_DIR}/../README.md"
4 changes: 4 additions & 0 deletions homebrew/Brewfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ brew "zlib"
# Yubikey/GPG
brew "gnupg"
brew "hopenpgp-tools"
brew "libfido2"
brew "openssh"
brew "pinentry-mac"
brew "ykman"
brew "ykpers"
cask "yubico-authenticator"
cask "yubico-yubikey-manager"

Expand All @@ -28,6 +31,7 @@ brew "coreutils"
brew "diff-so-fancy"
brew "direnv"
brew "git"
brew "gnu-sed"
brew "hashicorp/tap/terraform"
brew "helm"
brew "htop"
Expand Down
2 changes: 1 addition & 1 deletion shells/zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export SSH_KEY_PATH="${HOME}/.ssh/rsa_id"
export GOPATH="${HOME}/.go"
GOROOT="$(brew --prefix golang)/libexec"
export GOROOT
export PATH="/opt/homebrew/bin:$HOME/bin:/usr/local/sbin:${GOPATH}/bin:${GOROOT}/bin:$HOME/.cargo/bin:$PATH"
export PATH="/opt/homebrew/bin:$HOME/bin:/usr/local/sbin:${GOPATH}/bin:${GOROOT}/bin:$HOME/.cargo/bin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"

activate_gpg
activate_powerline
Expand Down

0 comments on commit c22dc20

Please sign in to comment.