Skip to content

Commit

Permalink
feat: release compressed archives without version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandmalfarbe committed Jan 11, 2025
1 parent 6730305 commit b9f9142
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,36 @@ mkdir "${distFolderName}/${archiveFolderName}"
# see https://stackoverflow.com/a/66763713
SEDOPTION=
if [[ "$OSTYPE" == "darwin"* ]]; then
SEDOPTION="-i ''"
SEDOPTION="-i \x27\x27"
else
SEDOPTION="-i"
fi

echo $SEDOPTION

# create single template file for latex
cp "template-multi-file/eisvogel.latex" "${distFolderName}/eisvogel.latex"

# replace partials (latex)
sed $SEDOPTION -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$eisvogel-added\.latex()\$/ {' -e 'r template-multi-file/eisvogel-added.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$eisvogel-title-page\.latex()\$/ {' -e 'r template-multi-file/eisvogel-title-page.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$eisvogel-added\.latex()\$/ {' -e 'r template-multi-file/eisvogel-added.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$eisvogel-title-page\.latex()\$/ {' -e 'r template-multi-file/eisvogel-title-page.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"

# create single template file for beamer
cp "template-multi-file/eisvogel.beamer" "${distFolderName}/eisvogel.beamer"

# replace partials (beamer)
sed $SEDOPTION -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed $SEDOPTION -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
# The beamer template has no eisvogel block $eisvogel-added.latex()$
# The beamer template has no eisvogel titlepage $eisvogel-titlepage.latex()$
sed $SEDOPTION -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed $SEDOPTION -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed $SEDOPTION -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"


# create folder for the release eisvogel (ZIP and tar.gz)
Expand All @@ -61,6 +63,8 @@ cd dist

# create .zip file
zip -r -X --exclude="*.DS_Store*" "Eisvogel-${1}.zip" "${archiveFolderName}"
cp "Eisvogel-${1}.zip" "Eisvogel.zip"

# create .tar.gz file
tar --exclude="*.DS_Store*" -zcvf "Eisvogel-${1}.tar.gz" "Eisvogel-${1}"
cp "Eisvogel-${1}.tar.gz" "Eisvogel.tar.gz"

0 comments on commit b9f9142

Please sign in to comment.