Skip to content
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

Update bootstrap SHA #42

Merged
merged 1 commit into from
Sep 8, 2023
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
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