Skip to content

Commit 8036d59

Browse files
ibbempmbittner
authored andcommitted
Generate GitHub pages
1 parent bd68f8b commit 8036d59

3 files changed

Lines changed: 19 additions & 10 deletions

File tree

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
2828
uses: actions/upload-pages-artifact@v1
2929
with:
30-
path: result/share/doc/DiffDetective
30+
path: result/share/github-pages
3131

3232
# An additional job is recommened in the documentation of `actions/deploy-pages`
3333
deploy-javadoc:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ DiffDetective was extended and used within bachelor's and master's theses:
140140
- _Inspecting the Evolution of Feature Annotations in Configurable Software_, Lukas Güthing, Master's Thesis, 2023: Lukas implemented different edge-types for associating variability annotations within variation diffs. He published his work later at VaMoS 2024 under the title _Explaining Edits to Variability Annotations in Evolving Software Product Lines_, illustrated above.
141141
- _Empirical Evaluation of Feature Trace Recording on the Edit History of Marlin_, Sören Viegener, Bachelor's Thesis, 2021, [DOI 10.18725/OPARU-38603](http://dx.doi.org/10.18725/OPARU-38603): In his thesis, Sören started the DiffDetective project and implemented the first version of an algorithm, which parses text-based diffs to C-preprocessor files to variation diffs. He also came up with an initial classification of edits, which we wanted to reuse to evaluate [Feature Trace Recording](https://variantsync.github.io/FeatureTraceRecording/), a method for deriving variability annotations from annotated patches.
142142

143-
[documentation]: https://htmlpreview.github.io/?https://github.com/VariantSync/DiffDetective/blob/splc23-views/docs/javadoc/index.html
143+
[documentation]: https://variantsync.github.io/DiffDetective/docs/javadoc
144144
[website]: https://variantsync.github.io/DiffDetective/
145145
[forklg]: https://github.com/guethilu/DiffDetective

default.nix

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
inherit system;
99
},
1010
doCheck ? true,
11-
buildJavadoc ? true,
11+
buildGitHubPages ? true,
1212
}:
1313
pkgs.stdenv.mkDerivation rec {
1414
pname = "DiffDetective";
@@ -30,6 +30,7 @@ pkgs.stdenv.mkDerivation rec {
3030
maven
3131
makeWrapper
3232
graphviz
33+
(ruby.withPackages (pkgs: with pkgs; [github-pages jekyll-theme-cayman]))
3334
];
3435

3536
mavenRepo = pkgs.stdenv.mkDerivation {
@@ -62,11 +63,21 @@ pkgs.stdenv.mkDerivation rec {
6263
buildPhase = ''
6364
runHook preBuild
6465
65-
mvn --offline -Dmaven.repo.local="$mavenRepo" -Dmaven.test.skip=true clean package ${
66-
if buildJavadoc
67-
then "javadoc:javadoc"
66+
mvn() {
67+
command mvn --offline -Dmaven.repo.local="$mavenRepo" "$@"
68+
}
69+
70+
${
71+
# Build the documentation before the code because we don't want to include
72+
# the generated files in the GitHub Pages
73+
if buildGitHubPages
74+
then ''
75+
mvn javadoc:javadoc
76+
PAGES_REPO_NWO=VariantSync/DiffDetective JEKYLL_BUILD_REVISION= github-pages build
77+
''
6878
else ""
6979
}
80+
mvn -Dmaven.test.skip=true clean package
7081
7182
runHook postBuild
7283
'';
@@ -89,11 +100,9 @@ pkgs.stdenv.mkDerivation rec {
89100
--prefix PATH : "${pkgs.graphviz}"
90101
91102
${
92-
if buildJavadoc
103+
if buildGitHubPages
93104
then ''
94-
local doc="$out/share/doc"
95-
mkdir -p "$doc"
96-
cp -r docs/javadoc "$doc/DiffDetective"
105+
cp -r _site "$out/share/github-pages"
97106
''
98107
else ""
99108
}

0 commit comments

Comments
 (0)