GithubHelp home page GithubHelp logo

isabella232 / semantic-release-replace-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpoehnelt/semantic-release-replace-plugin

0.0 0.0 0.0 1.16 MB

Update version strings with semantic-release.

License: Apache License 2.0

TypeScript 78.30% Python 5.57% JavaScript 16.13%

semantic-release-replace-plugin's Introduction

Semantic Release Replace Plugin

npm Build Release codecov GitHub contributors semantic-release

The @google/semantic-release-replace-plugin plugin provides functionality to update version strings througout a project allowing semantic release to be used in many different languages and build processes.

Read more about Semantic Release.

Install

$ npm install @google/semantic-release-replace-plugin -D

Usage

The following example uses this plugin to demonstrate using semantic-release in a Python package where __VERSION__ is defined in the root __init__.py file.

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    [
      "@google/semantic-release-replace-plugin",
      {
        "replacements": [
          {
            "files": ["foo/__init__.py"],
            "from": "__VERSION__ = \".*\"",
            "to": "__VERSION__ = \"${nextRelease.version}\"",
            "results": [
              {
                "file": "foo/__init__.py",
                "hasChanged": true,
                "numMatches": 1,
                "numReplacements": 1
              }
            ],
            "countMatches": true
          }
        ]
      }
    ],
    [
      "@semantic-release/git",
      {
        "assets": ["foo/*.py"]
      }
    ]
  ]
}

Warning

This plugin will not commit changes unless you specify assets for the @semantic-release/git plugin! This is highlighted below.

[
  "@semantic-release/git",
  {
    "assets": ["foo/*.py"]
  }
]

Options

Please refer to the documentation for more options.

semantic-release-replace-plugin's People

Contributors

dependabot[bot] avatar jpoehnelt avatar

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.