Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle fix and publish #176

Merged
merged 11 commits into from
Dec 16, 2020
Merged

Gradle fix and publish #176

merged 11 commits into from
Dec 16, 2020

Conversation

jburel
Copy link
Member

@jburel jburel commented Nov 27, 2020

Use the template file to use the correct gradle version

This PR fixes the GH actions
and add structure for releasing artifact
See https://github.com/jburel/omero-insight/releases/tag/v5.5.15

To test the generation via GHA on your fork

  • change the version in build.gradle (dmg does not like snapshot) e.g. 5.5.16
  • push the tag to your fork
  • GHA will create the artifacts and create a release under your fork

@jburel jburel changed the title Gradle fix Gradle fix and publish Nov 30, 2020
@dominikl
Copy link
Member

dominikl commented Dec 8, 2020

👍 Seems to work fine: https://github.com/dominikl/omero-insight/releases/tag/v5.5.16 (I just forgot to commit the version change to 5.5.16 in the build.gradle).

@jburel
Copy link
Member Author

jburel commented Dec 8, 2020

The msi did not get created

Failed to convert version component to int.
java.lang.NumberFormatException: For input string: "15-SNAPSHOT"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)

b/c you kept snapshot. The error is not reported as a failure.
I might have to be smarter
Note this was the same problem with travis if I remember correctly

@jburel
Copy link
Member Author

jburel commented Dec 8, 2020

@dominikl

  • could you repeat what you did i.e. keep snapshot and tag. The job should fail
  • Remove snapshot and tag. The job should pass

@dominikl
Copy link
Member

dominikl commented Dec 9, 2020

Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes generally make sense in order to produce packages, upload them as artifacts and combine them into release assets. A few questions inline but none is really a blocker to get this in.

Comparing https://github.com/dominikl/omero-insight/releases/tag/v5.5.18 generated with this PR with the last release https://github.com/ome/omero-insight/releases/tag/v5.5.14, is the removal of drop of omero_ij-5.5.14-all.jar on purpose?

shell: bash
run: echo "$WIX\\bin" >> $GITHUB_PATH
- name: Build Executable
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && matrix.java == '1.8'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is build time the primary reason for making this condition to tags? Or the SNAPSHOT vs non-SNAPSHOT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will increase the build time, that's why I have opted to make it on tag only

- name: Build Dmg
if: startsWith(matrix.os, 'macos') && startsWith(github.ref, 'refs/tags') && matrix.java == '1.8'
run: |
brew cask install zulu8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguably all these steps could be combined into a standalone script e.g. package_macos.sh that gets executed by GitHub workflow but could be tested and modified in isolation.
Mostly a question, not a requirement for this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be refactored now that we have the build in place.
This could be done in a follow-up PR

@jburel
Copy link
Member Author

jburel commented Dec 9, 2020

I must have dreamt that I saw the jar in the list of artifacts, it should be there. so another commit is required

@jburel
Copy link
Member Author

jburel commented Dec 9, 2020

Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good with the last commit. I have not tested any of the artifacts so this might be something we will need to look at ahead of the next OMERO.insight release.

@dominikl
Copy link
Member

Sorry for the delay @jburel . Tested all artifacts of https://github.com/dominikl/omero-insight/releases/tag/v5.5.18 which were generated with the changes of this PR. All worked fine, except the Insight msi build. By default it wants to install itself in the Omero.importer directory. If you change the path during installation though it works fine too.

@jburel
Copy link
Member Author

jburel commented Dec 16, 2020

Could you try with the msi using the release since I reckon it is a problem with the gradle build itself and not the switch to actions?

@dominikl
Copy link
Member

dominikl commented Dec 16, 2020

Ok, this is really strange. I tried again and now like one would expect installation location is C:\Program Files\OMERO.importer\ and C:\Program Files\OMERO.insight\. Before it was some weird ...AppData\Local\OMERO.importer\ location for both Insight and Importer.
Anyway with respect to this PR 👍

@jburel
Copy link
Member Author

jburel commented Dec 16, 2020

Thanks @dominikl

@jburel jburel merged commit 21d2233 into ome:master Dec 16, 2020
@jburel jburel deleted the gradle-fix branch March 16, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants