Code Monkey home page Code Monkey logo

Comments (6)

noahnu avatar noahnu commented on August 21, 2024

Makes sense to me. Any ideas how we can verify credentials? Should we do this in dry run as well?

And are you interested in contributing this feature? (If so, I can point you in the right direction)

from monodeploy.

noahnu avatar noahnu commented on August 21, 2024

ruin the 1.0.0 release of one of my monorepos

You have 72 hours to delete a release from npm.

https://docs.npmjs.com/unpublishing-packages-from-the-registry

from monodeploy.

EdieLemoine avatar EdieLemoine commented on August 21, 2024

I'd like to contribute, I glanced at the repository but I didn't spot the right place to do it fast enough to warrant making a pr before an issue :)

Semantic release does it by git push --dry-run, which some people on StackOverflow say does not work, but it does seem to work for me.

One of my repositories:

git push --dry-run --no-verify https://github.com/edielemoine/eslint.git HEAD:test
To https://github.com/edielemoine/eslint.git
 * [new branch]      HEAD -> test

A repository I can't push to:

git push --dry-run --no-verify https://github.com/eslint/eslint.git HEAD:test
remote: Permission to eslint/eslint.git denied to EdieLemoine.
fatal: unable to access 'https://github.com/eslint/eslint.git/': The requested URL returned error: 403

Should we do this in dry run as well?

I use dry run to check if my config works, so knowing I can't push commits before running a real deploy would be very useful.

You have 72 hours to delete a release from npm.

I know, but it doesn't allow you to republish the same name@version ever again :/

from monodeploy.

noahnu avatar noahnu commented on August 21, 2024

I glanced at the repository but I didn't spot the right place

All git commands live in this file https://github.com/tophat/monodeploy/blob/main/packages/git/src/gitCommands.ts which must also be duplicated in the mocks. You'd add a new command to verify push permissions.

The monodeploy pipeline is defined in this file: https://github.com/tophat/monodeploy/blob/main/packages/node/src/index.ts.

You could do the check in a stage before the publish to npm here:

// We publish to the registry before committing artifacts, because we use the
or possibly at the start of the pipeline somewhere around
const intentionalStrategies = await getExplicitVersionStrategies({

The check should only run if config.git.push is true.

An alternative approach would be to run the "verify git permissions" check in place of the real git push when in dry run:

await pushPublishCommit({
and

from monodeploy.

EdieLemoine avatar EdieLemoine commented on August 21, 2024

Thanks, just opened a pr! :)

from monodeploy.

noahnu avatar noahnu commented on August 21, 2024

Some enhancements in https://github.com/tophat/monodeploy/releases/tag/monodeploy%403.4.0

from monodeploy.

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.