Skip to content

Commit 70472d3

Browse files
committed
feat(#65): delete save of md files in gh-pages + replace java script with groovy
1 parent ce54568 commit 70472d3

File tree

4 files changed

+34
-91
lines changed

4 files changed

+34
-91
lines changed

.github/motives.groovy

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
3+
* SPDX-License-Identifier: MIT
4+
*/
5+
6+
package org.eolang.lints
7+
8+
static def saveLint(Lint<?> lint) {
9+
new File("tmp/${lint.name()}.md").text = lint.motive()
10+
}
11+
12+
new PkMono().forEach {
13+
saveLint(it)
14+
}
15+
16+
new PkWpa().forEach {
17+
saveLint(it)
18+
}

.github/motives.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ fi
1414
rm -rf "gh-pages/${tag}"
1515
mkdir -p "gh-pages/${tag}"
1616

17-
mkdir "gh-pages/${tag}-md"
18-
mvn clean compile exec:java "-Dexec.args=${tag}"
17+
mkdir tmp
18+
mvn clean compile gplus:execute
1919

2020
while IFS= read -r f; do
2121
n=$(basename "${f}" .md)
2222
html=gh-pages/${tag}/${n}.html
2323
pandoc "${f}" -o "${html}"
2424
echo "${n} -> $(du -b "${html}" | cut -f1) bytes"
25-
done < <(find "gh-pages/${tag}-md" -name '*.md')
25+
done < <(find tmp -name '*.md')
2626

2727
list_them() {
2828
printf "<ul>\n"

pom.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,7 @@
243243
<configuration>
244244
<excludes>
245245
<exclude>pmd:/src/it/.*</exclude>
246-
<exclude>pmd:/src/main/java/org/eolang/lints/SaveAll.java</exclude>
247246
<exclude>checkstyle:/src/it/.*</exclude>
248-
<exclude>checkstyle:/src/main/java/org/eolang/lints/SaveAll.java</exclude>
249247
<exclude>duplicatefinder:.*</exclude>
250248
<exclude>dependencies:.*</exclude>
251249
</excludes>
@@ -537,19 +535,21 @@
537535
</executions>
538536
</plugin>
539537
<plugin>
540-
<groupId>org.codehaus.mojo</groupId>
541-
<artifactId>exec-maven-plugin</artifactId>
542-
<version>3.5.0</version>
543-
<executions>
544-
<execution>
545-
<goals>
546-
<goal>java</goal>
547-
</goals>
548-
</execution>
549-
</executions>
538+
<groupId>org.codehaus.gmavenplus</groupId>
539+
<artifactId>gmavenplus-plugin</artifactId>
540+
<version>4.1.1</version>
550541
<configuration>
551-
<mainClass>org.eolang.lints.SaveAll</mainClass>
542+
<scripts>
543+
<script>./.github/motives.groovy</script>
544+
</scripts>
552545
</configuration>
546+
<dependencies>
547+
<dependency>
548+
<groupId>org.apache.groovy</groupId>
549+
<artifactId>groovy</artifactId>
550+
<version>4.0.26</version>
551+
</dependency>
552+
</dependencies>
553553
</plugin>
554554
</plugins>
555555
</build>

src/main/java/org/eolang/lints/SaveAll.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)