Skip to content

Commit

Permalink
Apply PackageJanitor
Browse files Browse the repository at this point in the history
  • Loading branch information
zickgraf committed Aug 30, 2023
1 parent 262ecaf commit 20315bc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
if [ -d "CategoricalTowers/Toposes" ]; then make -C "CategoricalTowers/Toposes" doc; fi
- name: Test FinSetsForCAP
run: |
make -C FinSetsForCAP -j $(nproc) --output-sync ci-test
make -C FinSetsForCAP --trace -j $(nproc) --output-sync ci-test
- name: Release package or simulate release
run: |
cd FinSetsForCAP
Expand Down
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "FinSetsForCAP",
Subtitle := "The elementary topos of (skeletal) finite sets",
Version := "2023.08-01",
Version := "2023.08-02",

Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",
Expand Down
21 changes: 14 additions & 7 deletions dev/release-gap-package
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ command -v git >/dev/null 2>&1 ||
error "the 'git' command was not found, please install it"

if [ "x$PYTHON" != x ] ; then
:
if ! command -v "$PYTHON" >/dev/null 2>&1; then
error "Could not execute python from PYTHON environment variable"
fi
elif command -v python >/dev/null 2>&1; then
PYTHON=python
elif command -v python3 >/dev/null 2>&1; then
Expand Down Expand Up @@ -361,6 +363,7 @@ fi
#
# Determine GitHub repository and username, and the current branch
#
if [ $ONLY_TARBALL = no ] ; then
notice "Using GitHub repository $REPO"

if [ "x$GITHUB_USER" = x ] ; then
Expand All @@ -371,11 +374,13 @@ if [ "x$GITHUB_USER" = x ] ; then
fi
notice "Using GitHub username $GITHUB_USER"

if [ "x$ONLY_TARBALL" = xno ] ; then
BRANCH=$(git symbolic-ref -q --short HEAD)
notice "Using branch $BRANCH"
BRANCH=$(git symbolic-ref -q --short HEAD || echo)
if [ "x$BRANCH" = x ] ; then
notice "no branch! Cannot proceed, exiting."
exit 1
fi
notice "Using branch $BRANCH"
fi


######################################################################
#
Expand Down Expand Up @@ -507,7 +512,9 @@ find . -name .DS_Store -exec rm -f {} +
# * perform additional sanity checks;
# * ...
if [ "x$RELEASE_SCRIPT" != x ] ; then
. "$RELEASE_SCRIPT"
. "$RELEASE_SCRIPT"
# do not delete the custom release script since it might be reused, for example by additional packages of a monorepo
# if it should be deleted, it can always simply delete itself
elif [ -f .release ] ; then
. ./.release
rm -f .release
Expand Down Expand Up @@ -673,7 +680,7 @@ echo ""

for PDFFile in $PDFFiles ; do
FULLNAME="$TMP_DIR/$BASENAME/$PDFFile"
UPLOADNAME=$PKG-$VERSION-$(echo "${PDFFile#doc/}" | sed 's;/;-;g')
UPLOADNAME=$BASENAME-$(echo "${PDFFile#doc/}" | sed 's;/;-;g')
if [ ! -f "$FULLNAME" ] ; then
error "could not find PDF"
fi
Expand Down

0 comments on commit 20315bc

Please sign in to comment.