GithubHelp home page GithubHelp logo

Comments (13)

gund avatar gund commented on May 28, 2024 5

+1 for examples.

Also I would like to see non-lerna based examples (for ex nx-workspaces) that will suit any monorepo.

I tried to do this:

// Release package1
cd path/to/publishable/package1 && npx semantic-release -e semantic-release-monorepo
// Release package2
cd path/to/publishable/package2 && npx semantic-release -e semantic-release-monorepo
// ... And so on

But when I was doing so I got analyze-commits plugin saying that it could not find any commits so it will skip release.

Example: https://travis-ci.org/orchestratora/orchestrator/jobs/444578949#L569

...
[Semantic release]: Found 46 commits since last release
[Semantic release]: Call plugin analyze-commits
[Semantic release]: Found 0 commits for package @orchestrator/core since last release
[Semantic release]: Analysis of 0 commits complete: no release
[Semantic release]: There are no relevant changes, so no new version is released.

That is why it would be nice to have more relevant examples.

Thanks =)

from semantic-release-monorepo.

pmowrer avatar pmowrer commented on May 28, 2024 1

I agree the language could be clearer @snebjorn. I'll clean it up soon. Anyway, semantic-release -e semantic-release-monorepo is how you run it.

from semantic-release-monorepo.

pmowrer avatar pmowrer commented on May 28, 2024 1

Hi @Mani2693! The command needs to be run in the root of each package, not in the repo (project) root.

from semantic-release-monorepo.

pmowrer avatar pmowrer commented on May 28, 2024

I totally hear you! The difficulty in creating good examples is that there are a lot of scenarios to cover!

@gund Would you mind running with the --debug flag? It will print a lot of additional information, including why a commit isn't considered for a release.

from semantic-release-monorepo.

marcguilera avatar marcguilera commented on May 28, 2024

Is it possible to use this for non-node projects?

from semantic-release-monorepo.

snebjorn avatar snebjorn commented on May 28, 2024

I too would appreciate some examples. It doesn't have to cover may cases, just a simple getting started scenario.

Cause reading the doc have me confused.

Run semantic-release-monorepo for the package in the current working directory:

npx semantic-release -e semantic-release-monorepo

Do I run semantic-release-monorepo or do i run semantic-release -e semantic-release-monorepo. It isn't clear and I have to try both to be sure

from semantic-release-monorepo.

ispirals avatar ispirals commented on May 28, 2024

Hi, im facing the same issue described by @gund using yarn workspaces.

Here the ouput with --debug

[2:11:22 PM] [semantic-release] › ℹ  Found 18 commits since last release
  semantic-release:get-commits Parsed commits: [ {...the 18 commits found } ] +0ms
[2:11:22 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
  semantic-release:monorepo Running 'analyzeCommits' version '7.0.2' +0ms
  semantic-release:monorepo Filter commits by package path: "" +0ms
[2:11:22 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ  Found 0 commits for package my-project since last release
[2:11:22 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ  Analysis of 0 commits complete: no release

Seems a problem with the analyzeCommits step.

I just installed lerna in my project, and now it works as expected.

from semantic-release-monorepo.

pmowrer avatar pmowrer commented on May 28, 2024

Hi @ispirals!

Based on Filter commits by package path: "", it looks like you're running semantic-release in the root of the repo and not in the root a monorepo package. Would you mind sharing how you're running this with lerna?

from semantic-release-monorepo.

smkart avatar smkart commented on May 28, 2024

Same issue with nx dev repo , I run the command from root of the project but it says 0 commit found
Below is after --debug enabled
image

from semantic-release-monorepo.

snebjorn avatar snebjorn commented on May 28, 2024

@Mani2693 if you want to run from root see this "trick" #85

from semantic-release-monorepo.

smkart avatar smkart commented on May 28, 2024

@pmowrer @snebjorn Thank you so much for your response, I tried it from the project folder still getting same error, It was not getting commits form git , I tried with lerna exec as well still no go , Kindly help,
image

from semantic-release-monorepo.

snebjorn avatar snebjorn commented on May 28, 2024

I haven't tried that trick with NPM so don't know if it have the same capabilities. I also don't know lerna.

But I need to see the scripts and your configs to help further.

from semantic-release-monorepo.

smkart avatar smkart commented on May 28, 2024

@snebjorn I have sample project attached here , this has firstlib which i am trying to apply release update.
testproj.zip

Thanks for your time !

from semantic-release-monorepo.

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.