GithubHelp home page GithubHelp logo

Comments (7)

jfairley avatar jfairley commented on May 14, 2024

My configuration of this plugin is as follows:

    ['@semantic-release/git', {
      assets: ['pom.xml']
    }],

(I'm releasing a maven project.)


My semantic-release dependencies are

    "@semantic-release/exec": "3.3.0",
    "@semantic-release/git": "7.0.7",
    "semantic-release": "15.12.5"

from git.

pvdlg avatar pvdlg commented on May 14, 2024

semantic-release first attempt to the git push --dry-run without using any token you might have configured, and if that fails tried again with the token.
This is what happened here. The failure message you see is due to the first attempt without the token and continued because the second attempt worked.

I don't know why it failed later though as you didn't provide the full logs.

from git.

jfairley avatar jfairley commented on May 14, 2024

Ok, this makes sense. My build failed later, because I tried to do git push with the @semantic-release/exec plugin.

I'm using CircleCI, and I've just applied a "user SSH key" to my repo, and I no longer get the error I showed in the description. I presume that also means that my manual push will work too, but I don't have a release to make right now. I'll try it next time.

If you happen know the command line pattern for pushing with a specified token, could you paste it? ... I know, you use node libraries in the tool, so no problem if you don't know it off-hand. I'm sure this is the right path.

from git.

pvdlg avatar pvdlg commented on May 14, 2024

The best is to not use @sematnic-release/exec to make that push and to use semantic-release/git which is meant for that.
I'm going to close this issue ass it seems everything works ass expected.

from git.

jfairley avatar jfairley commented on May 14, 2024

@pvdlg I understand and agree with your suggestion, and I would if it worked that way.

I'm releasing a maven project and the common paradigm is:

  1. Increment the version and commit pom.xml.
    • This represents going from x.y.z-SNAPSHOT to ${nextRelease.version}.
    • This is a perfect "prepare" phase and fits well into @semantic-release/git.
    • This is also the commit that gets tagged by the semantic-release core library.
  2. Build and deploy the Java artifacts.
    • This is a perfect "publish" phase. Still looking good.
  3. Increment the version and commit pom.xml.
    • This represents going from ${nextRelease.version} back to a snapshot version (some increment of that "next" version, patch increment for me).
    • There is nothing I have found in semantic-release that fits this phase, so I'm using @semantic-release/exec and doing it during the "success" phase.

Even the maven-semantic-release plugin linked from the main docs does this extra stuff. In his case, it's attached to the "publish" phase, but 6-half-dozen.
https://github.com/conveyal/maven-semantic-release/blob/dev/lib/publish.js


If at least the @semantic-release/git plugin executed the git push during the "publish" phase rather than "prepare", I could work with that and wouldn't have to write my own git push command, but as-is, it's just too soon.

from git.

jfairley avatar jfairley commented on May 14, 2024

Kinda strange to execute a git push during "prepare" IMO, when I really think about it.

from git.

jfairley avatar jfairley commented on May 14, 2024

I guess there's this... #117

😦

from git.

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.