Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Adapt Homebrew Cask generation #1637

Merged
merged 2 commits into from
Nov 18, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/casks.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Create Casks PR

env:
HOMEBREW_REPO: Homebrew/homebrew-cask-fonts
HOMEBREW_FORK: Finii/homebrew-cask-fonts
HOMEBREW_REPO: Homebrew/homebrew-cask
HOMEBREW_FORK: Finii/homebrew-cask
FORK_USER: Finii
FORK_TOKEN: tvguho_cng_11NQ2SVID0Zkry5DgnaDc4_b4dFDpJJ3iyA6vzzGgZApZEkF6HacnnfO6Mp4OEw81IFBWGAFCM0qevtz5t

Expand Down Expand Up @@ -72,13 +72,13 @@ jobs:
path: casks
- name: Prepare changes
run: |
cp casks/* homebrew/Casks
cp -r casks/* homebrew/Casks/font
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
cwd: homebrew
fetch: false
add: Casks
add: Casks/font
message: "[ci] Update Nerd Font casks to ${{ needs.create-casks.outputs.tag }}"
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
Expand Down
13 changes: 5 additions & 8 deletions bin/scripts/generate-casks.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env bash
# Nerd Fonts Version: 3.3.0
# Script Version: 2.2.3
# Script Version: 2.3.0
#
# Iterates over all [*] archived fonts
# to generate ruby cask files for homebrew-fonts (https://github.com/Homebrew/homebrew-cask-fonts)
# * Only adds non-Windows versions of the fonts
# to generate ruby cask files for homebrew-fonts (https://github.com/Homebrew/homebrew-cask)
# * Needs the zip archives in archives/ (i.e. run `./archive-fonts.sh` first)
#
# Uses the current release version (including drafts) of the repo.
Expand Down Expand Up @@ -236,14 +235,12 @@ while read -r filename; do
FONTS=("${FONTS[@]}" "$file")
done < <(find "$searchdir" -type f -iname '*.[ot]tf' -print0 | LC_ALL=C sort -z)

outputdir=$PWD/../casks

echo "$LINE_PREFIX Generating cask for: $basename"

[[ -d "$outputdir" ]] || mkdir -p "$outputdir"

caskname="font-${caskbasename}-nerd-font"
to="$outputdir/${caskname}.rb"
outputdir="${PWD}/../casks/${caskname:0:6}"
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
to="${outputdir}/${caskname}.rb"

clear_file "$to"
write_header "$to" "$caskname"
Expand Down
Binary file modified src/glyphs/original-source.otf
Binary file not shown.