switch for automated CTAN upload to ctan-o-mat
parent
2683bf27c2
commit
e64e57d728
|
@ -1,6 +1,7 @@
|
||||||
## -- engine used to compile (pdflatex)
|
## -- engine used to compile (pdflatex)
|
||||||
latex-bin
|
latex-bin
|
||||||
latexmk
|
latexmk
|
||||||
|
ctan-o-mat
|
||||||
|
|
||||||
## -- direct dependencies
|
## -- direct dependencies
|
||||||
tikz-trackschematic
|
tikz-trackschematic
|
||||||
|
|
|
@ -0,0 +1,125 @@
|
||||||
|
% This is a description file for ctan-o-mat.
|
||||||
|
% It manages uploads of a package to
|
||||||
|
% CTAN -- the Comprehensive TeX Archive Network.
|
||||||
|
%
|
||||||
|
% The syntax is roughly oriented towards (La)TeX.
|
||||||
|
% Two form of the macros are used. The simple macros take one argument
|
||||||
|
% in braces. Here the argument may not contain embedded macros.
|
||||||
|
%
|
||||||
|
% The second form uses an environment enclosed in \begin{}/\end{}.
|
||||||
|
% In the long text fields logo macros can be used.
|
||||||
|
%
|
||||||
|
% You should enter your values between the begin and the end of the
|
||||||
|
% named type.
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the CTAN id of the package.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 32 characters.
|
||||||
|
\pkg{tikz-trackschematic}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the version of the package.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 32 characters.
|
||||||
|
\version{}%%[SCRIPT]
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the name of the author(s).
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 128 characters.
|
||||||
|
\author{Martin Scheidt}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the email address of the uploader.
|
||||||
|
% The value is an email address.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
\email{m.scheidt@tu-braunschweig.de}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the name of the uploader.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
\uploader{Martin Scheidt (via github actions)}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the directory on CTAN.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
\ctanPath{/graphics/pgf/contrib/tikz-trackschematic}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the license.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 2048 characters.
|
||||||
|
% Multiple values are allowed.
|
||||||
|
\license{isc}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the URL of the home page.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is a URL.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
% Multiple values are allowed.
|
||||||
|
\home{https://www.railtoolkit.org/projects/tikz-trackschematic/}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the URL of the bug tracker.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is a URL.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
% Multiple values are allowed.
|
||||||
|
\bugtracker{https://github.com/railtoolkit/tikz-trackschematic/issues}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the support channel.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is a URL.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
% Multiple values are allowed.
|
||||||
|
\support{}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the version management.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is a URL.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
% Multiple values are allowed.
|
||||||
|
\repository{https://github.com/railtoolkit/tikz-trackschematic}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the developer's channel.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is a URL.
|
||||||
|
% The value is restricted to 255 characters.
|
||||||
|
% Multiple values are allowed.
|
||||||
|
\development{}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the update indicator; true for update.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 8 characters.
|
||||||
|
\update{true}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the topics id.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 1024 characters.
|
||||||
|
% Multiple values are allowed.
|
||||||
|
\topic{}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the text for the mail announcement.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 8192 characters.
|
||||||
|
\begin{announcement}
|
||||||
|
%RELEASE-NOTES%%[SCRIPT]
|
||||||
|
\end{announcement}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the one-liner for the package.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 128 characters.
|
||||||
|
\summary{A TikZ library for creating track diagrams in railways}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the descriptive abstract for the package.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 4096 characters.
|
||||||
|
\begin{description}
|
||||||
|
This TikZ library is a toolbox of symbols geared primarily towards creating track schematic for either research or educational purposes. It provides a TikZ frontend to some of the symbols which may be needed to describe situations and layouts in railway operation. The library is divided into sublibraries: topology, trafficcontrol, vehicles, constructions, electrics, symbology, and measures.
|
||||||
|
\end{description}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the note to the CTAN upload managers.
|
||||||
|
% The value is optional.
|
||||||
|
% The value is restricted to 2048 characters.
|
||||||
|
\begin{note}
|
||||||
|
Uploaded automatically by ctan-o-mat (via github actions)
|
||||||
|
\end{note}
|
||||||
|
% -------------------------------------------------------------------------
|
||||||
|
% This field contains the archive file.
|
||||||
|
% The value is the file name of the archive to be uploaded.
|
||||||
|
% It may have a relative or absolute directory.
|
||||||
|
\file{}%%[SCRIPT]
|
|
@ -1,40 +0,0 @@
|
||||||
### github action to make and publish a release
|
|
||||||
##
|
|
||||||
name: "CTAN upload validation"
|
|
||||||
|
|
||||||
## Controls when the workflow will run
|
|
||||||
on:
|
|
||||||
## Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
## A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
validate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# 1. checkout the repo
|
|
||||||
- name: "checkout"
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# 2. create package for testing
|
|
||||||
- name: "create an old tikz-trackschematic package"
|
|
||||||
run: ./build.sh --non-interactive --release v0.7.0
|
|
||||||
|
|
||||||
# 3.
|
|
||||||
- name: CTAN submit validation
|
|
||||||
uses: paolobrasolin/ctan-submit-action@v1
|
|
||||||
with:
|
|
||||||
file_path: tikz-trackschematic-v0.7.0.zip
|
|
||||||
version: 1.1
|
|
||||||
action: validate
|
|
||||||
fields: |
|
|
||||||
pkg: "tikz-trackschematic"
|
|
||||||
summary: "A TikZ library for creating track diagrams in railways"
|
|
||||||
description: "This TikZ library is a toolbox of symbols geared primarily towards creating track schematic for either research or educational purposes. It provides a TikZ frontend to some of the symbols which may be needed to describe situations and layouts in railway operation. The library is divided into sublibraries: topology, trafficcontrol, vehicles, constructions, electrics, symbology, and measures."
|
|
||||||
license: isc
|
|
||||||
repository: https://github.com/railtoolkit/tikz-trackschematic
|
|
||||||
author: "Martin Scheidt"
|
|
||||||
uploader: "Martin Scheidt (via github CI)"
|
|
||||||
email: m.scheidt@tu-braunschweig.de
|
|
||||||
update: true
|
|
||||||
version: v0.7.0
|
|
|
@ -75,4 +75,5 @@ jobs:
|
||||||
id: ${{ steps.create_release.outputs.id }}
|
id: ${{ steps.create_release.outputs.id }}
|
||||||
|
|
||||||
# 6. upload new release to CTAN
|
# 6. upload new release to CTAN
|
||||||
## TODO
|
- name: CTAN submit
|
||||||
|
run: ctan-o-mat --verbose --submit .github/tex/tikz-trackschematic.pkg
|
||||||
|
|
40
build.sh
40
build.sh
|
@ -568,8 +568,8 @@ create_release_notes() {
|
||||||
## -- create release note as excerpt from CHANGELOG.md
|
## -- create release note as excerpt from CHANGELOG.md
|
||||||
# determine beginning and end in CHANGELOG.md
|
# determine beginning and end in CHANGELOG.md
|
||||||
TOP=$(grep -n "Version \[$VERSION_NUM\]" CHANGELOG.md | cut -d: -f1)
|
TOP=$(grep -n "Version \[$VERSION_NUM\]" CHANGELOG.md | cut -d: -f1)
|
||||||
awk "NR>$TOP" CHANGELOG.md > release-note-tmp.md
|
awk "NR>$TOP" CHANGELOG.md > release-note.tmp.md
|
||||||
BOTTOM=$(grep -n -m 1 "## Version" release-note-tmp.md | cut -d: -f1)
|
BOTTOM=$(grep -n -m 1 "## Version" release-note.tmp.md | cut -d: -f1)
|
||||||
BOTTOM=$(( $TOP + $BOTTOM ))
|
BOTTOM=$(( $TOP + $BOTTOM ))
|
||||||
BOTTOM=$(( $BOTTOM - 2 ))
|
BOTTOM=$(( $BOTTOM - 2 ))
|
||||||
TOP=$(( $TOP + 1 ))
|
TOP=$(( $TOP + 1 ))
|
||||||
|
@ -578,6 +578,19 @@ create_release_notes() {
|
||||||
sedi "s/###/##/g" release-note-$VERSION_STR.md
|
sedi "s/###/##/g" release-note-$VERSION_STR.md
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_ctan_configuration() {
|
||||||
|
# modify the file .github/tex/tikz-trackschematic.pkg for ctan-o-mat
|
||||||
|
# 1. replace \version{}%%[SCRIPT]
|
||||||
|
sed -i".backup" -e"s/version{}%%\[SCRIPT\]/version{$DATE $VERSION_STR}/g" .github/tex/tikz-trackschematic.pkg
|
||||||
|
|
||||||
|
# 2. replace \file{}%%[SCRIPT]
|
||||||
|
sedi "s/file{}%%\[SCRIPT\]/file{tikz-trackschematic-$VERSION_STR.zip}/g" .github/tex/tikz-trackschematic.pkg
|
||||||
|
|
||||||
|
# 3. replace %RELEASE-NOTES%%[SCRIPT]
|
||||||
|
awk '/%RELEASE-NOTES%%\[SCRIPT\]/{system("cat release-note-*.md");next}1' .github/tex/tikz-trackschematic.pkg > .github/tex/tikz-trackschematic.tmp.pkg
|
||||||
|
mv .github/tex/tikz-trackschematic.tmp.pkg .github/tex/tikz-trackschematic.pkg
|
||||||
|
}
|
||||||
|
|
||||||
run_compile_documentation() {
|
run_compile_documentation() {
|
||||||
## compile order
|
## compile order
|
||||||
# 1. manual, symbology-table, snippets
|
# 1. manual, symbology-table, snippets
|
||||||
|
@ -909,13 +922,11 @@ cleanup() {
|
||||||
## -- cleanup
|
## -- cleanup
|
||||||
## from create_release
|
## from create_release
|
||||||
if [ $CLEANUP = 1 ]; then
|
if [ $CLEANUP = 1 ]; then
|
||||||
if [ $RELEASE = 1 ]; then
|
|
||||||
|
## from run_test_cases
|
||||||
|
if [ $TESTING = 1 ]; then
|
||||||
# remove TMP-folder
|
# remove TMP-folder
|
||||||
rm -rf $TMP
|
rm -rf test/.tex
|
||||||
# undo changes to tikz-trackschematic.sty by sed
|
|
||||||
mv src/tikz-trackschematic.sty.backup src/tikz-trackschematic.sty
|
|
||||||
# remove TMP-release-note
|
|
||||||
rm release-note-tmp.md
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## from check_imagemagick_policy
|
## from check_imagemagick_policy
|
||||||
|
@ -938,10 +949,16 @@ cleanup() {
|
||||||
rm doc/symbology/tmp.tex
|
rm doc/symbology/tmp.tex
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## from run_test_cases
|
## from create_release(_notes)
|
||||||
if [ $TESTING = 1 ]; then
|
if [ $RELEASE = 1 ]; then
|
||||||
# remove TMP-folder
|
# remove TMP-folder
|
||||||
rm -rf test/.tex
|
rm -rf $TMP
|
||||||
|
# undo changes to tikz-trackschematic.sty by sed
|
||||||
|
mv src/tikz-trackschematic.sty.backup src/tikz-trackschematic.sty
|
||||||
|
# remove TMP-release-note
|
||||||
|
rm release-note.tmp.md
|
||||||
|
# # undo changes to .github/tex/tikz-trackschematic.pkg by sed
|
||||||
|
# mv .github/tex/tikz-trackschematic.pkg.backup .github/tex/tikz-trackschematic.pkg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -1034,6 +1051,7 @@ if [ $RELEASE = 1 ]; then
|
||||||
##
|
##
|
||||||
create_release
|
create_release
|
||||||
create_release_notes
|
create_release_notes
|
||||||
|
create_ctan_configuration
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in New Issue