-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: generate documentation version matrix dynamically
Updating the release tag in docs.yml is tedious. Generate the action matrix dynamically.
- Loading branch information
Showing
2 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023, Jani Nikula <jani@nikula.org> | ||
# Licensed under the terms of BSD 2-Clause, see LICENSE for details. | ||
|
||
# Output a json matrix for building multiple versions of documentation | ||
|
||
# Can't use git describe unless full history has been fetched! | ||
release=$(git tag --list --sort=version:refname | tail -1) | ||
|
||
jq -c . <<EOF | ||
{ | ||
"include": [ | ||
{ | ||
"ref": "master", | ||
"name": "dev" | ||
}, | ||
{ | ||
"ref": "$release", | ||
"name": "stable" | ||
} | ||
] | ||
} | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters