Giter Club home page Giter Club logo

Comments (17)

Framstag avatar Framstag commented on June 3, 2024 1

Hmm, strange. I'll delete the tag and the latest release once more, to see if there was some inconsistency. Possibly I deleted the tag but not the release...

..and btw.: Thanks for the support, it (was) / is a pleasure :-)

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

https://github.com/jreleaser/helloworld-cpp may also serve as inspiration 😏

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

After some analysis, I'm not sure how much JReleaser will be helpful since meson already will build a distribution.zip and .xz. I'm not sure if I can use JRelease in such a mode that it reuses a generated archive. The rest of JReleaser of course would still be (very) helpful. If you have any experience, I'm happy to get further hints :-)

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

Yes, it may be used in such way. JReleaser provides an assemble step for convenience but does not require distributions to be assembled with it. You may create archives in any way you deem necessary.

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

This being said, I'd love to learn from the build setup found in this repository to create another helloworld-cpp project that follows its build procedure.

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

OK; I'll take a look. Is there already a demo for "do my own assembly". It does not need to be for C++, I'll manage it ;-) I did check for the JReleaser build, too, at the time I got the release build for AcousticRules working. I'll still have a week holiday, so I hope I get it working by then ;-)

The most difficult question is which versioning scheme I should use for a library that only does regular snapshot releases but does not want to handle SEMVER is all details...

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

https://github.com/aalmiray/app/ it's a Java based app but uses Maven's appassembler & assembly plugins to create the archive. This would be similar as producing archives with meson. Notice that in this case the jreleaser.yml file has no assemble configuration and it explicitly lists a distribution with matching artifacts.

JReleaser supports 5 different versioning schemes https://jreleaser.org/guide/latest/reference/project.html#_version Perhaps one of them may be a match for you. Worst case scenario semver would be the way to go.

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

I have now decided to allow separation of the library version from the release version in the meson build files. This way we can use CHRONVER for releases and still are able to use SEMVER for the libraries

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

See jreleaser/jreleaser#1295 ;-)

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

So now I managed to create a snapshot release. Choosing CHRONVER made some trouble because it now expects that a release has a compatible release string. See issue above. Another problem is, that it tries to parse existing release to build up a changelog. While I have created a "fake release" it still seems to create a changelog over a long period of time, because it has problems with parsing the older versions as CHRONVER - at least that si what I assume. If I got the regular release job running I may delete the old release and test again...

[INFO]  Generating changelog
[WARN]  Cannot parse version '1.0.0'

@aalmiray : I did not yet made a ticket for that problem, because a first judgment on your side would be helpful.

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

Correct. JReleaser assumes all tags follow the same convention. One option to stop long lookups is to explicitly list the previousTagName alongside the current tagName in the release section. It will still show a warning due to mismatched format but it should produce a changelog much faster.

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

I also had problems with the protected master branch which does not allow to commit the release version. Not a problem for me.

@aalmiray I have deleted the older releases and the problem disappeared. One last problem is still open though: I have multiple "latest" releases. I assumed (and it did work for acousticrules), that a new "latest" release deletes the old "latest" release in the github release list. I assume that there is still some configuration problem - or it is a side effect of CHRONVER handling?

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

If the project is marked as snapshot then a "latest" release (identified with tag early-access) is always overwritten. Otherwise you must explicitly ser overwrite to true inside release.github.

re: branch protection. JReleaser pulls/pushes to the same branch identified by the releaser settings. I think adding an explicit branch for push (defaulting to same as pull) should be the way to go forward. We added this feature to package manager repositories but forgot to add it to releasers.

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

FWIW you may leave the branch value unset in jreleaser.yml. This will pick up the branch name from git metadata. Next, you may use a JRELEASER_BRANCH environment variable to override this setting. This can help you switch branches programmatically with one caveat: the branch must exist (local and remote) before JReleaser is invoked. This will be easier once explicit push branch support is added.

Filed jreleaser/jreleaser#1296

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

Though I have a snapshot section as follows:

  snapshot:
    pattern: .*-latest
    label: latest
    fullChangelog: true

Especially with label = latest, I still get multiple latest releases.

Snapshot is correctly detected, see https://github.com/Framstag/libosmscout/actions/runs/4521006294/jobs/7962487259:

[INFO]  Project version set to 2023.03.25.1-latest
[INFO]  Release is snapshot

Hmm, looking at the output:

[DEBUG] looking up release with tag latest at repository Framstag/libosmscout
[DEBUG] fetching release on Framstag/libosmscout with tag latest
[DEBUG] release latest does not exist
[DEBUG] creating release latest
[DEBUG] deleting tag latest from Framstag/libosmscout
[DEBUG] tagging local repository with latest

I would claim, however, that a tag latest has existed. Strange... What can I do to further clarify what happens?

from libosmscout.

aalmiray avatar aalmiray commented on June 3, 2024

I've configured a sample project in the same way as yours:

project:
  name: app
  description: Sample application
  longDescription: Sample application
  links:
    homepage: https://acme.com/awesome-app
  authors:
    - Andres Almiray
  license: Apache-2.0
  java:
    groupId: com.acme
    version: 8
  inceptionYear: 2021
  versionPattern: CHRONVER
  snapshot:
    pattern: .*-latest
    label: latest
    fullChangelog: true

release:
  github:
    overwrite: true
    sign: true
    changelog:
      formatted: ALWAYS
      preset: conventional-commits
      contributors:
        format: '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}'

signing:
  active: always
  armored: true

Then set JRELEASER_PROJECT_VERSION to 2023.03.26.1-latest and ran jreleaser release twice:

1st invocation

[INFO]  Releasing to https://github.com/aalmiray/foobar@main
[DEBUG] fetching all branches on aalmiray/foobar
[DEBUG] looking up release with tag latest at repository aalmiray/foobar
[DEBUG] fetching release on aalmiray/foobar with tag latest
[DEBUG] release latest does not exist
[DEBUG] creating release latest
[DEBUG] deleting tag latest from aalmiray/foobar
[DEBUG] tagging local repository with latest
[DEBUG] creating release on aalmiray/foobar with tag latest
[INFO]   - uploading checksums_sha256.txt
[INFO]   - uploading checksums_sha256.txt.asc
[INFO]  Writing output properties to out/jreleaser/output.properties

2nd invocation

[INFO]  Releasing to https://github.com/aalmiray/foobar@main
[DEBUG] fetching all branches on aalmiray/foobar
[DEBUG] looking up release with tag latest at repository aalmiray/foobar
[DEBUG] fetching release on aalmiray/foobar with tag latest
[DEBUG] release latest exists
[DEBUG] deleting release latest
[DEBUG] creating release latest
[DEBUG] deleting tag latest from aalmiray/foobar
[DEBUG] tagging local repository with latest
[DEBUG] creating release on aalmiray/foobar with tag latest
[INFO]   - uploading checksums_sha256.txt
[INFO]   - uploading checksums_sha256.txt.asc
[INFO]  Writing output properties to out/jreleaser/output.properties

from libosmscout.

Framstag avatar Framstag commented on June 3, 2024

IMHO the problem with the two "latest release" is the only problem left. I have no idea about the cause, since it works as design in one of my other projects (acousticrules).

from libosmscout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.