Skip to content

Commit dec16bc

Browse files
author
John Smith III
committed
Initial commit
0 parents  commit dec16bc

File tree

15 files changed

+2081
-0
lines changed

15 files changed

+2081
-0
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
buy_me_a_coffee: binarynoir
2+
ko_fi: binarynoir

.github/workflows/release.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Release Application
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Release pushed tag
14+
runs-on: ubuntu-22.04
15+
env:
16+
VERSION: "${{ github.ref_name }}" # Sets VERSION based on tag
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Create release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
tag: ${{ github.ref_name }}
25+
run: |
26+
gh release create "$tag" \
27+
--repo="$GITHUB_REPOSITORY" \
28+
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
29+
--generate-notes || exit 1
30+
31+
- name: Get release ID
32+
id: get_release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
tag: ${{ github.ref_name }}
36+
run: |
37+
release_id=$(gh release view "$tag" --json id --jq '.id') || exit 1
38+
echo "release_id=$release_id" >> $GITHUB_ENV
39+
40+
- name: Download tarball
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
release_id: ${{ env.release_id }}
44+
run: |
45+
curl -L -H "Authorization: token $GITHUB_TOKEN" \
46+
-H "Accept: application/vnd.github.v3.raw" \
47+
-o "noirwatch-${{ env.VERSION }}.tar.gz" \
48+
"https://github.com/binarynoir/noirwatch/archive/refs/tags/${{ env.VERSION }}.tar.gz" || exit 1
49+
50+
- name: Calculate SHA-256 checksum
51+
id: calculate_sha
52+
run: |
53+
SHA256_SUM=$(sha256sum "noirwatch-${{ env.VERSION }}.tar.gz" | awk '{ print $1 }') || exit 1
54+
echo "SHA256_SUM=$SHA256_SUM" >> $GITHUB_ENV
55+
56+
- name: Checkout Homebrew repository
57+
uses: actions/checkout@v3
58+
with:
59+
repository: binarynoir/homebrew-noirwatch
60+
path: homebrew-noirwatch
61+
persist-credentials: false
62+
63+
- name: Set up Git credentials
64+
run: |
65+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
66+
git config --global user.name "github-actions[bot]"
67+
68+
- name: Modify noirwatch.rb
69+
env:
70+
SHA256_SUM: ${{ env.SHA256_SUM }}
71+
run: |
72+
sed -i "s|url \".*\"|url \"https://github.com/binarynoir/noirwatch/archive/refs/tags/${{ env.VERSION }}.tar.gz\"|" homebrew-noirwatch/noirwatch.rb
73+
sed -i "s|sha256 \".*\"|sha256 \"${{ env.SHA256_SUM }}\"|" homebrew-noirwatch/noirwatch.rb
74+
75+
- name: Commit and push changes
76+
run: |
77+
cd homebrew-noirwatch
78+
git add noirwatch.rb
79+
git commit -m "Update noirwatch.rb for version ${{ env.VERSION }}"
80+
git push https://x-access-token:${{ secrets.TARGET_REPO_PAT }}@github.com/binarynoir/homebrew-noirwatch HEAD:main || exit 1
81+
env:
82+
TARGET_REPO_PAT: ${{ secrets.TARGET_REPO_PAT }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
*.tar.gz

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "bashdb",
9+
"request": "launch",
10+
"name": "Bash-Debug (simplest configuration)",
11+
"program": "${file}",
12+
"argsString": " -v -L DEBUG"
13+
// "argsString": "-L TRACE" // test invalid log level
14+
// "argsString": "--clean" // test clean
15+
}
16+
]
17+
}

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"cSpell.words": [
3+
"mandb",
4+
"mktemp",
5+
"msys",
6+
"noirnet",
7+
"noirwatch",
8+
"noscript",
9+
"nslookup",
10+
"osascript",
11+
"realpath",
12+
"subshell"
13+
]
14+
}

Brewfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Brewfile for NoirWatch project
2+
3+
# Install bash
4+
brew install bash
5+
6+
# Custom script setup
7+
system "curl -o /usr/local/bin/noirwatch https://raw.githubusercontent.com/binarynoir/noirwatch/main/noirwatch"
8+
system "chmod +x /usr/local/bin/noirwatch"
9+
10+
# Install the man page
11+
system "curl -o /usr/local/share/man/man1/noirwatch.1 https://raw.githubusercontent.com/binarynoir/noirwatch/main/noirwatch.1"
12+
system "man -c /usr/local/share/man/man1/noirwatch.1"

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
- none
11+
12+
## [1.0.0] - 2024-11-23
13+
14+
### Added
15+
16+
- Initial release

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 BinaryNoir
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)