Skip to content

Commit

Permalink
Simplify inclusion of csl-* (JabRef#10482)
Browse files Browse the repository at this point in the history
* Simplify inclusion of csl-*

* Fix tab vs. spaces

* Try to fetch single commit

* Refined howto
  • Loading branch information
koppor authored Oct 12, 2023
1 parent a97d8a9 commit 16113d2
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 5,481 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/refresh-csl-subtrees.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,23 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: true
fetch-depth: 0
submodules: 'true'
show-progress: 'false'
- name: Initialize git
run: |
git config --local core.editor /usr/bin/cat
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Update buildres/csl/csl-styles
- name: Update src/main/resources/csl-styles
run: |
cd buildres/csl/csl-styles
cd src/main/resources/csl-styles
git checkout master
git pull
cd ..
cd ..
cd ..
cp buildres/csl/csl-styles/acm-siggraph.csl src/main/resources/csl-styles/
cp buildres/csl/csl-styles/apa.csl src/main/resources/csl-styles/
cp buildres/csl/csl-styles/ieee.csl src/main/resources/csl-styles/
cp buildres/csl/csl-styles/turabian-author-date.csl src/main/resources/csl-styles/
- name: Update buildres/csl/csl-locales
- name: Update src/main/resources/csl-locales
run: |
cd buildres/csl/csl-locales
cd src/main/resources/csl-locales
git checkout master
git pull
cd ..
cd ..
cd ..
cp buildres/csl/csl-locales/locales.json src/main/resources/csl-locales/
cp buildres/csl/csl-locales/locales-en-US.xml src/main/resources/csl-locales/
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER }}
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
path = buildres/abbrv.jabref.org
url = https://github.com/JabRef/abbrv.jabref.org.git
[submodule "buildres/csl-styles"]
path = buildres/csl/csl-styles
path = src/main/resources/csl-styles
url = https://github.com/citation-style-language/styles.git
[submodule "buildres/csl-locales"]
path = buildres/csl/csl-locales
path = src/main/resources/csl-locales
url = https://github.com/citation-style-language/locales.git
8 changes: 0 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,6 @@ clean {
}

processResources {
gradle.taskGraph.whenReady {
if (gradle.taskGraph.hasTask(":jpackage")) {
logger.info('Adding buildres/csl to resources')
from("buildres/csl")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}

filteringCharset = 'UTF-8'

filesMatching("build.properties") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In the following, we will use `c:\git-repositories` as base folder:
cd \
mkdir git-repositories
cd git-repositories
git clone https://github.com/JabRef/jabref.git JabRef
git clone --recurse-submodules https://github.com/JabRef/jabref.git JabRef
cd JabRef
git remote rename origin upstream
git remote add origin https://github.com/YOUR_USERNAME/jabref.git
Expand All @@ -34,9 +34,9 @@ git branch --set-upstream-to=origin/main main
```

{: .important }
> Note that putting the repo JabRef directly on `C:\` or any other drive letter on Windows causes compile errors (**negative example**: `C:\jabref`).
> `--recurse-submodules` is necessary to have the required files available to JabRef. (Background: It concerns the files from [citation-style-language/styles](https://github.com/citation-style-language/styles) and more).
>
> Further, if you are building on Windows, make sure that the absolute path to the location of the clone does not contain folders starting with '`u`' (**negative example**: `C:\university\jabref`) as this may currently also cause [compile errors](https://github.com/JabRef/jabref/issues/9783).
> Note that putting the repo JabRef directly on `C:\` or any other drive letter on Windows causes compile errors (**negative example**: `C:\jabref`).
>
> Please really ensure that you pass `JabRef` as parameter. Otherwise, you will get `java.lang.IllegalStateException: Module entity with name: jabref should be available`. See [IDEA-317606](https://youtrack.jetbrains.com/issue/IDEA-317606/Changing-only-the-case-of-the-Gradle-root-project-name-causes-exception-while-importing-project-java.lang.IllegalStateException) for details.
Expand Down
Loading

0 comments on commit 16113d2

Please sign in to comment.