mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-19 09:51:48 +02:00
Fixes use of archive, archive patcher and cleanup
This commit is contained in:
parent
2f429c8fac
commit
e630dd1697
2 changed files with 50 additions and 12 deletions
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
@ -138,12 +138,10 @@ jobs:
|
||||||
./generate-fontconfig.sh
|
./generate-fontconfig.sh
|
||||||
./generate-casks.sh "${{ matrix.font }}"
|
./generate-casks.sh "${{ matrix.font }}"
|
||||||
|
|
||||||
# - uses: EndBug/add-and-commit@v7
|
- name: Archive font-patcher script for release
|
||||||
# with:
|
run: |
|
||||||
# add: 'patched-fonts'
|
cd -- "$GITHUB_WORKSPACE/bin/scripts"
|
||||||
# message: Rebuilds patched fonts
|
./archive-font-patcher.sh
|
||||||
# committer_name: GitHub Actions
|
|
||||||
# committer_email: 41898282+github-actions[bot]@users.noreply.github.com
|
|
||||||
|
|
||||||
- name: Archive font package zip files and upload for release
|
- name: Archive font package zip files and upload for release
|
||||||
run: |
|
run: |
|
||||||
|
@ -155,9 +153,11 @@ jobs:
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: patched-fonts
|
name: patched-fonts
|
||||||
|
# adding multiple paths (i.e. LICENSE) is a workaround to get a least common ancestor
|
||||||
|
# of the root directory for artifact path purposes
|
||||||
path: |
|
path: |
|
||||||
"$GITHUB_WORKSPACE/patched-fonts/${{ matrix.font }}/"
|
patched-fonts/${{ matrix.font }}
|
||||||
"$GITHUB_WORKSPACE/LICENSE"
|
LICENSE
|
||||||
|
|
||||||
commit:
|
commit:
|
||||||
name: Commit and push patched fonts to the repo
|
name: Commit and push patched fonts to the repo
|
||||||
|
@ -167,13 +167,11 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Download patched fonts from build
|
- name: Download patched fonts from build
|
||||||
|
id: download-patched-fonts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: patched-fonts
|
name: patched-fonts
|
||||||
path: "$GITHUB_WORKSPACE/patched-fonts/"
|
path: .
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
# uncommment once structure is correct
|
# uncommment once structure is correct
|
||||||
# - uses: EndBug/add-and-commit@v7
|
# - uses: EndBug/add-and-commit@v7
|
||||||
|
|
40
bin/scripts/archive-font-patcher.sh
Executable file
40
bin/scripts/archive-font-patcher.sh
Executable file
|
@ -0,0 +1,40 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Nerd Fonts Version: 2.1.0
|
||||||
|
# Script Version: 1.0.0
|
||||||
|
# Archives the font patcher script and the required source files
|
||||||
|
# used for debugging
|
||||||
|
# set -x
|
||||||
|
|
||||||
|
# LINE_PREFIX="# [Nerd Fonts]"
|
||||||
|
scripts_root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/"
|
||||||
|
parent_dir="${PWD}/../../"
|
||||||
|
outputdir=$scripts_root_dir../../archives
|
||||||
|
|
||||||
|
mkdir -p "$outputdir"
|
||||||
|
|
||||||
|
# create a mini readme with basic info on Nerd Fonts project
|
||||||
|
touch "$outputdir/readme.md"
|
||||||
|
mini_readme="$outputdir/readme.md"
|
||||||
|
cat "$parent_dir/src/archive-font-patcher-readme.md" >> "$mini_readme"
|
||||||
|
|
||||||
|
# clear out the directory zips
|
||||||
|
find "${outputdir:?}" -name "FontPatcher.zip" -type f -delete
|
||||||
|
|
||||||
|
cd -- "$scripts_root_dir/../../" || exit 1
|
||||||
|
find "src/glyphs" | zip -9 "$outputdir/FontPatcher" -@
|
||||||
|
find "font-patcher" | zip -9 "$outputdir/FontPatcher" -@
|
||||||
|
|
||||||
|
# add mini readme file
|
||||||
|
zip -9 "$outputdir/FontPatcher" -rj "$mini_readme" -q
|
||||||
|
rm -f "$mini_readme"
|
||||||
|
|
||||||
|
# @TODO check zip status
|
||||||
|
# zipStatus=$?
|
||||||
|
|
||||||
|
# if [ "$zipStatus" != "0" ]
|
||||||
|
# then
|
||||||
|
# echo "$LINE_PREFIX error, font-patcher archive not created"
|
||||||
|
# exit 1
|
||||||
|
# else
|
||||||
|
# echo "$LINE_PREFIX font-patcher archive created successfully"
|
||||||
|
# fi;
|
Loading…
Reference in a new issue