Code Monkey home page Code Monkey logo

release's Introduction

Deprecated!

This project is no longer needed because of three reasons:

  1. Single release system for multiple platforms is too ambitious
  2. NPM now has https://docs.npmjs.com/cli/version
  3. I believe NPM is now the defacto package-manager for client-side and server-side so a parent tool to bridge different managers no longer matters.

release

Joyful lightening-fast project releases

Installation

npm install --global release2

(release was already taken)

Example

deploy-screenshot

Features

  • supported project types:
    • node + npm
    • duo (and any other manifestless projects)
  • supported VCSs:
    • git

cli docs:

$ release -h

  Usage: release [options]

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
    -p, --patch    Make a patch release
    -m, --minor    Make a minor release
    -a, --major    Make a major release

Roadmap

This project is being worked on. What follows is a spec of what the project will become.

Why

Humans should be able to confidently release project iterations using one familiar interface regardless of their version-control or packaging system of choice.

While release is created upon the nodejs platform its system-agnostic goals may be ported to a more neutral platform in the future (e.g. shell scripts). node was chosen because it is currently the author's most proficient environment but also because node has a vibrant full-stack community using multiple packaging systems, and a unix-like mentality of authoring many small focused modules; this is fertil soil to plant release.

How

release uses drivers to support many version-control and packaging systems. More can be added via cli plugins.

release decides upon the systems in use by detecting key files and folders in cwd. For instance given a cwd containing

.git/
package.json
component.json

release will decide that:

  • version-control system git is being used.
  • packaging system npmjs is being used.
  • packaging system componentjs is being used.

Then release employs the respective drivers for each system bridging their disparate interfaces to release's.

Defaults can be customized in .release.(yml|json) which will be searched for in cwd, then recursively until /. Config files closer to cwd override ones further away. CLI-flags will override config file defaults.

What

- hook: pre: release

- hook: pre: validate
  - validate: version numbers' correctness
  - validate: manifest files' correctness
  - validate: version-control system in correct state
- hook: post: validate

- hook: pre: increment
  - increment: versison numbers in package system manifest files
- hook: post: increment

- hook: pre: commit
  - commit manifest file(s)
  - tag commit node with version
- hook: post: commit

- hook: pre: push
  - push to remote origin
- hook: post: push

- hook: pre: publish
  - publish to applicable package registr(y|ies)
- hook: post: publish

- hook: post: release

Things it does well:

  • Use semvar
  • Update Manifest files:
    • component's component.json
    • npm's package.json
    • bower's bower.json
  • Registry publishing
  • VCS commit:
    • git
  • Extendable

Things it could do well (ideas):

  • Summarize release changes in a changelog hook:post:increment
  • ... please fork and contribute

release's People

Contributors

jasonkuhrt avatar

Watchers

 avatar

release's Issues

Security policy

Currently npm publish operates according to the package field private. If the field is not present then it defaults to false. This can have surprising consequences for users partly because npm init does not prompt for specification one way or another.

Although this is an edge-case when it happens it is likely impossible for the end-user to undo and so can be considered as high severity. This issue is important not because it helps most users but because it helps a small group of users greatly.

Possible directions:

  1. If the package privacy is unspecified then detect if the VCS repo is public/private and use that fact instead
  2. Do not publish without an explicit flag
  3. Interactively prompt for privacy specification when it is not present, the user provides it, and then release commits that change and continues with its process.

In addition there is yet more complexity. With npm private modules packages may now be private not by virtue of the private field but by virtue of being scoped @organization/package-name in the name field.

exit with error when user is offline

Probably best if we don't permit releases while the user is offline. It sucks to be offline make a release and have the local commit stuck while the origin may get ahead etc.

Support duo projects

duo does not have any manifest. Instead if relies on git tags and github alone.

This should be easy enough for us to support. It means that we detect no manifest file exists and continue with the VCS-only steps.

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.