[why]
Because we want to use Node 20 etc pp
[how]
Check for breaking changes and update.
Also replace checkout-files by checkout with sparse-checkout; as they
semselves encourage people to do.
action-gh-release has been updated to Node 20 but has not been released
with the change, so we access the latest version directly by hash.
[note]
Of course this is unchecked... what can ge wrong! 😬
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We struggle with the pack-committing of patched fonts to the repository
on release. This makes our repo grow extremely big. It would be better
to just use release artifacts for the releases and not commit any
patched font back.
There were different approaches discussed, but the problem remains that
I personally have no rights to implement anything of that - neither can
I force push to the default branch, nor can I create new repos in the
organization.
[how]
To make it still possible to add new fonts without a repo size
explosion we do not release NEW fonts back to the repository as commits,
but old fonts are handled as before.
NEW fonts:
* have a new property set in the fonts.yaml 'database'
* are released as release artifact via release workflow (but not
committed back)
* get a readme in the patched_fonts/ directory that points to the
release artifact page
The solution is not ideal, but for sure better than not adding any fonts
anymore or having the repo grow in size faster and faster.
At some point in time I would like to phase out all in-repo releases,
also for OLD fonts.
This scheme has been (manually) used / introduced for Intel One.
With this change the .gitignore file is automatically adapted to any new
font that is added with the repoRelease flag set to false (which should
be the default for any added font from now on).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Some fonts will not be released to the repo; but only exist patched as
release atrifacts. This needs adapted readmes.
[how]
If such a font is encountered direct links to the release archives are
put into the readme file.
Decide based on information in the font.json file.
If no info is found in the json file (i.e. all existing fonts) it
defaults to release-also-to-repo behavior.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The variation lists are very long and noone will ever look at them.
Instead we have a font-info.md file, for what reasons?
[how]
Replace the function the font-info.md file had with README.md.
Drop all the variation lists.
Automatically call the readme creation in the gotta-patch-em instead of
just hinting that one should call that (standardize-and-complete-readmes.sh).
[why]
Somebody might want to have a file where all symbols we add are listed.
At the moment there are only the i_*.sh scripts and the CSS files. Both
are rather unwieldy.
[how]
Just create a json file with all symbol names, like the CSS file.
Fixes: #448
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
After adding a contributor with allcontributors the website is not
updated.
[how]
Obviously there is a setting if a dependant workflow should be started.
Set that value to 'true'.
Also fix commented-out section of workflow triggers for 'release', that
should not be triggered by allcontributors, when that is commented-in
again (if ever).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
More often than not (i.e. almost always) I cancel the release workflow.
The problem is that a release workflow will patch all fonts, and all
fonts will differ (at least in the timestamp) and so the repo will grow
A LOT. Usually you want to be really conciously deciding that the growth
is really warranted, and no automatic can do that.
I guess one could trigger rebuilding the zip archives but not commiting
the newly patched fonts back to the repo, but that is also a strange
situation.
[how]
Release has now only a workflow-dispatch trigger, that must be clicked
if a release workflow shall run.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Release workflow for 2.3.0 stopped.
The script generate-webfonts.sh needs fontforge which was not installed.
[how]
Install the (ordinary) fontforge. As we just export the woff we can live
with whatever version is available.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When we rerun (on a release candidate) we end up with an error message:
* Connection #0 to host api.github.com left intact
Tag exists: "v2.3.0-RC"
exists=true
Error: Unable to process file command 'output' successfully.
Error: Invalid format '"v2.3.0-RC"'
##[debug]System.Exception: Invalid format '"v2.3.0-RC"'
[how]
We want to set an output depending on the grep exit code but the grep
output leaks into our value...
Make grep silent.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Fontforge had a new release. There is no particular error it fixes that
we suffer on, but keeping up to date?
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The actions have several warnings.
[how]
Update them all.
For example action-gh-release 0.1.14 runs on node12 which is deprecated.
upload-artifacts 3 also switches to node16 and 3.1.1 removes obsolete
set-output.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
For some reason setting of some variables broke.
[how]
Did not spent any time to find the reason, just rewrote it in a more
readable and debuggable manner and now it works (??!)
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The release run does not work with the fontforge AppImage anymore.
Obviously Github's 'ubuntu-latest' changed :-}
[how]
Install missing fuse.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Although all font files of one font (directory) have the same timestamp
the different fonts (e.g. Agave vs Roboto) have still slightly different
timestamps.
[how]
Note the time when the release workflow has started.
Use that as timestamp for all fonts.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The webfonts are needed for the cheat sheet. When we update the sheet
code we probably need also new fonts.
The fonts might contain fixes also if there is no need for a new sheet,
so they have to be updated on every release.
[how]
Add mini-script that generates the woff's from the latest 'ttf'.
This makes it easier to check the woffs manually.
Let the workflow create the woffs, and push them to the gh-pages.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This must have been somehow forgotten. I did try if the autogenerated
file works, and it did.
See commit
bcef53da Update cheat sheet
September 2022? I have no recollection at all :-(
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Now we can create the casks of some specific release ('latest' in this
case) at will, based purely on the artifact files and on nothing in the
repo. We do not even need to fetch the repo.
This is still some kind of WIP, because we do not have the secrets and
not even a proper homebrew fork in our organization.
THIS WILL NOT WORK out of the box. Refer to PR #1008 to get instruction
on additional steps needed to make this run.
[note]
Remove cask generation from normal release workflow.
Later on the release workflow has to trigger the cask workflow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When you have a fork of this repository and push anything to master the
release workflow is automatically run. This is usually not what people
want. They want to push some changes to the fork's master and create a
Pull Request.
[how]
Only run the release workflow on the original repo.
If they really want to create their own release they would have to
remove this line (or adapt).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The add-and-commit steps are so unbelievable slow.
[how]
We do not need the other tags, so we do not need a fetch before adding.
See comments on the action's homepage.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The casks-artifact is empty.
[how]
Supply the correct path for the upload.
For this the generator script prints the output pathname(s),
which in turn are used in the CI.
Also drop unneeded '/' from path end.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We create the release packages one by one in a lot of jobs. Whenever a
job is ready it adds its package to the release.
This means that the release starts with one archive and grows over the
next 5 (!) hours. (Noto takes about 5h to patch.)
But people will be notified and find the new *unfinished* release, which
can raise questions or problems.
[how]
Mark the release 'draft'.
Unfortunately I can not find (quickly, now) a way to un-draft the
release so this has to be done manually. Maybe it is better anyhow, so
that one can edit the release message etc.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
`grep` and `awk` do not know json. This might break if some format
changes or whatever.
[note]
The font matrix setup is also with `jq`.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Usually release tags and versions start with a "v", and we also had that
up to 2.1.0:
$ git tag -l
2.2.0-RC
FontPatcher
v0.1.0
v0.1.1
v0.1.2
v0.2.0
v0.2.1
v0.3.0
v0.3.1
v0.4.0
v0.4.1
v0.5.0
v0.5.1
v0.6.0
v0.6.1
v0.7.0
v0.8.0
v1.0.0
v1.1.0
v1.2.0
v2.0.0
v2.1.0
[how]
In the files we keep the non-"v" version numbers, but the tags on github
shall be prepended with a "v" like "v2.2.0-RC".
The variable RELEASE_TAG_VERSION is renamed to RELEASE_VERSION to make
clear that this is not the name of the tag.
Where we reference a tag, "v$RELEASE_VERSION" is used.
[note]
One of the environment variable is not needed, we can use the output directly.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The release workflow is triggered on a lot occasions, but not on changes
of the package.json file. But that file contains our version number and
when we change it we should create a new release. At least is that how I
would imagine it working.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The fontconfig and cask generation seems unfinished or broken.
[how]
Fix the point in time when the fontconfig is generated and commit any
changes back to the repo.
Generate the casks and store them as CI artifacts at least.
Probably they should be uploaded to the cask repo (on 'real' releases)?
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The release CI is run every time something is pushed to master. This is
useful if we are on a release candidate. The release will be updated.
But if we do a normal release and afterwards push some new commit to
master - before we update the version in the package.json to a RC - the
actual (fixed) release will also be updated.
[how]
Determine if we have a
* new normal release
* new prerelease
* updated prerelease
and run the release process itself only in that cases.
[note]
The release is checked for via API instead of an action, because the
typical action needs a complete checkout (works on the local git repo).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When people check the repo out at a release tag they expect to get all
the files that are IN the release.
But we add the patched fonts and the version-bumped scripts only
afterwards.
[how]
Just overwrite (shift) the tag after everything is finished.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We check the whole repo out, just to set up the font matrix.
All data is thrown away afterwards. That takes needless time.
[how]
Just check out the two files we really need for the setup (the script
and the database).
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We need the release tag version in all jobs.
[how]
Instead of determining it in every job again and again (with the same
code) we set an output in the first job and reuse it everywhere.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
This can not work.
Issue 1:
It is unspecified in which order the font matrix jobs run, so the
version number changes somewhen.
The changed (version-bumped) files are never committed and written back,
so this would have to be done manually anyhow.
The version-bump script itself has issues because the regexes for the
change are a bit too loose and other version like strings are changes
also (like the Script Version).
Issue 2:
The script changed versions that should not be changed like the script version
in the scripts (rather than the NF release version).
In bin/scripts/generate-glyph-info-from-set.py pumping has been
forgotten/omitted completely.
[how]
In the version-bump script:
* Use more modern regex
* Instead of copying the code use a loop
Create a commit with the bumped version information in all scripts.
This can only be done with the final job, because we have a problem to
checkout the modified version with actions/checkout.
We need to bump the version on every patch job, because we need the correct
information already in the script when we patch.
[note]
This does not prevent to have multiple commits attempts that change to the same
version. But if the change is empty, no commit will be added and the
step is silently ignored.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The self-written upload-archives script is some issues, for example it
does not replace preexisting release files with new ones when a release
is re-triggered. The error messages are rudimentary at best.
[how]
Use https://github.com/softprops/action-gh-release instead.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Fonttools, FreeType, and HarfBuzz are not used in the CI job.
Propably a leftover from thomething done in the past?
[how]
Because I can not find out the reason WHY they are there the lines are
kept and just disabled. This leaves a nice 'stub' for git blame in the
file.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
It might be easier to use the precompiled application than to build it
ourselves.
[how]
The AppImage has the typical problem with relative paths, so we need to
change some small calls.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The purged (obsolete) files are still existing after release.
[how]
We restore the deleted files before it adds the new ones.
Just delete all font files and then download all the release files (all
newly created fonts).
`git add` on a directory will remove all missing files.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Fontforge 2020 March or 20th Anniversary have problems to generate fonts
with a lot of table entries. This is for example the massive entries for
ligatures in Iosevka. We can not generate valid font files with that
fontforge versions. We can not even detect (from Python side) if
fontforge had problems.
[how]
We fixed fontforge itself upstream with
https://github.com/fontforge/fontforge/pull/4883
That fix became available first with Fontforge March 2022 Release.
We could use the AppImage or build from scratch, because no package is
available on Ubuntu 20.04 or 22.04.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The font matix contains the directory names of the font files. The
directory names are taken from
bin/scripts/lib/fonts.json
and specifically extracted with
bin/scripts/get-font-names-from-json.sho
That script returns the .folderNames
Later in the release script we use the folder name to limit the fonts
that patch-em-all shall process. Unfortunately patch-em-all could (until
the previous commit) just work with font-filenames and not with
directory names. But the matrix gives us just directory names.
This is for example a problem with this fonts:
$ ll src/unpatched-fonts/BigBlueTerminal
-rw-rw-r-- 1 fini fini 25632 Jan 1 14:03 BigBlue_Terminal_437TT.TTF
-rw-rw-r-- 1 fini fini 69964 Jan 1 14:03 BigBlue_TerminalPlus.TTF
The *directory* of that fonts is correctly noted in fonts.json as
"BigBlueTerminal" but the font files do not begin with that!
[how]
Now, that patch-em-all can also filter on the directory name, we just
need to utilized that in the workflow run. If the filter shall work on
directory names the first character needs to be a slash, so we just
prepend it to name we got from the matix.
Fixes: #824
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>