GithubHelp home page GithubHelp logo

release_up's Introduction

JSR

๐ŸŒฑ release_up

Automate semver releases in Deno ๐Ÿฆ•

Motivation

This projects allows to perform automatically tasks required at release time like for example:

  • Updating version numbers in the readme, according to the new tag.
  • Updating links in readme.
  • Creating a changelog.
  • Creating a new tag based on existing ones
  • Pushing a release to github.

Most changes are optionals and configurable.

Installation

deno install --global --force -A -n release_up jsr:@sylc/release-up

Usage

  Usage:   release_up <release_type> [name]
  Version: 0.6.0  Description:

    Automate semver releases.
    Example: release_up major --github

    Release type:
      * patch             eg: 1.2.3 -> 1.2.4
      * minor             eg: 1.2.3 -> 1.3.0
      * major             eg: 1.2.3 -> 2.0.0
      * prepatch <name>   eg: 1.2.3 -> 1.2.4-name.0
      * preminor <name>   eg: 1.2.3 -> 1.3.0-name.0
      * premajor <name>   eg: 1.2.3 -> 2.0.0-name.0
      * prerelease <name> eg: 1.2.3-name.0 -> 1.2.3-name.1

  Options:

    -h, --help                          - Show this help.
    -V, --version                       - Show the version number for this program.
    --config            <confi_path>    - Define the path of the config. (Default: ".release_up.json")
    --github                            - Enable Github plugin.
    --changelog                         - Enable Changelog plugin.
    --versionFile                       - Enable VersionFile plugin.
    --regex             <pattern>       - Enable Regex plugin. The regex need to be provided as string.
    --dry                               - Dry run, Does not commit any changes.
    --allowUncommitted                  - Allow uncommited change in the repo.
    --debug                             - Enable debug logging.

Plugins

release_up supports local and remote plugins. By default, plugins are NOT enabled. To enable them, either

  • Use a cli flag
  • Create a .release_up.json file that has a key matching the plugin. Example of configuration.
// .release_up.json
{
  "changelog": {},
  "github": {
    "release": true
  },
  "regex": [
    {
      "file": "README.md",
      "patterns": [
        "(?<=@)(.*)(?=\/cli)"
      ]
    },
    {
      "file": "deno.json",
      "patterns": [
        "(?<=\"version\": \")(.*)(?=\",)"
      ]
    }
  ],
  "versionFile": {},
  "myRemotePlugin": {
    "path": "./plugins/testRemote/mod.ts"
  }
}

Baked-in plugins

  • github: Create a release on Github.
  • changelog: Create a changelog based on filtered commits.
  • regex: Apply a regex on README.md
  • versionFile: Create a version.json file with the new version number.

Remote plugins

Plugins can also be defined externally. In that case they must have a "path" property in their config. The path can be either a local path or http(s) path.

A plugin must contain a default export with the signature defined at ./plugins.ts

Secrets

release_up uses dotenv to load environment variables. For example for interactiong with Github, set a .env file with the below

GITHUB_TOKEN=<my secret token>

Examples

Credits

Big Credits to denosaurs. This project is a fork of release. The current core features have been implemented by it.

Inspiration

This project is inspired by node project release-it

Contribution

Pull request, issues and feedback are very welcome. Code style is formatted with deno fmt.

LICENSE

MIT

release_up's People

Contributors

sylc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

release_up's Issues

Config file

Allow passing config file via command line
config file will have

  • (remote) address of new plugin to be registered
  • Config which plugins should be enabled

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.