Skip to content

Commit 54d1ac8

Browse files
release: update .release file
1 parent ceff83c commit 54d1ac8

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.release

+55
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,61 @@ notice_it() {
1313
printf '\033[93m%s\033[0m\n' "$*"
1414
}
1515

16+
# TODO: This function can be deleted once the code to compile the manual is gone
17+
run_gap() {
18+
gap_output=$( \
19+
(echo 'OnBreak:=function() Print("FATAL ERROR"); FORCE_QUIT_GAP(1); end;;' ; cat - ; echo ; echo "FORCE_QUIT_GAP(0);") \
20+
| $GAP -A -q -b 2>&1 \
21+
| tr -d '\r' )
22+
mkdir -p "$TMP_DIR"
23+
echo "$gap_output" > "$TMP_DIR/gap-error.log"
24+
if echo "$gap_output" | grep -q '\(Error\|FATAL ERROR\|Syntax \)' ; then
25+
error "there was an error running GAP, see $TMP_DIR/gap-error.log"
26+
fi
27+
}
28+
29+
notice_it "Running Digraphs package .release script"
30+
31+
# Delete unnecessary files
32+
1633
notice_it "Deleting additional unnecessary files"
34+
1735
rm -f .covignore .gaplint.yml .mailmap Dockerfile
1836
rm -rf ci etc scripts
37+
38+
# TODO: in the newest commits of ReleaseTools, the manual is now built by the
39+
# time that this script is called, and soon release-gap-package will also
40+
# perform the check for non resolved references. Once this is the case, we will
41+
# be able to get rid of the compilation of the manual in this script.
42+
notice_it "Building Digraphs package documentation for archives (using makedoc.g)"
43+
44+
run_gap <<GAPInput
45+
LogTo("makedoc.log");
46+
if not IsPackageMarkedForLoading("$PKG", "") then
47+
SetPackagePath("$PKG", ".");
48+
fi;
49+
PushOptions(rec(relativePath:="../../.."));
50+
Read("makedoc.g");
51+
GAPInput
52+
rm -f doc/*.tex
53+
rm -f doc/*.aux doc/*.bbl doc/*.blg doc/*.brf doc/*.idx doc/*.ilg doc/*.ind doc/*.log doc/*.out doc/*.pnr doc/*.tst
54+
55+
! grep -E "WARNING: non resolved reference" makedoc.log
56+
rm -f makedoc.log
57+
58+
# Note: Long term, this functionality may become a standard part of ReleaseTools
59+
notice_it "Fixing the links in the documentation"
60+
for f in ./*/*.htm* ; do
61+
sed 's;href="[^"]*digraphs[^"]*/doc/;href="https://digraphs.github.io/Digraphs/doc/;gi' "$f" > "$f.bak"
62+
mv "$f.bak" "$f"
63+
sed 's;href="[^"]*io[^"]*/doc/;href="https://gap-packages.github.io/io/doc/;gi' "$f" > "$f.bak"
64+
mv "$f.bak" "$f"
65+
sed 's;href="[^"]*smallsemi[^"]*/doc/;href="https://gap-packages.github.io/smallsemi/doc/;gi' "$f" > "$f.bak"
66+
mv "$f.bak" "$f"
67+
sed 's;href="[^"]*images[^"]*/doc/;href="https://gap-packages.github.io/images/doc/;gi' "$f" > "$f.bak"
68+
mv "$f.bak" "$f"
69+
sed 's;href="[^"]*GAPDoc[^"]*/doc/;href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc/doc/;gi' "$f" > "$f.bak"
70+
mv "$f.bak" "$f"
71+
done
72+
73+
notice_it "Finished running Digraphs package .release script!!!"

0 commit comments

Comments
 (0)