Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install linters
run: |
sudo apt-get update
sudo apt-get install --yes fish shellcheck

- name: Check Bash
run: |
bash -n bin/* bootstrap/linux/* bootstrap/macos/*
shellcheck --external-sources --exclude=SC2155 bin/* bootstrap/linux/* bootstrap/macos/*

- name: Check Fish
run: fish -n fish/config.fish fish/conf.d/*.fish fish/functions/*.fish

- name: Check PowerShell
shell: pwsh
run: |
$tokens = $null
$errors = $null
[System.Management.Automation.Language.Parser]::ParseFile(
(Resolve-Path ./windows.ps1),
[ref]$tokens,
[ref]$errors
) | Out-Null

if ($errors.Count -gt 0) {
$errors | ForEach-Object { Write-Error $_ }
exit 1
}

- name: Check TOML
run: |
python3 - <<'PY'
import pathlib
import subprocess
import tomllib

paths = [pathlib.Path(filename) for filename in subprocess.check_output(
['git', 'ls-files', '--', '*.toml'],
text=True,
).splitlines()]

for path in paths:
with path.open('rb') as config:
tomllib.load(config)
PY

- name: Check whitespace
run: git diff --check
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ Preview bootstrap changes or inspect current state:
mise bootstrap --dry-run
mise bootstrap status
```

## Utilities

Rename photos from their EXIF timestamps, without changing anything first:

```sh
photon /path/to/photos --dry-run
```

Remove `--dry-run` to apply names in the `IMG_yyyyMMdd_HHmmss` format. Duplicate timestamps receive a numeric suffix.
12 changes: 12 additions & 0 deletions bin/git-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# Fetch updates and delete local branches whose upstream no longer exists.

set -euo pipefail

git fetch --prune
git for-each-ref --format='%(refname:short) %(upstream:track)' refs/heads |
awk '$NF == "[gone]" {print $1}' |
while IFS= read -r branch; do
git branch -D -- "$branch"
done
303 changes: 0 additions & 303 deletions bin/gw

This file was deleted.

Loading
Loading