Skip to content

Commit

Permalink
Merge pull request #11 from bodo-run/windows-firendly
Browse files Browse the repository at this point in the history
Windows firendly
  • Loading branch information
mohsen1 authored Jan 17, 2025
2 parents f2b6b89 + 8f7a6ad commit 71b1ae2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/installation_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Test installation script
- name: Get install script
id: get_linux_install_script
run: |
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/scripts/install_stop_nagging.sh | bash
readme=$(cat README.md)
# the script is between <!-- LINUX_INSTALLATION_BEGIN --> and <!-- LINUX_INSTALLATION_END -->
# we remove lines starting with ```
script=$(echo "$readme" | sed -n '/<!-- LINUX_INSTALLATION_BEGIN -->/,/<!-- LINUX_INSTALLATION_END -->/p' | sed '/^```/d')
echo "::set-output name=script::$script"
- name: Test installation script
run: ${{ steps.get_linux_install_script.outputs.script }}

- name: Verify installation
run: |
Expand All @@ -28,10 +36,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Get install script
id: get_windows_install_script
run: |
readme=$(cat README.md)
# the script is between <!-- WINDOWS_INSTALLATION_BEGIN --> and <!-- WINDOWS_INSTALLATION_END -->
# we remove lines starting with ```
script=$(echo "$readme" | sed -n '/<!-- WINDOWS_INSTALLATION_BEGIN -->/,/<!-- WINDOWS_INSTALLATION_END -->/p' | sed '/^```/d')
echo "::set-output name=script::$script"
- name: Test installation script
shell: powershell
run: |
iwr https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/scripts/install_stop_nagging.ps1 -useb | iex
run: ${{ steps.get_windows_install_script.outputs.script }}

- name: Verify installation
shell: powershell
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules/
package-lock.json
yarn.lock
pnpm-lock.yaml
Miniconda3-latest-Linux-x86_64.sh
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

It uses a YAML file (`tools.yaml`) to list each tool's name, environment variables, and commands to run, making it easy for new contributors to update the logic without writing Rust code.

> [!WARNING]
> This tool is very new and may not work for all your tools. If you find a tool that doesn't work, please open an issue or submit a PR to fix it.
## Philosophy

`stop-nagging` is designed to be a fast, simple, and effective tool for disabling nags and warnings. Running `stop-nagging` should be a no-op and it should not modify the source code. Some tools might require configuration changes to stop nagging, we will not modify the source code to do this.
Expand All @@ -16,19 +19,23 @@ Head over to [`tools.yaml`](tools.yaml) to see the list of supported tools.

### Quick Install (Linux/macOS)

<!-- LINUX_INSTALLATION_BEGIN -->

```bash
curl -s https://raw.githubusercontent.com/bodo-run/stop-nagging/main/scripts/install_stop_nagging.sh | bash
```

Then add `~/.local/bin` to your PATH if not already.
<!-- LINUX_INSTALLATION_END -->

### Quick Install (Windows)

1. Download and run the PowerShell installer script:
<!-- WINDOWS_INSTALLATION_BEGIN -->
```powershell
# Example in PowerShell
iwr https://raw.githubusercontent.com/bodo-run/stop-nagging/main/scripts/install_stop_nagging.ps1 -UseBasicParsing | iex
```
<!-- WINDOWS_INSTALLATION_END -->
2. If needed, add the installation directory (default: `$HOME\.local\bin`) to your PATH.

### From Source
Expand Down
10 changes: 5 additions & 5 deletions tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,25 @@ ecosystems:
commands: []
skip: false

frameworks:
check_ecosystem: "command -v next >/dev/null 2>&1 || command -v gatsby >/dev/null 2>&1 || command -v ng >/dev/null 2>&1"
js_frameworks:
check_ecosystem: "command -v node_modules/.bin/next >/dev/null 2>&1 || command -v node_modules/.bin/gatsby >/dev/null 2>&1 || command -v node_modules/.bin/ng >/dev/null 2>&1"
tools:
- name: "next"
executable: "next"
executable: "node_modules/.bin/next"
env:
NEXT_TELEMETRY_DISABLED: "1"
commands: []
skip: false

- name: "gatsby"
executable: "gatsby"
executable: "node_modules/.bin/gatsby"
env:
GATSBY_TELEMETRY_DISABLED: "1"
commands: []
skip: false

- name: "angular"
executable: "ng"
executable: "node_modules/.bin/ng"
env:
NG_CLI_ANALYTICS: "false"
commands:
Expand Down

0 comments on commit 71b1ae2

Please sign in to comment.