Skip to content

Commit 3f0c3f6

Browse files
Merge branch 'main' into tilda_env
2 parents f688f0c + 88d6fd1 commit 3f0c3f6

File tree

113 files changed

+2919
-1671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2919
-1671
lines changed

.cargo/config.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
xtask = "run --package xtask --"

.github/CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ cd linutil
1616
```
1717

1818
## 3. Make your changes
19+
1920
- **Edit the files you want to change**: Make your changes to the relevant files.
2021
- **Test your changes**: Run `cargo run` to test your modifications in a local environment and ensure everything works as expected.
2122

@@ -60,6 +61,7 @@ cd linutil
6061
## 11. Documentation
6162

6263
- **Update the documentation**: If your change affects the functionality, please update the relevant documentation files to reflect this.
64+
- **Automatic generation**: If you decide to add functionality through a new shell script, make sure to fill out all fields in `tab_data.toml` and run `cargo xtask docgen`.
6365

6466
## 12. License
6567

.github/SECURITY.md

+13-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
## Supported Versions
44

5-
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
5+
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>
6+
Version tags lower than the [latest stable release](https://github.com/ChrisTitusTech/linutil/releases/latest) are **not** supported.
67

7-
| Version | Supported |
8-
| ------- | ------------------ |
9-
| latest | :white_check_mark: |
10-
| dev | :x: |
8+
| Branch | Supported |
9+
| ------- | ---------------------- |
10+
| Stable | :white_check_mark: YES |
11+
| Dev | :x: NO |
12+
13+
| Version | Supported |
14+
| -------------------------------------------------- | ---------------------- |
15+
| [![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 |
16+
| Below LATEST | :x: NO |
17+
| Above LATEST | :x: NO |
1118

1219
## Reporting a Vulnerability
1320

14-
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]
21+
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]).

.github/mkdocs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ nav:
66
- Introduction: 'index.md'
77
- User Guide: 'userguide.md'
88
- Contributing:
9-
- Contributing Guide: 'contribute.md'
9+
- Contributing Guide: 'contributing.md'
1010
- Roadmap: 'roadmap.md'
1111
- Documentation:
1212
- Known Issues: 'KnownIssues.md'
@@ -86,4 +86,4 @@ plugins:
8686
minify_html: true
8787
htmlmin_opts:
8888
remove_comments: true
89-
cache_safe: true
89+
cache_safe: true

.github/release-drafter.yml

-66
This file was deleted.

.github/release.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
changelog:
2+
categories:
3+
- title: '🚀 Features'
4+
labels:
5+
- 'enhancement'
6+
- title: '🐛 Bug Fixes'
7+
labels:
8+
- 'bug'
9+
- title: '⚙️ Refactoring'
10+
labels:
11+
- 'refactor'
12+
- title: '🧩 UI/UX'
13+
labels:
14+
- 'UI/UX'
15+
- title: '📚 Documentation'
16+
labels:
17+
- 'documentation'
18+
- title: '🔒 Security'
19+
labels:
20+
- 'security'
21+
- title: '🧰 GitHub Actions'
22+
labels:
23+
- 'github_actions'
24+
- title: '🦀 Rust'
25+
labels:
26+
- 'rust'
27+
- title: '📃 Scripting'
28+
labels:
29+
- 'script'
30+
- title: 'Other Changes'
31+
labels:
32+
- "*"
33+
exclude:
34+
labels:
35+
- 'skip-changelog'

.github/workflows/bashisms.yml

+27-15
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Check for bashisms
33
on:
44
pull_request:
55
paths:
6-
- core/tabs/**
6+
- 'core/tabs/**/*.sh'
77
merge_group:
88
workflow_dispatch:
99

@@ -15,21 +15,33 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- run: git fetch origin ${{ github.base_ref }}
1717

18-
- name: Get a list of changed script files
19-
id: get_sh_files
20-
run: |
21-
sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true)
22-
echo "::set-output name=sh_files::$sh_files"
23-
2418
- name: Install devscripts
25-
if: steps.get_sh_files.outputs.sh_files != ''
26-
run: sudo apt-get update && sudo apt-get install devscripts
19+
run: sudo apt-get update && sudo apt-get install -y devscripts
20+
21+
- name: Get changed .sh files (PR only)
22+
id: changed-sh-files
23+
if: github.event_name == 'pull_request'
24+
uses: tj-actions/changed-files@v45
25+
with:
26+
files: '**/*.sh'
27+
28+
- name: Get all .sh files (if workflow dispatched)
29+
id: sh-files
30+
if: github.event_name != 'pull_request'
31+
run: |
32+
files=$(find . -type f -name "*.sh" | tr '\n' ' ')
33+
echo "files=${files:-none}" >> $GITHUB_ENV
34+
35+
- name: Set FILES for bashism check
36+
id: set-files
37+
run: |
38+
if [[ "${{ steps.changed-sh-files.outputs.any_changed }}" == 'true' ]]; then
39+
echo "FILES=${{ steps.changed-sh-files.outputs.all_changed_files }}" >> $GITHUB_ENV
40+
else
41+
echo "FILES=${{ env.files }}" >> $GITHUB_ENV
42+
fi
2743
2844
- name: Check for bashisms
29-
if: steps.get_sh_files.outputs.sh_files != ''
3045
run: |
31-
for file in ${{ steps.get_sh_files.outputs.sh_files }}; do
32-
if [[ -f "$file" ]]; then
33-
checkbashisms "$file"
34-
fi
35-
done
46+
IFS=' ' read -r -a file_array <<< "$FILES"
47+
checkbashisms "${file_array[@]}"

.github/workflows/github-pages.yml

+21
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,34 @@ on:
1313
jobs:
1414
build-and-deploy:
1515
runs-on: ubuntu-latest
16+
environment: linutil_env
17+
permissions:
18+
contents: write
19+
pull-requests: write
1620

1721
steps:
1822
- name: Checkout Repository
1923
uses: actions/checkout@v4
2024
with:
2125
fetch-depth: '0' # Fetch all commit history for all branches as well as tags.
2226

27+
- name: Copy Contributing Guidelines
28+
run: |
29+
echo -e "<!-- THIS FILE IS GENERATED AUTOMATICALLY. EDIT .github/CONTRIBUTING.md -->\n\n$(cat .github/CONTRIBUTING.md)" > 'docs/contributing.md'
30+
31+
- name: Create Pull Request
32+
uses: peter-evans/create-pull-request@v6
33+
with:
34+
commit-message: Update Contributing Guidelines
35+
title: 'docs: Update Contributing Guidelines'
36+
body: 'Automated update of Contributing Guidelines from .github/CONTRIBUTING.md'
37+
branch: update-contributing-guidelines
38+
delete-branch: true
39+
base: main
40+
labels: documentation
41+
token: ${{ secrets.PAT_TOKEN }}
42+
if: success()
43+
2344
- name: Setup Python
2445
uses: actions/setup-python@v5
2546
with:

.github/workflows/linutil.yml

+6-34
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: LinUtil Release
22

33
on:
4-
push:
5-
branches: ["main"]
64
workflow_dispatch:
75

86
permissions:
@@ -48,25 +46,9 @@ jobs:
4846
run: cargo build --target-dir=build --release --verbose --target=x86_64-unknown-linux-musl --all-features
4947

5048
- name: Build aarch64 binary
51-
run: cross build --target-dir=build --release --verbose --target=aarch64-unknown-linux-musl --all-features
52-
53-
- name: Move binaries to build directory
54-
run: |
55-
mv build/x86_64-unknown-linux-musl/release/linutil build/linutil
56-
mv build/aarch64-unknown-linux-musl/release/linutil build/linutil-aarch64
57-
58-
- name: Pull latest changes
5949
run: |
60-
git config --global user.email "[email protected]"
61-
git config --global user.name "GitHub Actions"
62-
git pull origin main
63-
64-
- uses: stefanzweifel/git-auto-commit-action@v5
65-
with:
66-
commit_message: Commit Linutil
67-
file_pattern: "build/linutil build/linutil-aarch64"
68-
add_options: '--force'
69-
if: success()
50+
cross build --target-dir=build --release --verbose --target=aarch64-unknown-linux-musl --all-features
51+
mv ./build/aarch64-unknown-linux-musl/release/linutil ./build/aarch64-unknown-linux-musl/release/linutil-aarch64
7052
7153
- name: Extract Version
7254
id: extract_version
@@ -75,31 +57,21 @@ jobs:
7557
echo "version=$version" >> $GITHUB_ENV
7658
shell: bash
7759

78-
- name: Generate Release Notes
79-
id: generate_notes
80-
uses: release-drafter/release-drafter@v6
81-
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83-
with:
84-
config-name: release-drafter.yml
85-
version: ${{ env.version }}
86-
8760
- name: Create and Upload Release
8861
id: create_release
8962
uses: softprops/action-gh-release@v2
9063
with:
9164
tag_name: ${{ env.version }}
9265
name: Pre-Release ${{ env.version }}
9366
body: |
94-
${{ steps.generate_notes.outputs.body }}
95-
9667
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil)
9768
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil-aarch64)
9869
99-
append_body: false
70+
append_body: true
71+
generate_release_notes: true
10072
files: |
101-
./build/linutil
102-
./build/linutil-aarch64
73+
./build/x86_64-unknown-linux-musl/release/linutil
74+
./build/aarch64-unknown-linux-musl/release/linutil-aarch64
10375
./start.sh
10476
./startdev.sh
10577
prerelease: true

0 commit comments

Comments
 (0)