Skip to content

Commit

Permalink
Merge branch 'main' of ssh://github.com/ChrisTitusTech/linutil into g…
Browse files Browse the repository at this point in the history
…eneric-popup-title
  • Loading branch information
afonsofrancof committed Oct 3, 2024
2 parents 77962e2 + 26d0adc commit fd66661
Show file tree
Hide file tree
Showing 63 changed files with 1,467 additions and 974 deletions.
66 changes: 0 additions & 66 deletions .github/release-drafter.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
changelog:
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '📚 Documentation'
label: 'documentation'
- title: '🔒 Security'
label: 'security'
- title: '🧰 GitHub Actions'
label: 'github actions'
exclude:
labels:
- 'skip-changelog'
24 changes: 17 additions & 7 deletions .github/workflows/bashisms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,27 @@ jobs:
id: get_sh_files
run: |
sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true)
echo "::set-output name=sh_files::$sh_files"
if [ -n "$sh_files" ]; then
echo "$sh_files" > changed_files
echo "changed=1" >> $GITHUB_OUTPUT
else
echo "changed=0" >> $GITHUB_OUTPUT
fi
- name: Install devscripts
if: steps.get_sh_files.outputs.sh_files != ''
if: steps.get_sh_files.outputs.changed == 1
run: sudo apt-get update && sudo apt-get install devscripts

- name: Check for bashisms
if: steps.get_sh_files.outputs.sh_files != ''
if: steps.get_sh_files.outputs.changed == 1
run: |
for file in ${{ steps.get_sh_files.outputs.sh_files }}; do
if [[ -f "$file" ]]; then
checkbashisms "$file"
fi
echo "Running for:\n$(cat changed_files)\n"
for file in $(cat changed_files); do
if [[ -f "$file" ]]; then
checkbashisms "$file"
fi
done
- name: Remove the created file
if: steps.get_sh_files.outputs.changed == 1
run: rm changed_files
42 changes: 22 additions & 20 deletions .github/workflows/linutil.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: LinUtil Release

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -55,12 +53,6 @@ jobs:
mv build/x86_64-unknown-linux-musl/release/linutil build/linutil
mv build/aarch64-unknown-linux-musl/release/linutil build/linutil-aarch64
- name: Pull latest changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git pull origin main
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Commit Linutil
Expand All @@ -75,28 +67,18 @@ jobs:
echo "version=$version" >> $GITHUB_ENV
shell: bash

- name: Generate Release Notes
id: generate_notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config-name: release-drafter.yml
version: ${{ env.version }}

- name: Create and Upload Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.version }}
name: Pre-Release ${{ env.version }}
body: |
${{ steps.generate_notes.outputs.body }}
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil)
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil-aarch64)
append_body: false
append_body: true
generate_release_notes: true
files: |
./build/linutil
./build/linutil-aarch64
Expand All @@ -106,3 +88,23 @@ jobs:
env:
version: ${{ env.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install vhs
run: |
wget 'https://github.com/charmbracelet/vhs/releases/download/v0.8.0/vhs_0.8.0_amd64.deb'
sudo apt install -y ffmpeg
sudo snap install ttyd --classic
sudo dpkg -i 'vhs_0.8.0_amd64.deb'
- name: Build the preview
run: |
export PATH="$(pwd)/build:$PATH"
vhs docs/assets/preview.tape -o docs/assets/preview.gif
- name: Upload the preview
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Preview for ${{ env.version }}
file_pattern: "docs/assets/preview.gif"
add_options: "--force"
if: success()
66 changes: 66 additions & 0 deletions .session.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
let SessionLoad = 1
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
let v:this_session=expand("<sfile>:p")
silent only
silent tabonly
cd ~/gits/linutil
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
let s:wipebuf = bufnr('%')
endif
let s:shortmess_save = &shortmess
if &shortmess =~ 'A'
set shortmess=aoOA
else
set shortmess=aoO
endif
badd +660 tui/src/state.rs
badd +127 ~/gits/linutil/tui/src/floating_text.rs
badd +9 ~/gits/linutil/core/src/lib.rs
badd +1 ~/gits/linutil/tui/src/hint.rs
badd +142 ~/gits/linutil/tui/src/running_command.rs
badd +69 tui/src/float.rs
argglobal
%argdel
edit tui/src/state.rs
wincmd t
let s:save_winminheight = &winminheight
let s:save_winminwidth = &winminwidth
set winminheight=0
set winheight=1
set winminwidth=0
set winwidth=1
argglobal
balt ~/gits/linutil/tui/src/floating_text.rs
setlocal fdm=manual
setlocal fde=0
setlocal fmr={{{,}}}
setlocal fdi=#
setlocal fdl=0
setlocal fml=1
setlocal fdn=20
setlocal fen
silent! normal! zE
let &fdl = &fdl
let s:l = 660 - ((14 * winheight(0) + 22) / 44)
if s:l < 1 | let s:l = 1 | endif
keepjumps exe s:l
normal! zt
keepjumps 660
normal! 062|
tabnext 1
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
silent exe 'bwipe ' . s:wipebuf
endif
unlet! s:wipebuf
set winheight=1 winwidth=20
let &shortmess = s:shortmess_save
let &winminheight = s:save_winminheight
let &winminwidth = s:save_winminwidth
let s:sx = expand("<sfile>:p:r")."x.vim"
if filereadable(s:sx)
exe "source " . fnameescape(s:sx)
endif
let &g:so = s:so_save | let &g:siso = s:siso_save
doautoall SessionLoadPost
unlet SessionLoad
" vim: set ft=vim :
Loading

0 comments on commit fd66661

Please sign in to comment.