Skip to content

Commit d7257ad

Browse files
authored
feat: update README.md (#2)
* feat: update README.md
1 parent b04ec46 commit d7257ad

File tree

7 files changed

+53
-16
lines changed

7 files changed

+53
-16
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5.6.0
1414
with:
1515
python-version: "3.x"
16-
- name: Install shfmt and shellcheck
17-
if: steps.apt-cache.outputs.cache-hit != 'true'
18-
run: sudo apt-get update && sudo apt-get install -y shellcheck shfmt
16+
- name: Install dependencies
17+
run: |
18+
chmod +x shell/install_shell_deps.sh
19+
./shell/install_shell_deps.sh
1920
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1
2021
with:
2122
extra_args: --all-files

.github/workflows/versioning.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
2020
with:
2121
fetch-depth: 0
2222

2323
- name: Release
24-
uses: cycjimmy/semantic-release-action@v4
24+
uses: cycjimmy/semantic-release-action@16ca923e6ccbb50770c415a0ccd43709a8c5f7a4 #v4.2.2
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"tabWidth": 4,
4+
"trailingComma": "es5",
5+
"printWidth": 105
6+
}

.releaserc.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"branches": ["main"],
3-
"plugins": [
4-
"@semantic-release/commit-analyzer",
5-
"@semantic-release/release-notes-generator",
6-
"@semantic-release/github"
7-
]
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/github"
7+
]
88
}

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ setup_dev:
88
pipx install pre-commit
99
pre-commit install
1010

11-
brew install shfmt shellcheck
11+
chmod +x shell/install_shell_deps.sh
12+
./shell/install_shell_deps.sh
1213

1314
assert_setup_dev:
1415
pre-commit run -a
1516

17+
ci:
18+
chmod +x common/install_brew_packages.sh
19+
./common/install_brew_packages.sh
20+
1621
lint:
1722
find . -type f -name "*.sh" -exec shfmt -w -i 6 {} +
1823
find . -type f -name "*.sh" -exec shellcheck {} +
24+
prettier --write "**/*.{json,yaml,yml,md}"

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Shared Scripts
22

3-
Collection of development setup and utility scripts for macOS environments.
3+
Quick-share command line scripts for use in quick command runner like Makefile or Justfile.
44

55
## Quick Start
66

@@ -11,6 +11,19 @@ make assert_setup_dev # Validate setup
1111

1212
## Requirements
1313

14-
- macOS
15-
- Homebrew
16-
- Zsh shell
14+
- macOS
15+
- Homebrew
16+
- Zsh shell
17+
18+
## Usage
19+
20+
```bash
21+
git submodule add -b main https://github.com/wisarootl/shared-scripts.git scripts/shared
22+
```
23+
24+
```Makefile
25+
setup_dev:
26+
chmod +x scripts/shared/node/setup_dev.sh
27+
./scripts/shared/node/setup_dev.sh
28+
exec zsh
29+
```

shell/install_shell_deps.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [[ "$OSTYPE" == "darwin"* ]]; then
6+
brew install shfmt shellcheck prettier
7+
else
8+
sudo apt-get update
9+
sudo apt-get install -y shfmt shellcheck nodejs npm
10+
npm install -g prettier
11+
fi

0 commit comments

Comments
 (0)