Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into changemergesdialog
Browse files Browse the repository at this point in the history
* upstream/master:
  Fix eclipse classpath build file
  New translations JabRef_en.properties (French) (#5709)
  Check for existing master branch
  Disable failing MathSciNet test due to missing subscription
  Try to force creating reflog
  Change travis to github in Readme
  Use GitVersion to increment build numbers (#5682)
  New Crowdin translations (#5687)
  Bump checkstyle from 8.26 to 8.27 (#5694)
  Bump byte-buddy-parent from 1.10.3 to 1.10.4
  Bump classgraph from 4.8.54 to 4.8.58
  Bump unirest-java from 3.1.04 to 3.2.00
  Bump richtextfx from 0.10.2 to 0.10.3
  Bump mockito-core from 3.1.0 to 3.2.0
  Update JavaFX (#5690)
  Run outdated dependency check after dpendabot
  Update outdatedDependencies.md
  • Loading branch information
Siedlerchr committed Dec 5, 2019
2 parents ceb9a6a + 5dcb565 commit abd0d5d
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 103 deletions.
3 changes: 1 addition & 2 deletions .github/outdatedDependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
title: Outdated dependencies
labels: code-quality, dependencies
---
There are outdated dependencies!
See https://github.com/JabRef/jabref/actions?query=is%3Afailure for details.
[There are outdated dependencies!](https://github.com/JabRef/jabref/actions?query=is%3Afailure+workflow%3A%22Check+dependencies%22)
2 changes: 1 addition & 1 deletion .github/workflows/check-outdated-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check dependencies

on:
schedule:
- cron: '0 0 * * 0' # Run every Sunday
- cron: '0 0 * * TUE' # Run every Tuesday (after dependabot, which runs Monday)

jobs:
checkDependencies:
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,24 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v1
uses: actions/checkout@v2-beta
with:
depth: 1
submodules: false
- name: Extract branch name
shell: bash
fetch-depth: 0
- name: Fetch tags and master for GitVersion
run: |
ref=${GITHUB_REF#refs/heads/}
ref=${ref#refs/pull/}
ref=${ref%/merge}
echo "##[set-output name=branch;]${ref}"
id: extract_branch
git fetch --tags origin
git rev-parse --verify master
if (-not $?) {
git branch --force --create-reflog master origin/master
}
shell: pwsh
- name: Install GitVersion
uses: gittools/actions/setup-gitversion@v0.3
with:
versionSpec: '5.1.2'
- name: Run GitVersion
id: gitversion
uses: gittools/actions/execute-gitversion@v0.3
- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -82,11 +88,11 @@ jobs:
zip.close()
shell: python
- name: Build runtime image
run: ./gradlew -Pdev=true jlinkZip
run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jlinkZip
- name: Build installer
run: |
export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}"
./gradlew -Pdev=true jpackage
./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage
shell: bash
- name: Add installer as artifact
uses: actions/upload-artifact@master
Expand All @@ -97,18 +103,23 @@ jobs:
run: ${{ matrix.archivePortable }}
shell: bash
- name: Build and publish snap
if: matrix.os == 'ubuntu-latest' && steps.extract_branch.outputs.branch == 'master'
if: matrix.os == 'ubuntu-latest' && steps.gitversion.outputs.branchName == 'master'
env:
SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
run: |
mkdir .snapcraft && echo ${SNAPCRAFT_LOGIN_FILE} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
docker run -v $(pwd):$(pwd) -t lyzardking/snapcraft-bionic sh -c "apt update -qq && cd $(pwd) && snapcraft && mv jabref*.snap build/distribution/ && snapcraft push build/distribution/jabref*.snap --release edge || true"
shell: bash
- name: Rename files
run: |
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "portable","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-portable"}
shell: pwsh
- name: Upload to builds.jabref.org
uses: garygrossgarten/github-action-scp@release
with:
local: build/distribution
remote: www/${{ steps.extract_branch.outputs.branch }}
remote: www/${{ steps.gitversion.outputs.branchName }}
host: builds.jabref.org
username: builds_jabref_org
privateKey: ${{ secrets.buildJabRefPrivateKey }}
Expand Down
2 changes: 2 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
assembly-versioning-format: '{major}.{minor}.{buildmetadata}'
assembly-informational-format: '{major}.{minor}{PreReleaseTagWithDash}--{CommitDate}--{ShortSha}'
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# JabRef Bibliography Management

[![Build Status](https://travis-ci.org/JabRef/jabref.svg?branch=master)](https://travis-ci.org/JabRef/jabref)
[![Deployment Status](https://github.com/JabRef/jabref/workflows/Deployment/badge.svg)](https://github.com/JabRef/jabref/actions?query=workflow%3ADeployment)
[![Build Status](https://github.com/JabRef/jabref/workflows/Tests/badge.svg)](https://github.com/JabRef/jabref/actions?query=workflow%3ATests)
[![codecov.io](https://codecov.io/github/JabRef/jabref/coverage.svg?branch=master)](https://codecov.io/github/JabRef/jabref?branch=master)
[![Donation](https://img.shields.io/badge/donate%20to-jabref-orange.svg)](https://donations.jabref.org)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/jabref/localized.svg)](https://crowdin.com/project/jabref)
Expand Down Expand Up @@ -94,7 +95,7 @@ When you want to develop, it is necessary to generate additional sources using `
and then generate the Eclipse `gradlew eclipse`.
For IntelliJ IDEA, just import the project via a Gradle Import by pointing at the `build.gradle`.

`gradlew test` executes all tests. We use [Travis CI](https://travis-ci.org/) for executing the tests after each commit. For developing, it is sufficient to locally only run the associated test for the classes you changed. Travis will report any other failure.
`gradlew test` executes all tests. We use [Github Actions](https://github.com/JabRef/jabref/actions) for executing the tests after each commit. For developing, it is sufficient to locally only run the associated test for the classes you changed. Github will report any other failure.

[BibTeX]: https://www.ctan.org/pkg/bibtex
[Biblatex]: https://www.ctan.org/pkg/biblatex
Expand Down
50 changes: 9 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ apply plugin: LocalizationPlugin
apply from: 'eclipse.gradle'

group = "org.jabref"
version = "5.0.0"
version = project.findProperty('projVersion') ?: '100.0.0'

sourceCompatibility = 13
targetCompatibility = 13
Expand Down Expand Up @@ -102,7 +102,7 @@ configurations {
}

javafx {
version = "13"
version = "13.0.1"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.web', 'javafx.swing' ]
}

Expand Down Expand Up @@ -163,13 +163,13 @@ dependencies {
compile 'de.saxsys:mvvmfx:1.8.0'
compile 'org.fxmisc.easybind:easybind:1.0.3'
compile 'org.fxmisc.flowless:flowless:0.6.1'
compile 'org.fxmisc.richtext:richtextfx:0.10.2'
compile 'org.fxmisc.richtext:richtextfx:0.10.3'
compile group: 'org.glassfish.hk2.external', name: 'jakarta.inject', version: '2.6.1'
compile 'com.jfoenix:jfoenix:9.0.9'
compile 'org.controlsfx:controlsfx:11.0.0'

compile 'org.jsoup:jsoup:1.12.1'
compile 'com.konghq:unirest-java:3.1.04'
compile 'com.konghq:unirest-java:3.2.00'

compile 'org.slf4j:slf4j-api:2.0.0-alpha1'
compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '3.0.0-SNAPSHOT'
Expand Down Expand Up @@ -206,15 +206,15 @@ dependencies {
}


testCompile 'io.github.classgraph:classgraph:4.8.54'
testCompile 'io.github.classgraph:classgraph:4.8.58'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.5.2'
testCompile 'org.junit.platform:junit-platform-launcher:1.5.2'

testCompile 'net.bytebuddy:byte-buddy-parent:1.10.3'
testCompile 'net.bytebuddy:byte-buddy-parent:1.10.4'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '3.0.0-SNAPSHOT'
testCompile 'org.mockito:mockito-core:3.1.0'
testCompile 'org.mockito:mockito-core:3.2.0'
//testCompile 'com.github.tomakehurst:wiremock:2.24.1'
testCompile 'org.xmlunit:xmlunit-core:2.6.3'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.3'
Expand All @@ -225,7 +225,7 @@ dependencies {
testCompile "org.testfx:testfx-junit5:4.0.17-alpha-SNAPSHOT"
testCompile "org.hamcrest:hamcrest-library:2.2"

checkstyle 'com.puppycrawl.tools:checkstyle:8.26'
checkstyle 'com.puppycrawl.tools:checkstyle:8.27'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.2'
jython 'org.python:jython-standalone:2.7.1'
}
Expand Down Expand Up @@ -283,7 +283,7 @@ processResources {
filteringCharset = 'UTF-8'

filesMatching("build.properties") {
expand(version: createVersionString(),
expand(version: project.findProperty('projVersionInfo') ?: '100.0.0',
"year": String.valueOf(Calendar.getInstance().get(Calendar.YEAR)),
"authors": new File('AUTHORS').readLines().findAll { !it.startsWith("#") }.join(", "),
"developers": new File('DEVELOPERS').readLines().findAll { !it.startsWith("#") }.join(", "),
Expand Down Expand Up @@ -723,35 +723,3 @@ task bundleLibreOffice(type: Jar) {
destinationDir = file('lib')
archiveName = 'libreoffice.jar'
}

// Returns the value of project.version in production and a string of the format VERSION-dev--DATE--BRANCH--GIT_HASH for development versions
def createVersionString() {
if (hasProperty('dev')) {
String command = "git log --pretty=format:%cd--%h -n 1 --date=short"
String commitInfo
if (OperatingSystem.current().isWindows()) {
commitInfo = "cmd /c $command".execute().in.text
} else {
commitInfo = command.execute().in.text
}

// determine branch
command = "git symbolic-ref -q --short HEAD"
String branchName
if (OperatingSystem.current().isWindows()) {
branchName = "cmd /c $command".execute().in.text
} else {
branchName = command.execute().in.text
}
// A newline is returned. Remove it. (trim())
// In the context of github, the branch name could be something like "pull/277"
// "/" is an illegal character. To be safe, all illegal filename characters are replaced by "_"
// http://stackoverflow.com/a/15075907/873282 describes the used pattern.
branchName = branchName.trim().replaceAll("[^a-zA-Z0-9.-]", "_")

// first the date (%cd), then the branch name, and finally the commit id (%h)
return project.version + "-dev--" + commitInfo.substring(0, 10) + "--" + branchName + "--" + commitInfo.substring(12)
} else {
return project.version
}
}
5 changes: 5 additions & 0 deletions eclipse.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ eclipse {
javafxcontrols.entryAttributes['add-exports'] = 'javafx.controls/com.sun.javafx.scene.control=org.jabref:javafx.controls/com.sun.javafx.scene.control.behavior=org.jabref:javafx.controls/javafx.scene.control=org.jabref';
javafxcontrols.entryAttributes['add-opens'] = 'javafx.controls/com.sun.javafx.scene.control=org.jabref:javafx.controls/com.sun.javafx.scene.control.behavior=org.jabref:javafx.controls/javafx.scene.control=org.jabref';

def javafxgraphics = entries.find { isJavafxGraphics(it) };
javafxgraphics.entryAttributes['add-opens'] = 'javafx.graphics/javafx.scene=org.controlsfx.controls';

def graaltruffle = entries.find{ isTruffleGraal(it) } ;
graaltruffle.entryAttributes['add-exports'] = 'com.oracle.truffle.regex/com.oracle.truffle.regex=org.graalvm.truffle';

Expand Down Expand Up @@ -56,6 +59,8 @@ boolean isControlsfx(entry) { return entry.properties.path.contains('controlsfx'

boolean isJavafxControls(entry) { return entry.properties.path.contains('javafx-controls'); }

boolean isJavafxGraphics(entry) { return entry.properties.path.contains('javafx-graphics'); }

boolean isTruffleGraal(entry) {return entry.properties.path.contains('org.graalvm.regex'); }

// add formatter and cleanup settings to Eclipse settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public BracketedPattern() {
this.pattern = null;
}

/**
* @param bibentry
*/
public BracketedPattern(String pattern) {
this.pattern = pattern;
}
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/org/jabref/logic/bst/BibtexTextPrefix.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ private BibtexTextPrefix() {
}

/**
*
* @param numOfChars
* @param toPrefix
* @param warn may-be-null
* @return
*/
public static String textPrefix(int inNumOfChars, String toPrefix, Warn warn) {

int numOfChars = inNumOfChars;
StringBuilder sb = new StringBuilder();

Expand Down
5 changes: 0 additions & 5 deletions src/main/java/org/jabref/logic/openoffice/OOBibStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ public boolean isValid() {
* Parse a line providing bibliography structure information for an entry type.
*
* @param line The string containing the structure description.
* @throws IOException
*/
private void handleStructureLine(String line) {
int index = line.indexOf('=');
Expand All @@ -369,7 +368,6 @@ private void handleStructureLine(String line) {
* Parse a line providing a property name and value.
*
* @param line The line containing the formatter names.
* @throws IOException
*/
private void handlePropertiesLine(String line, Map<String, Object> map) {
int index = line.indexOf('=');
Expand All @@ -393,9 +391,6 @@ private void handlePropertiesLine(String line, Map<String, Object> map) {

/**
* Parse a line providing a journal name for which this style is valid.
*
* @param line
* @throws IOException
*/
private void handleJournalsLine(String line) {
if (!line.trim().isEmpty()) {
Expand Down
Loading

0 comments on commit abd0d5d

Please sign in to comment.