-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into automation
- Loading branch information
Showing
54 changed files
with
889 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,20 @@ | |
|
||
## Supported Versions | ||
|
||
It is recommended that you run the stable version as this is more tested and used by most. The dev branch is bleed-edge commits that are not well tested and aren't meant to be used in production environments | ||
It is recommended that you use the stable branch as it's tested and used by most. The dev branch may contain bleeding-edge commits that are not well tested and are not meant to be used in production environments.<br> | ||
Version tags lower than the [latest stable release](https://github.com/ChrisTitusTech/linutil/releases/latest) are **not** supported. | ||
|
||
| Version | Supported | | ||
| ------- | ------------------ | | ||
| latest | :white_check_mark: | | ||
| dev | :x: | | ||
| Branch | Supported | | ||
| ------- | ---------------------- | | ||
| Stable | :white_check_mark: YES | | ||
| Dev | :x: NO | | ||
|
||
| Version | Supported | | ||
| -------------------------------------------------- | ---------------------- | | ||
| [![LATEST](https://img.shields.io/github/v/release/ChrisTitusTech/linutil?color=%230567ff&label=Latest&style=for-the-badge)](https://github.com/ChrisTitusTech/linutil/releases/latest) | :white_check_mark: YES | | ||
| Below LATEST | :x: NO | | ||
| Above LATEST | :x: NO | | ||
|
||
## Reporting a Vulnerability | ||
|
||
I'd recommend making an Issue for reporting a bug. If you would like privately submit the bug you can email me at [email protected] | ||
If you have any reason to believe there are security vulnerabilities in Linutil, fill out the [report form](https://github.com/christitustech/linutil/security/advisories/new) or e-mail [[email protected]](mailto:[email protected]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,19 +46,9 @@ jobs: | |
run: cargo build --target-dir=build --release --verbose --target=x86_64-unknown-linux-musl --all-features | ||
|
||
- name: Build aarch64 binary | ||
run: cross build --target-dir=build --release --verbose --target=aarch64-unknown-linux-musl --all-features | ||
|
||
- name: Move binaries to build directory | ||
run: | | ||
mv build/x86_64-unknown-linux-musl/release/linutil build/linutil | ||
mv build/aarch64-unknown-linux-musl/release/linutil build/linutil-aarch64 | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Commit Linutil | ||
file_pattern: "build/linutil build/linutil-aarch64" | ||
add_options: '--force' | ||
if: success() | ||
cross build --target-dir=build --release --verbose --target=aarch64-unknown-linux-musl --all-features | ||
mv ./build/aarch64-unknown-linux-musl/release/linutil ./build/aarch64-unknown-linux-musl/release/linutil-aarch64 | ||
- name: Extract Version | ||
id: extract_version | ||
|
@@ -80,32 +70,19 @@ jobs: | |
append_body: true | ||
generate_release_notes: true | ||
files: | | ||
./build/linutil | ||
./build/linutil-aarch64 | ||
./build/x86_64-unknown-linux-musl/release/linutil | ||
./build/aarch64-unknown-linux-musl/release/linutil-aarch64 | ||
./start.sh | ||
./startdev.sh | ||
prerelease: true | ||
env: | ||
version: ${{ env.version }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Preview | ||
run: | | ||
echo "$(pwd)/build" >> $GITHUB_PATH | ||
- name: Generate preview | ||
uses: charmbracelet/[email protected] | ||
with: | ||
path: "docs/assets/preview.tape" | ||
|
||
- name: Move preview | ||
run: | | ||
mv preview.gif docs/assets/preview.gif | ||
- name: Upload preview | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
commit_message: Preview for ${{ env.version }} | ||
file_pattern: "docs/assets/preview.gif" | ||
add_options: "--force" | ||
if: success() | ||
name: linutil-artifact | ||
path: build/x86_64-unknown-linux-musl/release/linutil | ||
compression-level: 0 | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: LinUtil Preview | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
run_id: | ||
description: 'Run ID of LinUtil Release' | ||
required: true | ||
workflow_run: | ||
workflows: ["LinUtil Release"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
generate_preview: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set Run ID | ||
run: | | ||
if [ "${{ github.event_name }}" == "workflow_run" ]; then | ||
echo "run_id=${{ github.event.workflow_run.id }}" >> $GITHUB_ENV | ||
else | ||
echo "run_id=${{ github.event.inputs.run_id }}" >> $GITHUB_ENV | ||
fi | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: linutil-artifact | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
run-id: ${{ env.run_id }} | ||
|
||
- name: Set env | ||
run: | | ||
chmod +x linutil | ||
echo "${{ github.workspace }}" >> $GITHUB_PATH | ||
- name: Generate preview | ||
uses: charmbracelet/[email protected] | ||
with: | ||
path: "docs/assets/preview.tape" | ||
|
||
- name: Move preview | ||
run: mv preview.gif docs/assets/preview.gif | ||
|
||
- name: Upload preview | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Preview for ${{ env.run_id }} | ||
file_pattern: "docs/assets/preview.gif" | ||
add_options: "--force" | ||
if: success() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
branches: ["main"] | ||
paths: | ||
- '**/*.rs' | ||
- 'Cargo.toml' | ||
- '**/Cargo.toml' | ||
- 'Cargo.lock' | ||
|
||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,34 @@ | ||
name: ShellCheck | ||
name: Script Checks | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'core/tabs/**/*.sh' | ||
- '**/*.sh' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
shellcheck: | ||
name: Shellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: git fetch origin ${{ github.base_ref }} | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download, setup, and run ShellCheck | ||
shell: bash {0} | ||
run : | | ||
SC_URL="https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz" | ||
curl -fsSL "$SC_URL" | tar -Jx | ||
chmod +x "./shellcheck-v0.10.0/shellcheck" | ||
- name: Run ShellCheck | ||
uses: reviewdog/action-shellcheck@v1 | ||
with: | ||
reviewdog_flags: '-fail-level=any' | ||
|
||
error=0 | ||
files_to_check=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs) | ||
for file in $files_to_check; do | ||
if [[ "$file" == *.sh ]] && [[ -f "$file" ]]; then | ||
sc_output=$(./shellcheck-v0.10.0/shellcheck -fgcc -Serror "$file") | ||
iter_safe_parsed_errors=$(echo -e "$sc_output" | sed -n 's/\(.\+\)\:\([0-9]\+\)\:\([0-9]\+\)\: \(.*\)/::error file=\1,line=\2,col=\3::\4/p' | sed 's/ /:space:/g') | ||
for error in $iter_safe_parsed_errors; do | ||
echo "$error" | sed 's/:space:/ /g' | ||
error=1 | ||
done | ||
tabs_detected=$(grep -nP '^\t+\S+' "$file") | ||
# fast fail on the action runner would fail immediately if there weren't any tabs found | ||
# this check makes sure that we don't continue if there's something really weird going on | ||
if [ "$?" = "2" ]; then | ||
echo "::error file=$file::There was a critical error while grepping $file, aborting" | ||
exit 1 | ||
fi | ||
iter_safe_parsed_tabs_detected=$(echo "$tabs_detected" | sed -n 's,\([0-9]\+\).*,::error file='"$file"'\,line=\1::Found tab indentations,p' | sed 's/ /:space:/g') | ||
for error in $iter_safe_parsed_tabs_detected; do | ||
echo "$error" | sed 's/:space:/ /g' | ||
error=1 | ||
done | ||
fi | ||
done | ||
exit $error | ||
shfmt: | ||
name: Shell Fomatting | ||
runs-on: ubuntu-latest | ||
needs: shellcheck | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run shfmt | ||
uses: reviewdog/action-shfmt@v1 | ||
with: | ||
shfmt_flags: '-i 4 -ci' | ||
reviewdog_flags: '-fail-level=any' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.