Skip to content

Commit

Permalink
applied PackageJanitor
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Oct 17, 2020
1 parent 74bbfe0 commit f193c09
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
strategy:
matrix:
image: [gapsystem/gap-docker, gapsystem/gap-docker-master]
fail-fast: false
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
if [ "${{ matrix.image }}" = "gapsystem/gap-docker" ] && [ "$CUR_SHA" = "$(git rev-parse origin/master)" ] && [ $(dirname "$GITHUB_REPOSITORY") = "homalg-project" ]; then \
git worktree add gh-pages/ gh-pages || (echo "There was an error. Make sure there is a branch named 'gh-pages'. See https://github.com/homalg-project/PackageJanitor#error-there-was-an-error-make-sure-there-is-a-branch-named-gh-pages"; exit 1); \
git checkout master; \
./make_dist.sh --token "${{ secrets.GITHUB_TOKEN }}"; \
LANG=C.UTF-8 ./make_dist.sh --token "${{ secrets.GITHUB_TOKEN }}"; \
else \
echo "Not making a release."; \
fi
6 changes: 3 additions & 3 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ SetPackageInfo( rec(
PackageName := "CatReps",
Subtitle := "Representations and cohomology of finite categories",
Version := Maximum( [
"2020.10-01", ## Mohamed's version
"2020.10-03", ## Mohamed's version
## this line prevents merge conflicts
"2020.10-02", ## Tibor's version
## this line prevents merge conflicts
"2020.01.01", ## Peter's version
] ),

Date := ~.Version{[ 1 .. 10 ]},
Date := Concatenation( ~.Version{[ 9, 10 ]}, "/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
License := "GPL-2.0-or-later",

Persons := [
Expand Down Expand Up @@ -79,7 +79,7 @@ README_URL := "https://homalg-project.github.io/CatReps/README.md",
ArchiveURL := Concatenation( "https://github.com/homalg-project/CatReps/releases/download/v", ~.Version, "/CatReps-", ~.Version ),
# END URLS

ArchiveFormats := ".tar.gz",
ArchiveFormats := ".tar.gz .zip",

## Status information. Currently the following cases are recognized:
## "accepted" for successfully refereed packages
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

### Representations and cohomology of finite categories

| Documentation | Build Status | Code Coverage |
| ------------- | ------------ | ------------- |
| [![HTML stable documentation][docs-img]][docs-url] | [![Build Status][tests-img]][tests-url] | [![Code Coverage][codecov-img]][codecov-url] |
| Documentation | Latest Release | Build Status | Code Coverage |
| ------------- | -------------- | ------------ | ------------- |
| [![HTML stable documentation][html-img]][html-url] [![PDF stable documentation][pdf-img]][pdf-url] | [![version][version-img]][version-url] [![date][date-img]][date-url] | [![Build Status][tests-img]][tests-url] | [![Code Coverage][codecov-img]][codecov-url] |

<!-- END HEADER -->

Expand Down Expand Up @@ -75,11 +75,17 @@ Q
In March 2020 [Peter Webb](https://www-users.math.umn.edu/~webb/)' and his coauthors made a major new release of the former packages `reps` and `catreps` in which they are combined as one. The code of these former packages is still available at [`groupreps`](https://www-users.math.umn.edu/~webb/GAPfiles/groupreps) ([tutorial](https://www-users.math.umn.edu/~webb/GAPfiles/grouprepstutorial.html)) (the new name for the former reps) and [`catreps`](https://www-users.math.umn.edu/~webb/GAPfiles/catreps) ([tutorial](https://www-users.math.umn.edu/~webb/GAPfiles/catrepstutorial.html)), but it will no longer be supported. The new package [`reps`](https://www-users.math.umn.edu/~webb/GAPfiles/reps) combines the functionality of both former packages.

<!-- BEGIN FOOTER -->
---
[html-img]: https://img.shields.io/badge/HTML-stable-blue.svg
[html-url]: https://homalg-project.github.io/CatReps/doc/chap0_mj.html

[pdf-img]: https://img.shields.io/badge/PDF-stable-blue.svg
[pdf-url]: https://homalg-project.github.io/CatReps/download_pdf.html

[docs-img]: https://img.shields.io/badge/HTML-stable-blue.svg
[docs-url]: https://homalg-project.github.io/CatReps/doc/chap0_mj.html
[version-img]: https://img.shields.io/endpoint?url=https://homalg-project.github.io/CatReps/badge_version.json
[version-url]: https://homalg-project.github.io/CatReps/view_release.html

[date-img]: https://img.shields.io/endpoint?url=https://homalg-project.github.io/CatReps/badge_date.json
[date-url]: https://homalg-project.github.io/CatReps/view_release.html

[tests-img]: https://github.com/homalg-project/CatReps/workflows/Tests/badge.svg?branch=master
[tests-url]: https://github.com/homalg-project/CatReps/actions?query=workflow%3ATests+branch%3Amaster
Expand Down
42 changes: 42 additions & 0 deletions release-gap-package
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ else
tmp := GAPInfo.PackageInfoCurrent.ArchiveURL;
Print("GAP_ERROR=\"The ArchiveURL has unexpected value '",tmp,"'\"\n");
fi;
Print("PDFFile=\"",GAPInfo.PackageInfoCurrent.PackageDoc.PDFFile,"\"\n");
EOF

# evaluate the output of GAP, which should be valid shell script code
Expand Down Expand Up @@ -407,6 +408,13 @@ git archive --prefix="$BASENAME/" "$TAG" . | tar xf - -C "$TMP_DIR"
# Build the package documentation, run autoconf, etc.
cd "$TMP_DIR/$BASENAME"

# adjust date
# Note that we cannot use sed's `-i` option for in-place editing, as
# that is a non-portable extension of POSIX, which works differently in
# BSD and GNU make.
sed "s;Date := .*;Date := \"$(date +%d/%m/%Y)\",;" PackageInfo.g > PackageInfo.g.bak
mv PackageInfo.g.bak PackageInfo.g

notice "Removing unnecessary files"
rm -rf .github .circleci
rm -f .git* .hg* .cvs*
Expand Down Expand Up @@ -451,6 +459,20 @@ fi
# make sure every file is readable
chmod -R a+r .

# adjust links to other manuals
# Note that we cannot use sed's `-i` option for in-place editing, as
# that is a non-portable extension of POSIX, which works differently in
# BSD and GNU make.
for f in ./*/*.htm* ; do
sed 's;href="/home/gap/.gap/pkg/homalg_project/Modules/doc/;href="https://homalg-project.github.io/homalg_project/Modules/doc/;g' "$f" > "$f.bak"
mv "$f.bak" "$f"
done

for f in ./*/*.htm* ; do
sed 's;href="/home/gap/.gap/pkg/homalg_project/homalg/doc/;href="https://homalg-project.github.io/homalg_project/homalg/doc/;g' "$f" > "$f.bak"
mv "$f.bak" "$f"
done

# basic sanity check
fgrep -q -r '<a href="/' */*.htm* &&
error "HTML manual contains absolute paths"
Expand Down Expand Up @@ -593,6 +615,26 @@ for EXT in $ARCHIVE_FORMATS ; do
done


######################################################################
#
# Upload PDF
#
cd "$TMP_DIR"
echo ""

FULLNAME="$TMP_DIR/$BASENAME/$PDFFile"
if [ ! -f "$FULLNAME" ] ; then
error "could not find PDF"
fi
notice "Uploading PDF"
response=$(curl --fail --progress-bar -o "$TMP_DIR/upload.log" \
-X POST "$UPLOAD_URL/$RELEASE_ID/assets?name=$BASENAME.pdf" \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/pdf" \
--data-binary @"$FULLNAME")


######################################################################
#
# Update the website
Expand Down

0 comments on commit f193c09

Please sign in to comment.