Skip to content

Commit

Permalink
Bugfix: reload project after adding dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ppouchin authored Nov 7, 2023
2 parents cb8f2cf + 83115f3 commit bd3b60c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }}
- name: Append 'SNAPSHOT' to version if 'push' happened on 'main'
- name: Make sure to append 'SNAPSHOT' to version if 'push' happened on 'main'
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
mvn versions:set -DremoveSnapshot
mvn help:evaluate -N -Dexpression=project.version|grep -v '\['
VERSION=$(mvn help:evaluate -N -Dexpression=project.version|grep -v '\[')
mvn versions:set -DnewVersion=$VERSION-SNAPSHOT
- name: Append branch name to version if 'push' did not happen on 'main' or a tag
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')}}
run: |
mvn versions:set -DremoveSnapshot
mvn help:evaluate -N -Dexpression=project.version|grep -v '\['
VERSION=$(mvn help:evaluate -N -Dexpression=project.version|grep -v '\[')
mvn versions:set -DnewVersion=$VERSION-${GITHUB_REF##*/}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>fr.igred</groupId>
<artifactId>omero_batch-plugin</artifactId>
<version>2.0.0</version>
<version>2.0.1-SNAPSHOT</version>

<name>omero_batch-plugin</name>
<description>ImageJ plugin to batch process images from OMERO.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ private void createNewDataset(ActionEvent e) {
}
try {
DatasetWrapper newDataset = project.addDataset(client, name, "");
project.reload(client);
id = newDataset.getId();
} catch (ExecutionException | ServiceException | AccessException exception) {
warningWindow("Could not create dataset: " + exception.getMessage());
Expand Down

0 comments on commit bd3b60c

Please sign in to comment.