mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-12 09:41:47 +02:00
CI: Adapt Homebrew Cask generation
[why] The Cask-fonts repo has been incorporated into the main Cask repo. On releases we would use an obsolete repository to create the Cask into. The casks are now in a dedicated subdirectory (Casks/font) and under that we have one subdirectory for each font name starting character (to have a smaller number of files per directory I assume). [how] Change the repository path. Put part of the new (longer) path, the fixed part, just in the CI process, while the generator script takes care about the one-directory-per-startchar substructure. Fixes: #1635 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
3043085331
commit
b553aa8fe1
2 changed files with 9 additions and 12 deletions
8
.github/workflows/casks.yml
vendored
8
.github/workflows/casks.yml
vendored
|
@ -1,8 +1,8 @@
|
||||||
name: Create Casks PR
|
name: Create Casks PR
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HOMEBREW_REPO: Homebrew/homebrew-cask-fonts
|
HOMEBREW_REPO: Homebrew/homebrew-cask
|
||||||
HOMEBREW_FORK: Finii/homebrew-cask-fonts
|
HOMEBREW_FORK: Finii/homebrew-cask
|
||||||
FORK_USER: Finii
|
FORK_USER: Finii
|
||||||
FORK_TOKEN: tvguho_cng_11NQ2SVID0mjtXoiVj2bko_WF2keYoRABSDHZizFGzxvOOvlwAByzvuuPYaKQ0U85D26U252MBttV2sRmQ
|
FORK_TOKEN: tvguho_cng_11NQ2SVID0mjtXoiVj2bko_WF2keYoRABSDHZizFGzxvOOvlwAByzvuuPYaKQ0U85D26U252MBttV2sRmQ
|
||||||
|
|
||||||
|
@ -72,13 +72,13 @@ jobs:
|
||||||
path: casks
|
path: casks
|
||||||
- name: Prepare changes
|
- name: Prepare changes
|
||||||
run: |
|
run: |
|
||||||
cp casks/* homebrew/Casks
|
cp -r casks/* homebrew/Casks/font
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
cwd: homebrew
|
cwd: homebrew
|
||||||
fetch: false
|
fetch: false
|
||||||
add: Casks
|
add: Casks/font
|
||||||
message: "[ci] Update Nerd Font casks to ${{ needs.create-casks.outputs.tag }}"
|
message: "[ci] Update Nerd Font casks to ${{ needs.create-casks.outputs.tag }}"
|
||||||
committer_name: GitHub Actions
|
committer_name: GitHub Actions
|
||||||
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
|
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Nerd Fonts Version: 3.2.1
|
# Nerd Fonts Version: 3.2.1
|
||||||
# Script Version: 2.2.3
|
# Script Version: 2.3.0
|
||||||
#
|
#
|
||||||
# Iterates over all [*] archived fonts
|
# Iterates over all [*] archived fonts
|
||||||
# to generate ruby cask files for homebrew-fonts (https://github.com/Homebrew/homebrew-cask-fonts)
|
# to generate ruby cask files for homebrew-fonts (https://github.com/Homebrew/homebrew-cask)
|
||||||
# * Only adds non-Windows versions of the fonts
|
|
||||||
# * Needs the zip archives in archives/ (i.e. run `./archive-fonts.sh` first)
|
# * Needs the zip archives in archives/ (i.e. run `./archive-fonts.sh` first)
|
||||||
#
|
#
|
||||||
# Uses the current release version (including drafts) of the repo.
|
# Uses the current release version (including drafts) of the repo.
|
||||||
|
@ -236,14 +235,12 @@ while read -r filename; do
|
||||||
FONTS=("${FONTS[@]}" "$file")
|
FONTS=("${FONTS[@]}" "$file")
|
||||||
done < <(find "$searchdir" -type f -iname '*.[ot]tf' -print0 | LC_ALL=C sort -z)
|
done < <(find "$searchdir" -type f -iname '*.[ot]tf' -print0 | LC_ALL=C sort -z)
|
||||||
|
|
||||||
outputdir=$PWD/../casks
|
|
||||||
|
|
||||||
echo "$LINE_PREFIX Generating cask for: $basename"
|
echo "$LINE_PREFIX Generating cask for: $basename"
|
||||||
|
|
||||||
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
|
|
||||||
|
|
||||||
caskname="font-${caskbasename}-nerd-font"
|
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"
|
clear_file "$to"
|
||||||
write_header "$to" "$caskname"
|
write_header "$to" "$caskname"
|
||||||
|
|
Loading…
Reference in a new issue