GithubHelp home page GithubHelp logo

semantic-release / git Goto Github PK

View Code? Open in Web Editor NEW
279.0 6.0 62.0 1.94 MB

:twisted_rightwards_arrows: semantic-release plugin to commit release assets to the project's git repository

License: MIT License

JavaScript 100.00%
changelog commit git conventional-changelog conventional-commits release semantic-release version

git's Introduction

@semantic-release/git

semantic-release plugin to commit release assets to the project's git repository.

Warning

You likely do not need this plugin to accomplish your goals with semantic-release.
Please consider our recommendation against making commits during your release to avoid unnecessary headaches.

Build Status npm latest version npm next version npm beta version

Step Description
verifyConditions Verify the access to the remote Git repository, the commit message and the assets option configuration.
prepare Create a release commit, including configurable file assets.

Install

$ npm install @semantic-release/git -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/git", {
      "assets": ["dist/**/*.{js,css}", "docs", "package.json"],
      "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
    }]
  ]
}

With this example, for each release a release commit will be pushed to the remote Git repository with:

  • a message formatted like chore(release): <version> [skip ci]\n\n<release notes>
  • the .js and .css files in the dist directory, the files in the docs directory and the package.json

Merging between semantic-release branches

This plugin will, by default, create commit messages with the keyword [skip ci], so they won't trigger a new unnecessary CI build. If you are using semantic-release with multiple branches, when merging a branch with a head being a release commit, a CI job will be triggered on the target branch. Depending on the CI service that might create an unexpected behavior as the head of the target branch might be ignored by the build due to the [skip ci] keyword.

To avoid any unexpected behavior we recommend to use the --no-ff option when merging branches used by semantic-release.

Note: This concerns only merges done between two branches configured in the branches option.

Configuration

Git authentication

The Git user associated with the Git credentials has to be able to push commit to the release branch.

When configuring branches permission on a Git hosting service (e.g. GitHub protected branches, GitLab protected branches or Bitbucket branch permissions) it might be necessary to create a specific configuration in order to allow the semantic-release user to bypass global restrictions. For example on GitHub you can uncheck "Include administrators" and configure semantic-release to use an administrator user, so the plugin can push the release commit without requiring status checks and pull request reviews.

Environment variables

Variable Description Default
GIT_AUTHOR_NAME The author name associated with the release commit. See Git environment variables. @semantic-release-bot.
GIT_AUTHOR_EMAIL The author email associated with the release commit. See Git environment variables. @semantic-release-bot email address.
GIT_COMMITTER_NAME The committer name associated with the release commit. See Git environment variables. @semantic-release-bot.
GIT_COMMITTER_EMAIL The committer email associated with the release commit. See Git environment variables. @semantic-release-bot email address.

Options

Options Description Default
message The message for the release commit. See message. chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}
assets Files to include in the release commit. Set to false to disable adding files to the release commit. See assets. ['CHANGELOG.md', 'package.json', 'package-lock.json', 'npm-shrinkwrap.json']

message

The message for the release commit is generated with Lodash template. The following variables are available:

Parameter Description
branch The branch from which the release is done.
branch.name The branch name.
branch.type The type of branch.
branch.channel The distribution channel on which to publish releases from this branch.
branch.range The range of semantic versions to support on this branch.
branch.prerelease The pre-release detonation to append to semantic versions released from this branch.
lastRelease Object with version, gitTag and gitHead of the last release.
nextRelease Object with version, gitTag, gitHead and notes of the release being done.

Note: It is recommended to include [skip ci] in the commit message to not trigger a new build. Some CI service support the [skip ci] keyword only in the subject of the message.

message examples

The message Release <%= nextRelease.version %> - <%= new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }) %> [skip ci]\n\n<%= nextRelease.notes %> will generate the commit message:

Release v1.0.0 - Oct. 21, 2015 1:24 AM [skip ci]

## 1.0.0

### Features
* Generate 1.21 gigawatts of electricity
...

assets

Can be an Array or a single entry. Each entry can be either:

  • a glob
  • or an Object with a path property containing a glob.

Each entry in the assets Array is globbed individually. A glob can be a String ("dist/**/*.js" or "dist/mylib.js") or an Array of Strings that will be globbed together (["dist/**", "!**/*.css"]).

If a directory is configured, all the files under this directory and its children will be included.

Note: If a file has a match in assets it will be included even if it also has a match in .gitignore.

assets examples

'dist/*.js': include all js files in the dist directory, but not in its sub-directories.

'dist/**/*.js': include all js files in the dist directory and its sub-directories.

[['dist', '!**/*.css']]: include all files in the dist directory and its sub-directories excluding the css files.

[['dist', '!**/*.css'], 'package.json']: include package.json and all files in the dist directory and its sub-directories excluding the css files.

[['dist/**/*.{js,css}', '!**/*.min.*']]: include all js and css files in the dist directory and its sub-directories excluding the minified version.

Examples

When used with the @semantic-release/changelog or @semantic-release/npm plugins:

  • The @semantic-release/changelog plugin must be called first in order to update the changelog file so the @semantic-release/git and @semantic-release/npm plugins can include it in the release.
  • The @semantic-release/npm plugin must be called second in order to update the package.json file so the @semantic-release/git plugin can include it in the release commit.
{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git"
  ],
}

GPG signature

Using GPG, you can sign and verify tags and commits. With GPG keys, the release tags and commits made by Semantic-release are verified and other people can trust that they were really were made by your account.

Generate the GPG keys

If you already have a GPG public and private key you can skip this step and go to the Get the GPG keys ID and the public key content step.

Download and install the GPG command line tools for your operating system.

Create a GPG key

$ gpg --full-generate-key

At the prompt select the RSA and RSA king of key, enter 4096 for the keysize, specify how long the key should be valid, enter yout name, the email associated with your Git hosted account and finally set a long and hard to guess passphrase.

Get the GPG keys ID and the public key content

Use the gpg --list-secret-keys --keyid-format LONG command to list your GPG keys. From the list, copy the GPG key ID you just created.

$ gpg --list-secret-keys --keyid-format LONG
/Users/<user_home>/.gnupg/pubring.gpg
---------------------------------------
sec   rsa4096/XXXXXXXXXXXXXXXX 2017-12-01 [SC]
uid                 <your_name> <your_email>
ssb   rsa4096/YYYYYYYYYYYYYYYY 2017-12-01 [E]

the GPG key ID is the 16 character string, on the sec line, after rsa4096. In this example, the GPG key ID is XXXXXXXXXXXXXXXX.

Export the public key (replace XXXXXXXXXXXXXXXX with your key ID):

$ gpg --armor --export XXXXXXXXXXXXXXXX

Copy your GPG key, beginning with -----BEGIN PGP PUBLIC KEY BLOCK----- and ending with -----END PGP PUBLIC KEY BLOCK-----

Add the GPG key to your Git hosted account

Add the GPG key to GitHub

In GitHub Settings, click on SSH and GPG keys in the sidebar, then on the New GPG Key button.

Paste the entire GPG key export previously and click the Add GPG Key button.

See Adding a new GPG key to your GitHub account for more details.

Use the GPG key to sign commit and tags locally

If you want to use this GPG to also sign the commits and tags you create on your local machine you can follow the instruction at Git Tools - Signing Your Work This step is optional and unrelated to Semantic-release.

Add the GPG keys to your CI environment

Make the public and private GPG key available on the CI environment. Encrypt the keys, commit it to your repository and configure the CI environment to decrypt it.

Add the GPG keys to Travis CI

Install the Travis CLI:

$ gem install travis

Login to Travis with the CLI:

$ travis login

Add the following environment variables to Travis:

$ travis env set GPG_PASSPHRASE <gpg_passphrase>
$ travis env set GPG_KEY_ID XXXXXXXXXXXXXXXX
$ travis env set GIT_EMAIL <your_email>
$ travis env set GIT_USERNAME <your_name>

From your repository root export your public and private GPG keys in the git_gpg_keys.asc (replace XXXXXXXXXXXXXXXX with your key ID):

$ gpg --export -a XXXXXXXXXXXXXXXX > git_gpg_keys.asc
$ gpg --export-secret-key -a XXXXXXXXXXXXXXXX >> git_gpg_keys.asc

Encrypt the git_gpg_keys.asc (public and private key) using a symmetric encryption (AES-256), and store the secret in a secure environment variable in the Travis environment:

$ travis encrypt-file git_gpg_keys.asc

The travis encrypt-file will encrypt the keys into the git_gpg_keys.asc.enc file and output in the console the command to add to your .travis.yml file. It should look like openssl aes-256-cbc -K $encrypted_AAAAAAAAAAAA_key -iv $encrypted_BBBBBBBBBBBB_iv -in git_gpg_keys.asc.enc -out git_gpg_keys.asc -d.

Copy this command to your .travis.yml file in the before_install step. Change the output path to write the unencrypted key in /tmp: -out git_gpg_keys.asc => /tmp/git_gpg_keys.asc. This will avoid to commit / modify / delete the unencrypted keys by mistake on the CI. Then add the commands to decrypt the GPG keys and make it available to git:

before_install:
  # Decrypt the git_gpg_keys.asc.enc key into /tmp/git_gpg_keys.asc
  - openssl aes-256-cbc -K $encrypted_AAAAAAAAAAAA_key -iv $encrypted_BBBBBBBBBBBB_iv -in git_gpg_keys.asc.enc -out /tmp/git_gpg_keys.asc -d
  # Make sure only the current user can read the keys
  - chmod 600 /tmp/git_gpg_keys.asc
  # Import the gpg key
  - gpg --batch --yes --import /tmp/git_gpg_keys.asc
  # Create a script to pass the passphrase to the gpg CLI called by git
  - echo '/usr/bin/gpg2 --passphrase ${GPG_PASSPHRASE} --batch --no-tty "$@"' > /tmp/gpg-with-passphrase && chmod +x /tmp/gpg-with-passphrase
  # Configure git to use the script that passes the passphrase
  - git config gpg.program "/tmp/gpg-with-passphrase"
  # Configure git to sign the commits and tags
  - git config commit.gpgsign true
  # Configure git to use your GPG key
  - git config --global user.signingkey ${GPG_KEY_ID}

See Encrypting Files for more details.

Delete the local keys as it won't be used anymore:

$ rm git_gpg_keys.asc

Commit the encrypted keys and the .travis.yml file to your repository:

$ git add git_gpg_keys.asc.enc .travis.yml
$ git commit -m "ci(travis): Add the encrypted GPG keys"
$ git push

git's People

Contributors

dependabot[bot] avatar ericcrosson avatar gadicc avatar gr2m avatar greenkeeper[bot] avatar iamchrismiller avatar jquense avatar oscard0m avatar pmarchini avatar pvdlg avatar renovate[bot] avatar smhxx avatar travi avatar uzitech avatar yaroslav-007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

git's Issues

`git ls-files -m -o` fails when upgrading from v5

After upgrading I get a error when listing modified files. I assume this might be something to do with the assets change but not sure the correct way to fix it. The build requires no extra assets other than the package.json and CHANGELOG.md. I cannot reproduce it locally, so not sure what is happening. My hunch is that CircleCI is somehow enabling the modules inside the node_modules was wondering if you peeps have a better idea. See the build failure and the project

[Semantic release]: An error occurred while running semantic-release: { Error: Command failed: git ls-files -m -o
fatal: Not a git repository: node_modules/art/lib/slick/../../.git/modules/lib/slick


    at makeError (/home/circleci/repo/node_modules/execa/index.js:172:9)
    at Promise.all.then.arr (/home/circleci/repo/node_modules/execa/index.js:277:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 128,
  stdout: '',
  stderr: 'fatal: Not a git repository: node_modules/art/lib/slick/../../.git/modules/lib/slick\n',
  failed: true,
  signal: null,
  cmd: 'git ls-files -m -o',
  timedOut: false,
  killed: false,
  pluginName: '@semantic-release/git' }

Have just stuck with v5 for now...

An in-range update of ava is breaking the build 🚨

The devDependency ava was updated from 1.2.1 to 1.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ava is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for 1.3.0

Bug fixes

  • We've fixed a rather embarrasing bug with t.throws() and t.throwsAsync(). If you'd set a code expectation to a number we never actually checked that the thrown error had such a code! Thanks to @qlonik for both spotting and fixing this. 82daa5e
  • 1.2.0 contained a regression which meant that if you faked clearTimeout(), you'd break AVA. That's now been fixed. 40f331c
  • Snapshot files are now recognized as source files, so if you're using watch mode and you delete one, AVA won't rerun all your test files. d066f6f

New features

You can now use require() in ava.config.js files to load non-ES modules. 334e15b

All changes

v1.2.1...v1.3.0

Thanks

Thank you @itaisteinherz, @jdalton, @kagawagao, @KompKK, @SleeplessByte, @Chrisyee22 and @qlonik for helping us with this release. We couldn't have done this without you!

Get involved

We welcome new contributors. AVA is a friendly place to get started in open source. We have a great article on getting started contributing and a comprehensive contributing guide.

Commits

The new version differs by 12 commits.

  • b0fadb4 1.3.0
  • 9600966 Bump dependencies
  • 82daa5e Assert on expected error code, even when a number
  • 1e3b072 Document timeout configuration
  • d97f11d Improve pronunciation examples
  • 40f331c Fix unbound reference to clearTimeout
  • 334e15b Support require() in config files
  • 5751226 Added few tests for lib/chalk.js
  • 7d10446 Fix link to Babel recipe
  • 565822e Update esm package detection
  • 2fce19f Remove the typings field in package.json
  • d066f6f Recognize snapshot files as source files

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An error occurred while running semantic-release: Error: You provided a local path

I get this error when I run: npx semantic-release

[12:02:07] [semantic-release] › ℹ Running semantic-release version 15.10.5
[12:02:07] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
[12:02:07] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[12:02:07] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[12:02:08] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/exec"
[12:02:08] [semantic-release] › ℹ This run was not triggered in a known CI environment, running in dry-run mode.
[12:02:08] [semantic-release] › ✔ Run automated release from branch master
[12:02:08] [semantic-release] › ✖ An error occurred while running semantic-release: Error: You provided a local path.
at parseUrl (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/node_modules/parse-url/lib/index.js:48:15)
at gitUp (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/node_modules/git-up/lib/index.js:29:18)
at gitUrlParse (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/node_modules/git-url-parse/lib/index.js:42:19)
at module.exports (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/lib/get-git-auth-url.js:49:36)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
Error: You provided a local path.
at parseUrl (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/node_modules/parse-url/lib/index.js:48:15)
at gitUp (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/node_modules/git-up/lib/index.js:29:18)
at gitUrlParse (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/node_modules/git-url-parse/lib/index.js:42:19)
at module.exports (/home/fernando/.nvm/versions/node/v8.12.0/lib/node_modules/semantic-release/lib/get-git-auth-url.js:49:36)
at
at process._tickCallback (internal/process/next_tick.js:189:7)%

release 5.0.0 has no defaults

on top of the breaking change this actually has no defaults (in contrary to the readme)
please return the defaults as they are extremely useful where system is running without default git configuration (ie semaphore CI), ie:

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'runner@semaphore-1802.(none)')

tagFormat is giving error

I have .releaserc file which have tagformat as "tagFormat":"v${version}-${branch}"
everytime I run semantic release I get branch is ReferenceError: branch is not defined

Branch is set as env variable
An error occurred while running semantic-release: ReferenceError: branch is not defined at eval (lodash.templateSources[0]:11:10) at module.exports (/Users/avinash/nukeland/alien-release/node_modules/semantic-release/lib/verify.js:16:48) at process._tickCallback (internal/process/next_tick.js:68:7) ReferenceError: branch is not defined at eval (lodash.templateSources[0]:11:10) at module.exports (/Users/avinash/nukeland/alien-release/node_modules/semantic-release/lib/verify.js:16:48)

➜ alien-release git:(master) ✗ printenv | grep branch branch=master

Fails to get last tag

For some reason semantic release is getting the last release tag incorrectly.

In my case it gets v27.5.0 when the last version is v27.5.1, which is correctly pushed in GitHub repository. Later the release fails because the packages tries to push v27.5.1 but it already exists.

We had to move to manual releases just because of this, and there's apparently no way to break this missed release cycle. I'm pretty sure this is a bug on this utility but couldn't figure out which one, and sadly I can't provide much more details since the repo and packages are private.

An in-range update of semantic-release is breaking the build 🚨

Version 15.9.15 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.9.14
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v15.9.15

15.9.15 (2018-09-11)

Bug Fixes

  • package: update debug to version 4.0.0 (7b8cd99)
Commits

The new version differs by 1 commits.

  • 7b8cd99 fix(package): update debug to version 4.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Cannot override assets

In short
Assets are always the same. I.e. [ 'CHANGELOG.md', 'package.json' ]

How to reproduce
semantic-release/git @ 7.0.5
semantic-release @ 15.12.4

"verifyConditions": [
      "@semantic-release/npm",
      "@semantic-release/git"
    ],
    "prepare": [
      "@semantic-release/changelog",
      "@semantic-release/npm",
      "@semantic-release/git"
    ],
    "success": [],
    "fail": [],
    "publish": [],
    "plugins": [
      "@semantic-release/changelog",
      "@semantic-release/npm",
      [
        "@semantic-release/git",
        {
          "assets": [
            "dist/**/*.{js,css}",
            "docs",
            "package.json"
          ],
          "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
        }
      ]
    ]

Running the semantic release in debug mode on MacOS High Sierra semantic-release --debug --no-ci I see

[21:23:24] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/npm"
[21:23:24] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
  semantic-release:git globed assets: [ 'CHANGELOG.md', 'package.json' ] +0ms
[21:23:24] [semantic-release] [@semantic-release/git] › ℹ  Found 1 file(s) to commit
  semantic-release:git add file to git index { stdout: '',
  stderr: '',
  code: 0,
  failed: false,
  killed: false,
  signal: null,
  cmd: 'git add --force --ignore-errors package.json',
  timedOut: false } +0ms
  semantic-release:git commited files: [ 'package.json' ] +36ms

Expected that git globed assets should reflect the settings.

Please let me know how it can be resolved!

An in-range update of fs-extra is breaking the build 🚨

The dependency fs-extra was updated from 7.0.0 to 7.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

fs-extra is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 7 commits.

  • a32c852 7.0.1
  • 6392917 Temporarily disable standard-markdown
  • ddc1a2f Fix removeSync() to eliminate spurious ENOTEMPTY errors on Windows (#646)
  • ab254b1 Added docs/ and CHANGELOG.md to .npmignore (#642) (#643)
  • 287f234 Fix typo in docs (#628)
  • 402c1d0 Show support for mode (#587)
  • 4da17fe Chore: github issue template (#617)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Request: Support Maven releases

maven logo

TL;DR

Maven's release cycle includes two commits, the first of which is tagged. I would like to expand the capabilities of @semantic-release/git to support the Maven release flow.

What is Maven?

Maven is the de-facto build and dependency management tool for Java. The configuration file for Maven is the pom.xml file, which typically can be found at the root of the project. Not too different from NPM's package.json file, the pom.xml file includes versioning, dependencies, build and test configurations, and distribution information.

How does Maven version?

Unlike NPM libraries, a Maven repository at rest represents itself with a "snapshot" version number like 1.0.0-SNAPSHOT. Building a maven project is almost always synonymous with installing a "snapshot" build into the local repository of dependencies. When versioned with "snapshot" numbering, a Maven repository is a dev and testing phase, which is almost always the case.

Released Maven artifacts are versioned how you would expect based on semantic versioning like 1.0.0. An artifact versioned like this represents one that is "released" or in "general availility" or any other way of saying that it's ready for widespread use.

Maven knows the difference between 1.0.0-SNAPSHOT and 1.0.0. Specifically, it knows that the former always precedes the latter.

What is a Maven release?

When an artifact is released using Maven, the versioning goes from "snapshot" to semver to the next "snapshot".

In practice you might expect an artifact's version to change like follows:

  1. pre-release: <version>1.0.0-SNAPSHOT</version>
  2. released: <version>1.0.0</version>
  3. post-release: <version>1.0.1-SNAPSHOT</version>

How does a Maven release affect SCM?

In SCM, it is standard for the tagged commit to reference to the point at which the version represented the release (1.0.0).

Therefore, minimally a repository has three commits for a single release:

  • one commit before the tag
    • This is the last commit before starting the release script.
    • current version: 1.0.0-SNAPSHOT
  • one commit which is tagged
    • This commit represents the state of the code during artifact deploy.
    • The release script creates this commit prior to tagging.
    • current version: 1.0.0
  • one commit after the tag
    • This commit prepares the repository for continued development.
    • The release script creates this commit after tagging.
    • current version: 1.0.1-SNAPSHOT

How does this relate to @semantic-release/git?

Dealing with Maven's release cycle means ideally, two commits need to be made during the overall release, and minimally, any git push execution occurs only after these commits exist.

More specifically:

  1. The 1.0.0 change and subsequent commit should be created during the prepare step, before the tag and before code is published.
  2. While in this 1.0.0 state, the created commit can be tagged.
  3. Still in the 1.0.0 state, the code should be built and published. This makes the most sense to occur during the publish step.
  4. To complete the release, the code must be prepared for future work by incrementing back to a "snapshot" number, a change which needs to be committed and pushed to SCM. IMO, this is fine to occur either during publish or success step, but I expect semantic-release to consider this relevant to the publish step.

What I would like to see from @semantic-release/git is flexibility to create a commit during prepare and during publish. This does not have to be the default functionality, but allowing for it makes it possible to release with Maven without resorting to @semantic-release/exec for SCM actions.

My proposal is available at #122.

Further Notes

  • It should be noted that the Maven "snapshot" versioning and release versioning is more than just practice. Maven has built-in rule-sets and assumptions about how to deal with artifacts versioned like 1.0.0-SNAPSHOT versus 1.0.0.
  • While I'm personally not against the arguments made by semantic-release for versioning at-rest artifacts like 0.0.0-development – it is exactly how I treat my NPM artifacts – it just doesn't fit with Maven.

package.json not being updated

Hello 🙂
I can't make my package.json get updated with CircleCI. Could you please push me in the right direction?

This is my .releaserc file:

{
  "plugins": [
    "@semantic-release/release-notes-generator",
    ["@semantic-release/git", {
      "assets": ["docs", "package.json"],
      "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
    }]
  ]
}

This is log from CircleCI:

#!/bin/bash -eo pipefail
npm run semantic-release || true

> @michal.jarnot/[email protected] semantic-release /home/circleci/project
> semantic-release

[5:33:08 AM] [semantic-release] › ℹ  Running semantic-release version 15.9.17
[5:33:08 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[5:33:09 AM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[5:33:09 AM] [semantic-release] › ✔  Run automated release from branch master
[5:33:09 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[5:33:09 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
[5:33:09 AM] [semantic-release] [@semantic-release/npm] › ℹ  Verify authentication for registry https://registry.npmjs.org/
[5:33:09 AM] [semantic-release] [@semantic-release/npm] › ℹ  Wrote NPM_TOKEN to /home/circleci/project/.npmrc
[5:33:09 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
[5:33:09 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[5:33:09 AM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication
[5:33:10 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/github"
[5:33:10 AM] [semantic-release] › ℹ  Found git tag v1.2.0 associated with version 1.2.0
[5:33:10 AM] [semantic-release] › ℹ  Found 1 commits since last release
[5:33:10 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[5:33:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(ci): change @semantic-release/git parameters
[5:33:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[5:33:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 1 commits complete: patch release
[5:33:10 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[5:33:10 AM] [semantic-release] › ℹ  The next release version is 1.2.1
[5:33:10 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[5:33:10 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[5:33:10 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/npm"
[5:33:10 AM] [semantic-release] [@semantic-release/npm] › ℹ  Wrote version 1.2.1 to /home/circleci/project/package.json
[5:33:10 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/npm"
[5:33:13 AM] [semantic-release] › ✔  Created tag v1.2.1
[5:33:13 AM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/npm"
[5:33:13 AM] [semantic-release] [@semantic-release/npm] › ℹ  Publishing version 1.2.1 to npm registry

> @michal.jarnot/[email protected] prepare /home/circleci/project
> npm run build


> @michal.jarnot/[email protected] build /home/circleci/project
> NODE_ENV=production webpack --config webpack/prod.js -p

clean-webpack-plugin: /home/circleci/project/webpack/lib has been removed.
Hash: 103e43a9c475755f92b9
Version: webpack 4.20.2
Time: 828ms
Built at: 10/09/2018 5:33:15 AM
                                       Asset      Size  Chunks             Chunk Names
 ./font/15232e9622759a8ad6dbfa3df03e5e18.ttf    87 KiB          [emitted]  
./font/f3370b1464b587a6cad5a85a4217763b.woff  45.7 KiB          [emitted]  
 ./font/d84cb7d7528d0549c8856bb78f879834.ttf   108 KiB          [emitted]  
./font/b4542fe544db7ccba5bac2f421edea8c.woff  41.4 KiB          [emitted]  
                                   bundle.js  87.5 KiB       0  [emitted]  app
Entrypoint app = bundle.js
 [9] (webpack)/buildin/global.js 509 bytes {0} [built]
[13] (webpack)/buildin/harmony-module.js 573 bytes {0} [built]
[23] ./src/fonts/DINPro-Medium.ttf 272 bytes {0} [built]
[25] ./src/fonts/DINPro-Regular.ttf 272 bytes {0} [built]
[59] ./src/index.js + 2 modules 3.23 KiB {0} [built]
     | ./src/index.js 64 bytes [built]
     | ./src/styles.js 1.52 KiB [built]
     |     + 1 hidden module
    + 55 hidden modules
npm notice 
npm notice 📦  @michal.jarnot/[email protected]
npm notice === Tarball Contents === 
npm notice 2.6kB   package.json                                  
npm notice 905B    README.md                                     
npm notice 89.6kB  lib/bundle.js                                 
npm notice 89.1kB  lib/font/15232e9622759a8ad6dbfa3df03e5e18.ttf 
npm notice 42.4kB  lib/font/b4542fe544db7ccba5bac2f421edea8c.woff
npm notice 110.6kB lib/font/d84cb7d7528d0549c8856bb78f879834.ttf 
npm notice 46.7kB  lib/font/f3370b1464b587a6cad5a85a4217763b.woff
npm notice === Tarball Details === 
npm notice name:          @michal.jarnot/components               
npm notice version:       1.2.1                                   
npm notice package size:  208.5 kB                                
npm notice unpacked size: 381.8 kB                                
npm notice shasum:        3ca1a2024b17f4ceaf8ccfa219c6893c6b393386
npm notice integrity:     sha512-7XRx8YPYktK0b[...]83MsbBYD9oxSA==
npm notice total files:   7                                       
npm notice 
+ @michal.jarnot/[email protected]
[5:33:19 AM] [semantic-release] [@semantic-release/npm] › ℹ  Published @michal.jarnot/[email protected] on https://registry.npmjs.org/
[5:33:19 AM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/npm"
[5:33:19 AM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/github"
[5:33:19 AM] [semantic-release] [@semantic-release/github] › ℹ  Published GitHub release: https://github.com/developer239/components/releases/tag/v1.2.1
[5:33:19 AM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/github"
[5:33:19 AM] [semantic-release] › ℹ  Start step "success" of plugin "@semantic-release/github"
[5:33:22 AM] [semantic-release] › ✔  Completed step "success" of plugin "@semantic-release/github"
[5:33:22 AM] [semantic-release] › ✔  Published release 1.2.1

These are my dependencies:

"@semantic-release/commit-analyzer": "^6.0.1",
"@semantic-release/git": "^7.0.4",
"semantic-release": "^15.9.17",

Not including assets in release commit

I'm playing around with semantic-release trying to learn it but don't understand how its release commits work at all.

Here's my config in package.json

 "release": {
  "npmPublish": false,
  "verifyConditions": [
   "@semantic-release/github"
  ],
  "prepare": [
   "@semantic-release/npm",
   {
    "path": "@semantic-release/git",
    "assets": [
     "package.json",
     "yarn.lock",
     "dist/**/*.{js|css}"
    ]
   }
  ],
  "publish": [
   "@semantic-release/github"
  ]
 }

I'm using circleci and have this as my build:

      - run: yarn test
      - run: yarn build # babel src/ -d dist/
      - run: yarn run semantic-release
      - run: git status
      - run: git log -1 --name-only

For my test, I'm editing the src/index.js, not touching dist/index.js file, and committing that so the build will happen on circle and a new version will be published with the updated dist.

I see this in circleci output for git status(which happens after semantic-release runs):

On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   dist/index.js

no changes added to commit (use "git add" and/or "git commit -a")

The git log -1 --name-only command shows this:

git log -1 --name-only
commit b8b72510cedec12443ab4b46e848b0198429ea6c
Author: semantic-release-bot <[email protected]>
Date:   Mon Jul 23 01:40:35 2018 +0000

    chore(release): 2.4.0 [skip ci]
    
    # [2.4.0](https://github.com/dadamssg/react-testing-library-bug/compare/v2.3.1...v2.4.0) (2018-07-23)
    
    ### Features
    
    * **code:** blah test ([06571d4](https://github.com/dadamssg/react-testing-library-bug/commit/06571d4))

package.json

Somehow though, this commit gets published to github even though it shows it's not been pushed after semantic-release has run.

So my questions are:

  • Why isn't my built dist output being included in the release commit?
  • How is this commit finding its way to github after semantic-release has run and git shows it's not been pushed???

Add getLastRelease plugin

We don't publish our package on NPM but use the semantic-release/git to perform tagging. Beign able to get the last release from our tags would be really useful. It seems it would make sense to contribute this functionality to this project.

There is an archived project semantic-release/last-release-git-tag that used to do this. What is the history there? Would it make sense to bring back that functionality to this project?

An in-range update of semantic-release is breaking the build 🚨

Version 15.9.5 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.9.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v15.9.5

15.9.5 (2018-08-05)

Bug Fixes

  • do not clone stdout/stderr passed to pugins (63d422e)
Commits

The new version differs by 1 commits.

  • 63d422e fix: do not clone stdout/stderr passed to pugins

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Command failed: git push --tags <repo_url> HEAD:undefined

Failed release: https://travis-ci.org/sweetalert2/sweetalert2/builds/481382150

Open this step to see details

image

I fixed this issue by simply adding

branch: 'master'

to release.config.js.

Expected behavior

branch should be 'master' by default as per docs, not undefined

Actual behavior

Command failed: git push --tags <repo_url> HEAD:undefined

Versions

- [email protected]
- @semantic-release/changelog@3 
- @semantic-release/exec@3 
- @semantic-release/git@7

Travis env variables

After upgrading to latest version environmental variables stopped working.

It was working fine on "semantic-release": "^15.7.1" and "@semantic-release/git": "^6.0.1" as shown in this commit (signed remotely via gpg): azdanov/azdanov.github.io@c1763ce

After updating to "@semantic-release/git": "^7.0.0" and "semantic-release": "^15.8.0" env variables are ignored. For example here (could not sign since submitted by a bot): azdanov/azdanov.github.io@2419e04.

Am I missing something with the new update?

Adding option to disable the push to the release branch. bug with the package.json having wrong version after tag

I am having troubles with semantic-release and GitLab.

We are doing stages in our GitLab-ci are:

  • build
  • test
  • release
  • deploy

Trouble is happening between release and deploy.

release is in charge with @semantic-release/npm and @semantic-release/gitlab to release to npm and GitLab.

deploy is in charge to build the documentation with it's own tool and to release the documentation with Gitlab page.

I have constraints:

  • deploy MUST have the release version from semantic-release (documentation use placeholder and will replace it)
  • @semantic-release/git can't be used to push the version as it will produce a failure on deploy job (reason: https://gitlab.com/gitlab-org/gitlab-ce/issues/34899 , short story: deploy job needs to be run from HEAD in order to be able to deploy it's artifact. So it will fail because @semantic-release/git try to also push to the release branch and there is no way to disable that.

This is how we build our documentation:

release:
  stage: release
  script:
    - npx semantic-release
  dependencies:
    - build
  only:
    - master
  tags:
    - docker

pages:
  stage: deploy
  script:
    - git fetch --tags && git reset HEAD --hard
    # This is how I retrieve the release version, I haven't found a better way, please let me know if you see one
    - PACKAGE_VERSION=$(git describe --tags | awk -F '-' '{print $1}')
    # we use the tags, as we cannot use @semantic-release/git cause it will break the artifact deployement
    - git checkout refs/tags/${PACKAGE_VERSION}
    # this version is outdated, because disabling the `@semantic-release/git` plugin will not only disable the version push on the release branch, but also produce a wrong version with a wrong version number in its tag
    - PACKAGE_VERSION=$(node -p "require('./package.json').version")
    - npm install
    # Replace variables
    - npx rollup-umd-scripts doc variable PACKAGE_NAME=${PACKAGE_NAME}
    - npx rollup-umd-scripts doc variable PACKAGE_PEERS="$(npx rollup-umd-scripts peer npm-install-cmd)"
    - npx rollup-umd-scripts doc variable PACKAGE_VERSION=${PACKAGE_VERSION}
    - npx rollup-umd-scripts doc variable NODE_VERSION=${NODE_VERSION}
    - npx rollup-umd-scripts doc variable NPM_VERSION=${NPM_VERSION}
    - npx rollup-umd-scripts doc variable CI_REPOSITORY_URL=${REPOSITORY_SSH_URL}
    - npx rollup-umd-scripts doc variable CI_PROJECT_URL=${CI_PROJECT_URL}
    - npx rollup-umd-scripts doc variable CI_PROJECT_NAMESPACE=${CI_PROJECT_NAMESPACE}
    - npx rollup-umd-scripts doc variable CI_PROJECT_NAME=${CI_PROJECT_NAME}
    - npx rollup-umd-scripts doc variable IMG_SHIELD_PUBLISHING=$(npx rollup-umd-scripts publish status --badge)
    - npm run styleguide:build
  artifacts:
    paths:
    - public
  only:
    - master
  tags:
    - docker

I got a refs/tags/v1.1.5 tagger by semantic release and the version in the package.json is 1.1.4, I think this is kind of a bug.

Can we consider adding an option to disable the push to the release branch?

Assets try to push on GitHub instead of GitLab

Expected

I expect to publish on gitlab

Result

I publish on GitHub

Reproduction

{
"devDependencies": {
    "@semantic-release/git": "^5.0.0",
    "@semantic-release/gitlab": "^2.1.4",
    "@semantic-release/npm": "^3.2.5"
},
"release": {
    "branch": "master",
    "npmPublish": false,
    "verifyConditions": [
      "@semantic-release/npm",
      "@semantic-release/git",
      {
        "path": "@semantic-release/gitlab",
        "gitlabUrl": "https://gitlab.example.com"
      }
    ],
    "prepare": [
      "@semantic-release/npm",
      {
        "path": "@semantic-release/git",
        "assets": [
          {
            "path": "package.json"
          },
          {
            "path": "dist/*.es.js",
            "label": "1 file ES6"
          },
          {
            "path": "dist/*.es.js.map",
            "label": "1 file ES6 sourcemap"
          },
          {
            "path": "dist/*.min.js",
            "label": "1 file UMD compressed"
          },
          {
            "path": "dist/*.min.js.map",
            "label": "1 file UMD compressed sourcemap"
          },
          {
            "path": "dist/*.js",
            "label": "1 file UMD uncompressed"
          },
          {
            "path": "dist/*.js.map",
            "label": "1 file UMD uncompressed sourcemap"
          },
          {
            "path": "lib/*.js",
            "label": "source files ES5"
          }
        ],
        "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
      }
    ],
    "publish": [
      "@semantic-release/npm",
      {
        "path": "@semantic-release/gitlab",
        "gitlabUrl": "https://gitlab.example.com"
      }
    ]
  }
}

Logs

$ npx semantic-release
npx: installed 377 in 11.097s
[Semantic release]: Running semantic-release version 15.4.1
[Semantic release]: Load plugin verifyConditions from @semantic-release/npm
[Semantic release]: Load plugin verifyConditions from @semantic-release/git
[Semantic release]: Load plugin verifyConditions from @semantic-release/gitlab
[Semantic release]: Load plugin analyzeCommits from @semantic-release/commit-analyzer
[Semantic release]: Load plugin generateNotes from @semantic-release/release-notes-generator
[Semantic release]: Load plugin prepare from @semantic-release/npm
[Semantic release]: Load plugin prepare from @semantic-release/git
[Semantic release]: Load plugin publish from @semantic-release/npm
[Semantic release]: Load plugin publish from @semantic-release/gitlab
[Semantic release]: Load plugin success from @semantic-release/github
[Semantic release]: Load plugin fail from @semantic-release/github
[Semantic release]: Run automated release from branch master
[Semantic release]: Call plugin verify-conditions
[Semantic release]: Verify GitLab authentication (https://git.example.com/api/v4)
[Semantic release]: Found git tag v0.3.4 associated with version 0.3.4
[Semantic release]: Found 4 commits since last release
[Semantic release]: Call plugin analyze-commits
[Semantic release]: Analyzing commit: Merge branch 'dev' into 'master'

fix(release): installing plugins

See merge request dev-tools/rollup-umd-scripts!75
[Semantic release]: The commit should not trigger a release
[Semantic release]: Analyzing commit: fix(release): installing plugins
[Semantic release]: The release type for the commit is patch
[Semantic release]: Analyzing commit: fix(release): installing plugins
[Semantic release]: The release type for the commit is patch
[Semantic release]: Analyzing commit: Merge branch 'dev' into 'master'

fix(release): installing plugins

See merge request dev-tools/rollup-umd-scripts!74
[Semantic release]: The commit should not trigger a release
[Semantic release]: Analysis of 4 commits complete: patch release
[Semantic release]: The next release version is 0.3.5
[Semantic release]: Call plugin verify-release
[Semantic release]: Call plugin generateNotes
[Semantic release]: Call plugin prepare
[Semantic release]: Wrote version 0.3.5 to package.json
[Semantic release]: Wrote version 0.3.5 to package-lock.json
[Semantic release]: Found 1 file(s) to commit
[Semantic release]: Creating tag v0.3.5
[Semantic release]: Prepared Git release: v0.3.5
[Semantic release]: Call plugin generateNotes
[Semantic release]: Create tag v0.3.5
[Semantic release]: Call plugin publish
[Semantic release]: Published GitLab release: v0.3.5
[Semantic release]: Verify GitHub authentication
[Semantic release]: Verify GitHub authentication
[Semantic release]: ENOGHTOKEN No GitHub token specified.
A GitHub personnal token (https://github.com/semantic-release/github/blob/master/README.md#github-authentication) must be created and set in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment.

Please make sure to create a GitHub personnal token (https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) and to set it in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment. The token must allow to push to the repository dev-tools/rollup-umd-scripts.


[Semantic release]: ENOGHTOKEN No GitHub token specified.
A GitHub personnal token (https://github.com/semantic-release/github/blob/master/README.md#github-authentication) must be created and set in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment.

Please make sure to create a GitHub personnal token (https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) and to set it in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment. The token must allow to push to the repository dev-tools/rollup-umd-scripts.


{ SemanticReleaseError: No GitHub token specified.
    at module.exports (/root/.npm/_npx/56/lib/node_modules/semantic-release/node_modules/@semantic-release/github/lib/get-error.js:6:10)
    at module.exports (/root/.npm/_npx/56/lib/node_modules/semantic-release/node_modules/@semantic-release/github/lib/verify.js:98:17)
    at success (/root/.npm/_npx/56/lib/node_modules/semantic-release/node_modules/@semantic-release/github/index.js:38:11)
    at validator (/root/.npm/_npx/56/lib/node_modules/semantic-release/lib/plugins/normalize.js:43:28)
    at pReduce (/root/.npm/_npx/56/lib/node_modules/semantic-release/lib/plugins/pipeline.js:36:40)
    at Promise.all.then.value (/root/.npm/_npx/56/lib/node_modules/semantic-release/node_modules/p-reduce/index.js:16:10)
    at process._tickCallback (internal/process/next_tick.js:178:7)
  name: 'SemanticReleaseError',
  code: 'ENOGHTOKEN',
  details: 'A [GitHub personnal token](https://github.com/semantic-release/github/blob/master/README.md#github-authentication) must be created and set in the `GH_TOKEN` or `GITHUB_TOKEN` environment variable on your CI environment.\n\nPlease make sure to create a [GitHub personnal token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) and to set it in the `GH_TOKEN` or `GITHUB_TOKEN` environment variable on your CI environment. The token must allow to push to the repository dev-tools/rollup-umd-scripts.',
  semanticRelease: true,
  pluginName: '@semantic-release/github' }
ERROR: Job failed: exit code 1

Incompatibility with 13.x, double creation of tag.

The 13.x series of semantic-release creates the git tag. This plugin also attempts to create the tag, which fails.

There is a regression in 13.x. The previous behaviour was:

  • fix(abc): this will trigger semantic-releasenpm publish
  • chore(release): v1.0.0 [skip ci]tag v1.0.0

If we fix up this plugin to not create the tag, the functionality will be:

  • fix(abc): this will trigger semantic-releasenpm publishtag v1.0.0
  • chore(release): v1.0.0 [skip ci]

Which is more correct, because the tag actually points to the location of the published package, but going to that tag in git won't have the updated changelog/package.json.

The ideal result would be:

  • fix(abc): this will trigger semantic-release
  • chore(release): v1.0.0 [skip ci]npm publishtag v1.0.0

git plugin not using configured message format

Current behavior

On the prepare step, the git plugin commits with the default message, even when configured to commit with a non-default message.

Expected behavior

The git plugin should commit with a custom message if configured.

Environment

  • semantic-release version: v15.10.3, @semantic-release/git v7.0.5
  • CI environment: GitLab, reproduced/discovered manually with --ci false (debug output doesn't output the commit message, which itself should probably be a feature request)
  • Plugins used:
    • "@semantic-release/commit-analyzer"
    • "@semantic-release/release-notes-generator"
    • "@semantic-release/changelog"
    • "@semantic-release/git"
    • "@semantic-release/gitlab"
  • semantic-release configuration:
{
    "plugins": [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
        "@semantic-release/changelog",
        ["@semantic-release/git", {"assets": ["CHANGELOG.md"], "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}\n\n[skip-ci]"}],
        "@semantic-release/gitlab"
    ],
    "verifyConditions": [
        "@semantic-release/gitlab",
        "@semantic-release/changelog",
        "@semantic-release/git"
    ],
    "analyzeCommits": [
        "@semantic-release/commit-analyzer"
    ],
    "generateNotes": [
        "@semantic-release/release-notes-generator"
    ],
    "prepare": [
        "@semantic-release/changelog",
        "@semantic-release/git"
    ],
    "publish": [
        "@semantic-release/gitlab"
    ]
}
  • CI logs:
    • from gitlab-ci:
      $ semantic-release
      [19:43:55] [semantic-release] › ℹ  Running semantic-release version 15.10.3
      [19:43:56] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
      [19:43:56] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
      [19:43:56] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
      [19:43:56] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
      [19:43:56] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
      [19:43:56] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
      [19:43:56] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
      [19:43:56] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
      [19:43:56] [semantic-release] › ✔  Run automated release from branch master
      [19:43:56] [semantic-release] › ✔  Allowed to push to the Git repository
      [19:43:56] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
      [19:43:56] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.com/api/v4)
      [19:43:56] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
      [19:43:56] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
      [19:43:56] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
      [19:43:56] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
      [19:43:56] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
      [19:43:57] [semantic-release] › ℹ  Found git tag v0.2.1 associated with version 0.2.1
      [19:43:57] [semantic-release] › ℹ  Found 10 commits since last release
      [19:43:57] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(git): semantic-release requires lowercase type
      
      As seen [here](https://gitlab.com/AgencyMania/ops/ci/-/jobs/111354571),
      the commit-analyzer is case sensitive for the type of commit logged to
      the changelog.
      
      Now regex in gitlab and these scripts verifies the logged commit type is
      lowercase.
      
      #7
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Fix(git): Honed regex further
      
      Was working in the scripts, but not on gitlab, so the scripts now
      reflect what I modified it to in gitlab.
      
      #7
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Revert(CI): Reverts part of 46bc4beaa2ca2e0f9fbc1032c5c74bdbf03c084b
      
      Not sure why I thought I could take out the AWS variables when terraform
      stores all its state there.
          
      #7
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(git): further refined pre-push and commit-msg
      
      Pre-push didn't work as constructed.
      
      #7
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(git): Incosistent Regex
      
      Didn't have consistent regex in the pre-push and commit-msg hooks.
      
      #7
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Feat(git): Added default hooks to repo
      
      BREAKING CHANGE: Will help devs self-enforce commit behavior so they don't run afoul of gitlab's push rules.
      
      #7
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is major
      [19:43:57] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 10 commits complete: major release
      [19:43:57] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
      [19:43:57] [semantic-release] › ℹ  The next release version is 1.0.0
      [19:43:57] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
      [19:43:57] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
      [19:43:57] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
      [19:43:57] [semantic-release] [@semantic-release/changelog] › ℹ  Create /builds/AgencyMania/ops/ci/CHANGELOG.md
      [19:43:57] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
      [19:43:57] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
      [19:43:57] [semantic-release] [@semantic-release/git] › ℹ  Found 1 file(s) to commit
      [19:43:57] [semantic-release] › ✖  Failed step "prepare" of plugin "@semantic-release/git"
      [19:43:57] [semantic-release] › ✖  An error occurred while running semantic-release: { Error: Command failed: git push --tags https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git HEAD:master
      remote: GitLab: Commit message does not follow the pattern '^\w+\([\w\s]+\):\s.*?\n\n((.*\n)*?([\w(]*#\d+|\[skip-ci\])|([\w(]*#\d+|\[skip-ci\]))'        
      To https://gitlab.com/AgencyMania/ops/ci.git
       ! [remote rejected] HEAD -> master (pre-receive hook declined)
      error: failed to push some refs to 'https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git'
      
      
          at makeError (/usr/local/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:174:9)
          at Promise.all.then.arr (/usr/local/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:278:16)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:189:7)
        code: 1,
        stdout: '',
        stderr: 'remote: GitLab: Commit message does not follow the pattern \'^\\w+\\([\\w\\s]+\\):\\s.*?\\n\\n((.*\\n)*?([\\w(]*#\\d+|\\[skip-ci\\])|([\\w(]*#\\d+|\\[skip-ci\\]))\'        \nTo https://gitlab.com/AgencyMania/ops/ci.git\n ! [remote rejected] HEAD -> master (pre-receive hook declined)\nerror: failed to push some refs to \'https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git\'\n',
        failed: true,
        signal: null,
        cmd: 'git push --tags https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git HEAD:master',
        timedOut: false,
        killed: false,
        pluginName: '@semantic-release/git' }
      { Error: Command failed: git push --tags https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git HEAD:master
      remote: GitLab: Commit message does not follow the pattern '^\w+\([\w\s]+\):\s.*?\n\n((.*\n)*?([\w(]*#\d+|\[skip-ci\])|([\w(]*#\d+|\[skip-ci\]))'        
      To https://gitlab.com/AgencyMania/ops/ci.git
       ! [remote rejected] HEAD -> master (pre-receive hook declined)
      error: failed to push some refs to 'https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git'
      
      
          at makeError (/usr/local/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:174:9)
          at Promise.all.then.arr (/usr/local/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:278:16)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:189:7)
        code: 1,
        stdout: '',
        stderr: 'remote: GitLab: Commit message does not follow the pattern \'^\\w+\\([\\w\\s]+\\):\\s.*?\\n\\n((.*\\n)*?([\\w(]*#\\d+|\\[skip-ci\\])|([\\w(]*#\\d+|\\[skip-ci\\]))\'        \nTo https://gitlab.com/AgencyMania/ops/ci.git\n ! [remote rejected] HEAD -> master (pre-receive hook declined)\nerror: failed to push some refs to \'https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git\'\n',
        failed: true,
        signal: null,
        cmd: 'git push --tags https://gitlab-ci-token:[secure]@gitlab.com/AgencyMania/ops/ci.git HEAD:master',
        timedOut: false,
        killed: false,
        pluginName: '@semantic-release/git' }ERROR: Job failed: exit code 1
      
    • commit message inspected on local run (note the default format):
      chore(release): 1.0.0 [skip ci]
      
      # [1.0.0](https://gitlab-work/agencymania/ops/ci/compare/v0.2.1...v1.0.0) (2018-10-23)
      
      ### Bug Fixes
      ...
      
    • local run debug output:
      $ semantic-release --debug --ci false
      [3:58:40 PM] [semantic-release] › ℹ  Running semantic-release version 15.10.3
        semantic-release:config options values: { branch: 'master',
        semantic-release:config   repositoryUrl: 'git@gitlab-work:agencymania/ops/ci.git',
        semantic-release:config   tagFormat: 'v${version}',
        semantic-release:config   plugins:
        semantic-release:config    [ '@semantic-release/commit-analyzer',
        semantic-release:config      '@semantic-release/release-notes-generator',
        semantic-release:config      '@semantic-release/changelog',
        semantic-release:config      [ '@semantic-release/git', [Object] ],
        semantic-release:config      '@semantic-release/gitlab' ],
        semantic-release:config   verifyConditions:
        semantic-release:config    [ '@semantic-release/gitlab',
        semantic-release:config      '@semantic-release/changelog',
        semantic-release:config      '@semantic-release/git' ],
        semantic-release:config   analyzeCommits: [ '@semantic-release/commit-analyzer' ],
        semantic-release:config   generateNotes: [ '@semantic-release/release-notes-generator' ],
        semantic-release:config   prepare: [ '@semantic-release/changelog', '@semantic-release/git' ],
        semantic-release:config   publish: [ '@semantic-release/gitlab' ],
        semantic-release:config   _: [],
        semantic-release:config   debug: true,
        semantic-release:config   ci: false,
        semantic-release:config   '$0': '/usr/bin/semantic-release',
        semantic-release:config   noCi: true } +0ms
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
      [3:58:41 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
      [3:58:41 PM] [semantic-release] › ✔  Run automated release from branch master
      [3:58:43 PM] [semantic-release] › ✔  Allowed to push to the Git repository
      [3:58:43 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
        semantic-release:gitlab repoId: 'agencymania/ops/ci' +0ms
        semantic-release:gitlab apiUrl: 'https://gitlab.com/api/v4' +3ms
      [3:58:43 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.com/api/v4)
      [3:58:44 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
      [3:58:44 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
      [3:58:44 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
      [3:58:44 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
      [3:58:44 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
        semantic-release:get-last-release found tags: [ { gitTag: 'v0.2.1', version: '0.2.1' }, { gitTag: 'v0.2.0', version: '0.2.0' }, { gitTag: 'v0.1.0', version: '0.1.0' } ] +0ms
      [3:58:45 PM] [semantic-release] › ℹ  Found git tag v0.2.1 associated with version 0.2.1
        semantic-release:get-commits Use gitHead: ee1cbbce51743043a18eeea3556c939f9c39336f +0ms
      [3:58:45 PM] [semantic-release] › ℹ  Found 10 commits since last release
        semantic-release:get-commits Parsed commits: [ { commit: { long: 'f0915918e05ff69bb69bd669ede2817beef2a4cb', short: 'f091591' }, tree: { long: 'cd2a533dd4df9fbf883f4ad5e9114be63c708197', short: 'cd2a533' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:35:53.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:35:53.000Z }, subject: 'fix(git): semantic-release requires lowercase type', body: 'As seen [here](https://gitlab.com/AgencyMania/ops/ci/-/jobs/111354571),\nthe commit-analyzer is case sensitive for the type of commit logged to\nthe changelog.\n\nNow regex in gitlab and these scripts verifies the logged commit type is\nlowercase.\n\n#7\n', hash: 'f0915918e05ff69bb69bd669ede2817beef2a4cb', message: 'fix(git): semantic-release requires lowercase type\n\nAs seen [here](https://gitlab.com/AgencyMania/ops/ci/-/jobs/111354571),\nthe commit-analyzer is case sensitive for the type of commit logged to\nthe changelog.\n\nNow regex in gitlab and these scripts verifies the logged commit type is\nlowercase.\n\n#7', gitTags: '(HEAD, origin/master, origin/7-add-semantic-release-jobs-on-all-repos-to-automatically-tag-merges-to-master, 7-add-semantic-release-jobs-on-all-repos-to-automatically-tag-merges-to-master)', committerDate: 2018-10-23T01:35:53.000Z }, { commit: { long: 'ba5513c8c768dd7d045b0a9768f45c273157d8b2', short: 'ba5513c' }, tree: { long: '7ebe5d458435bf00fe6356c224fc1bc2e77caa7e', short: '7ebe5d4' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:26:44.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:26:44.000Z }, subject: 'Fix(git): Honed regex further', body: 'Was working in the scripts, but not on gitlab, so the scripts now\nreflect what I modified it to in gitlab.\n\n#7\n', hash: 'ba5513c8c768dd7d045b0a9768f45c273157d8b2', message: 'Fix(git): Honed regex further\n\nWas working in the scripts, but not on gitlab, so the scripts now\nreflect what I modified it to in gitlab.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:26:44.000Z }, { commit: { long: '81c8043ee46ed56bebd95f1c26c932cce1c72717', short: '81c8043' }, tree: { long: 'd554010f7b47d06b9e8d6f63cb852164eb5bef53', short: 'd554010' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:15:35.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:15:35.000Z }, subject: 'Revert(CI): Reverts part of 46bc4beaa2ca2e0f9fbc1032c5c74bdbf03c084b', body: 'Not sure why I thought I could take out the AWS variables when terraform\nstores all its state there.\n\n#7\n', hash: '81c8043ee46ed56bebd95f1c26c932cce1c72717', message: 'Revert(CI): Reverts part of 46bc4beaa2ca2e0f9fbc1032c5c74bdbf03c084b\n\nNot sure why I thought I could take out the AWS variables when terraform\nstores all its state there.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:15:35.000Z }, { commit: { long: '0ede48c45401f087c82cd6feba66c416b3e624b2', short: '0ede48c' }, tree: { long: '83e659e3699e1b260e224bf71b3f9239c53fafc7', short: '83e659e' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T00:23:47.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:10:35.000Z }, subject: 'fix(git): further refined pre-push and commit-msg', body: 'Pre-push didn\'t work as constructed.\n\n#7\n', hash: '0ede48c45401f087c82cd6feba66c416b3e624b2', message: 'fix(git): further refined pre-push and commit-msg\n\nPre-push didn\'t work as constructed.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:10:35.000Z }, { commit: { long: 'b41b0e4ba46fb8d206b8ddf6dcaf68295e252b6e', short: 'b41b0e4' }, tree: { long: '31f474999d6620a1d3ab7598139fc148142e95d1', short: '31f4749' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-22T23:31:27.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:10:35.000Z }, subject: 'fix(git): Incosistent Regex', body: 'Didn\'t have consistent regex in the pre-push and commit-msg hooks.\n\n#7\n', hash: 'b41b0e4ba46fb8d206b8ddf6dcaf68295e252b6e', message: 'fix(git): Incosistent Regex\n\nDidn\'t have consistent regex in the pre-push and commit-msg hooks.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:10:35.000Z }, { commit: { long: '5339a65d30048052671b75ef2ec449960f950403', short: '5339a65' }, tree: { long: '0519cc0da0d2d4fb42dd27f230d4bb061ea2956a', short: '0519cc0' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-22T23:28:41.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:10:35.000Z }, subject: 'Feat(git): Added default hooks to repo', body: 'BREAKING CHANGE: Will help devs self-enforce commit behavior so they don\'t run afoul of gitlab\'s push rules.\n\n#7\n', hash: '5339a65d30048052671b75ef2ec449960f950403', message: 'Feat(git): Added default hooks to repo\n\nBREAKING CHANGE: Will help devs self-enforce commit behavior so they don\'t run afoul of gitlab\'s push rules.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:10:35.000Z }, { commit: { long: '836ad1716d2439e2ec025ecf98ce4dbe5e0768ef', short: '836ad17' }, tree: { long: '9fc0a05258532067782510ddcd0feb920252bf9e', short: '9fc0a05' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-22T20:54:51.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:10:35.000Z }, subject: 'Fix(ci): Fixed a typo in the refactor', body: 'Forgot to remove an underscore in a dependencies block.\n\n#7\n', hash: '836ad1716d2439e2ec025ecf98ce4dbe5e0768ef', message: 'Fix(ci): Fixed a typo in the refactor\n\nForgot to remove an underscore in a dependencies block.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:10:35.000Z }, { commit: { long: 'd302d72ad50b6027cb0886c65a66abf466d9ae02', short: 'd302d72' }, tree: { long: '8858540e3f15a6a47a0d0a35351be747e4291268', short: '8858540' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-19T18:48:39.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:10:35.000Z }, subject: 'feat(ci): Runs semantic-release as part of review', body: 'Follow-up needed to get it to comment on the MR.\n\n#7\n', hash: 'd302d72ad50b6027cb0886c65a66abf466d9ae02', message: 'feat(ci): Runs semantic-release as part of review\n\nFollow-up needed to get it to comment on the MR.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:10:35.000Z }, { commit: { long: 'a52c2cd975695f15e026b3818c8fb017db346083', short: 'a52c2cd' }, tree: { long: 'b47a686f5e5a6244497b0e0cc4f1ea367e0eb5f0', short: 'b47a686' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-19T16:39:42.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:10:35.000Z }, subject: 'Fix(CI): Terraform secret injection refactor', body: 'Also fixes a bug where terraform apply wasn\'t incorporating the\ngenerated in the plan step. This also will test the semantic-release\nmulti-commit stuff as well.\n\n#7\n', hash: 'a52c2cd975695f15e026b3818c8fb017db346083', message: 'Fix(CI): Terraform secret injection refactor\n\nAlso fixes a bug where terraform apply wasn\'t incorporating the\ngenerated in the plan step. This also will test the semantic-release\nmulti-commit stuff as well.\n\n#7', gitTags: '', committerDate: 2018-10-23T01:10:35.000Z }, { commit: { long: '46bc4beaa2ca2e0f9fbc1032c5c74bdbf03c084b', short: '46bc4be' }, tree: { long: '54c8f3ab7c3a0e342678e2e971efbe95910922ed', short: '54c8f3a' }, author: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-19T16:14:51.000Z }, committer: { name: 'Darwin Corn', email: '[email protected]', date: 2018-10-23T01:10:35.000Z }, subject: 'feat(CI): POC of semantic-release on this repo', body: 'Adds a .releaserc.yml using (mostly) defaults, and a semantic-release\njob to CI that will then trigger builds that trigger on tag.\n\nBREAKING CHANGE\nCloses #7\n', hash: '46bc4beaa2ca2e0f9fbc1032c5c74bdbf03c084b', message: 'feat(CI): POC of semantic-release on this repo\n\nAdds a .releaserc.yml using (mostly) defaults, and a semantic-release\njob to CI that will then trigger builds that trigger on tag.\n\nBREAKING CHANGE\nCloses #7', gitTags: '', committerDate: 2018-10-23T01:10:35.000Z } ] +23ms
      [3:58:45 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(git): semantic-release requires lowercase type
      
      As seen [here](https://gitlab.com/AgencyMania/ops/ci/-/jobs/111354571),
      the commit-analyzer is case sensitive for the type of commit logged to
      the changelog.
      
      Now regex in gitlab and these scripts verifies the logged commit type is
      lowercase.
      
      #7
        semantic-release:commit-analyzer Analyzing with default rules +0ms
        semantic-release:commit-analyzer The rule { type: 'fix', release: 'patch' } match commit with release type 'patch' +0ms
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Fix(git): Honed regex further
      
      Was working in the scripts, but not on gitlab, so the scripts now
      reflect what I modified it to in gitlab.
      
      #7
        semantic-release:commit-analyzer Analyzing with default rules +3ms
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Revert(CI): Reverts part of 46bc4beaa2ca2e0f9fbc1032c5c74bdbf03c084b
      
      Not sure why I thought I could take out the AWS variables when terraform
      stores all its state there.
      
      #7
        semantic-release:commit-analyzer Analyzing with default rules +1ms
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(git): further refined pre-push and commit-msg
      
      Pre-push didn't work as constructed.
      
      #7
        semantic-release:commit-analyzer Analyzing with default rules +0ms
        semantic-release:commit-analyzer The rule { type: 'fix', release: 'patch' } match commit with release type 'patch' +2ms
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(git): Incosistent Regex
      
      Didn't have consistent regex in the pre-push and commit-msg hooks.
      
      #7
        semantic-release:commit-analyzer Analyzing with default rules +1ms
        semantic-release:commit-analyzer The rule { type: 'fix', release: 'patch' } match commit with release type 'patch' +1ms
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Feat(git): Added default hooks to repo
      
      BREAKING CHANGE: Will help devs self-enforce commit behavior so they don't run afoul of gitlab's push rules.
      
      #7
        semantic-release:commit-analyzer Analyzing with default rules +0ms
        semantic-release:commit-analyzer The rule { breaking: true, release: 'major' } match commit with release type 'major' +0ms
        semantic-release:commit-analyzer Release type 'major' is the highest possible. Stop analysis. +0ms
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is major
      [3:58:45 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 10 commits complete: major release
      [3:58:45 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
      [3:58:45 PM] [semantic-release] › ℹ  The next release version is 1.0.0
      [3:58:45 PM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
        semantic-release:release-notes-generator version: '1.0.0' +0ms
        semantic-release:release-notes-generator host: 'gitlab-work' +0ms
        semantic-release:release-notes-generator owner: 'agencymania/ops' +0ms
        semantic-release:release-notes-generator repository: 'ci' +0ms
        semantic-release:release-notes-generator previousTag: 'v0.2.1' +0ms
        semantic-release:release-notes-generator currentTag: 'v1.0.0' +0ms
      [3:58:46 PM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
      [3:58:46 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
      [3:58:46 PM] [semantic-release] [@semantic-release/changelog] › ℹ  Create /home/darwin/go/src/gitlab.com/AgencyMania/ops/ci/CHANGELOG.md
      [3:58:46 PM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
      [3:58:46 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
        semantic-release:git globed assets: [ 'CHANGELOG.md' ] +0ms
      [3:58:46 PM] [semantic-release] [@semantic-release/git] › ℹ  Found 1 file(s) to commit
        semantic-release:git add file to git index { stdout: '',
        stderr: '',
        code: 0,
        failed: false,
        killed: false,
        signal: null,
        cmd: 'git add --force --ignore-errors CHANGELOG.md',
        timedOut: false } +0ms
        semantic-release:git commited files: [ 'CHANGELOG.md' ] +20ms
      [3:58:47 PM] [semantic-release] › ✖  Failed step "prepare" of plugin "@semantic-release/git"
      [3:58:47 PM] [semantic-release] › ✖  An error occurred while running semantic-release: { Error: Command failed: git push --tags git@gitlab-work:agencymania/ops/ci.git HEAD:master
      Failed GitLab regex, not pushing
      remote: GitLab: You are not allowed to push code to protected branches on this project.        
      To gitlab-work:agencymania/ops/ci.git
       ! [remote rejected] HEAD -> master (pre-receive hook declined)
      error: failed to push some refs to 'git@gitlab-work:agencymania/ops/ci.git'
      
      
          at makeError (/usr/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:174:9)
          at Promise.all.then.arr (/usr/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:278:16)
          at process._tickCallback (internal/process/next_tick.js:68:7)
        code: 1,
        stdout: '',
        stderr:
         'Failed GitLab regex, not pushing\nremote: GitLab: You are not allowed to push code to protected branches on this project.        \nTo gitlab-work:agencymania/ops/ci.git\n ! [remote rejected] HEAD -> master (pre-receive hook declined)\nerror: failed to push some refs to \'git@gitlab-work:agencymania/ops/ci.git\'\n',
        failed: true,
        signal: null,
        cmd:
         'git push --tags git@gitlab-work:agencymania/ops/ci.git HEAD:master',
        timedOut: false,
        killed: false,
        pluginName: '@semantic-release/git' }
      { Error: Command failed: git push --tags git@gitlab-work:agencymania/ops/ci.git HEAD:master
      Failed GitLab regex, not pushing
      remote: GitLab: You are not allowed to push code to protected branches on this project.        
      To gitlab-work:agencymania/ops/ci.git
       ! [remote rejected] HEAD -> master (pre-receive hook declined)
      error: failed to push some refs to 'git@gitlab-work:agencymania/ops/ci.git'
      
      
          at makeError (/usr/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:174:9)
          at Promise.all.then.arr (/usr/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:278:16)
          at process._tickCallback (internal/process/next_tick.js:68:7)
        code: 1,
        stdout: '',
        stderr:
         'Failed GitLab regex, not pushing\nremote: GitLab: You are not allowed to push code to protected branches on this project.        \nTo gitlab-work:agencymania/ops/ci.git\n ! [remote rejected] HEAD -> master (pre-receive hook declined)\nerror: failed to push some refs to \'git@gitlab-work:agencymania/ops/ci.git\'\n',
        failed: true,
        signal: null,
        cmd:
         'git push --tags git@gitlab-work:agencymania/ops/ci.git HEAD:master',
        timedOut: false,
        killed: false,
        pluginName: '@semantic-release/git' }
      

Workaround

Adjust GitLab's Push Rule regex to handle the changelog commits. I'd prefer not to do this but it seems like the only way forward unless I'm missing something in the configuration above.

Add a option to include files when tag

Some times I have files that only want keep in Tag.

Like dist folder, I don't want track in any branch, so I add /dist to .gitignore

But I want dist keep in Tags to release.

By assets document described, add dist to assets is no help.

If a file has a match in .gitignore it will always be excluded.

So, can add a option to include files only when doing tag?

Or have some way to achieve?

Thank you!

How to exclude node_modules directory from commit?

Hello,

Great project. I'm very impressed with how well it works for me.

I am trying to ignore the "node_submodules" directory when committing to git, but I cannot figure out how to do it. Is this even a good practice? I feel like I shouldn't be committing 50mb of files to source control - but this appears to be the default behavior.

I tried to ignore this directory in my "assets" setting, as well as my .gitignore file. Unfortunately, that doesn't seem to work. Can somebody point me in the right direction?

Here is my package.json config: https://pastebin.com/7hzjZD8y

And here is a snip of my debug output:

[06:14:35] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[06:14:35] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[06:14:35] [semantic-release] [@semantic-release/changelog] › ℹ  Update /builds/cyberdefenses/build/CHANGELOG.md
[06:14:35] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[06:14:35] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
2018-12-19T06:14:35.655Z semantic-release:git globed assets: []
[06:14:35] [semantic-release] [@semantic-release/git] › ℹ  Found 7846 file(s) to commit
2018-12-19T06:14:36.680Z semantic-release:git add file to git index { stdout: '',
  stderr: '',
  code: 0,
  failed: false,
  killed: false,
  signal: null,
  cmd: 'git add --force --ignore-errors node_modules/.bin/JSONStream node_modules/.bin/atob node_modules/.bin/cdl node_modules/.bin/conventional-changelog-writer node_modules/.bin/conventional-commits-parser node_modules/.bin/esparse node_modules/.bin/esvalidate node_modules/.bin/handlebars node_modules/.bin/js-yaml node_modules/.bin/marked node_modules/.bin/mime node_modules/.bin/npm node_modules/.bin/npx node_modules/.bin/parse-github-url node_modules/.bin/rc node_modules/.bin/semantic-release node_modules/

Any help would be greatly appreciated.

Ryan

Doesn't work with semantic-release@next?

I installed @semantic-release/git@next and semantic-release@next but I get:

[Semantic release]: EPLUGIN A plugin configured in the step publish is not a valid semantic-release plugin.
A valid publish semantic-release plugin must be a function or an object with a function in the property publish.

The plugin @semantic-release/git doesn't have the property publish and cannot be used for the publish step.

Please refer to the @semantic-release/git and semantic-release plugins configuration (https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/plugins.md) documentation for more details.

I'm also using semantic-release-monorepo (related issue pmowrer/semantic-release-monorepo#32)

What's wrong?

Include changelog in published tarball to npm

I haven't tested, but from what I can understand from the README the npm plugin has to be run before this plugin.

How can I then write a changelog to disk which is included in that published tarball?

Should the writing of a changelog part be its own plugin?

I don't really want the commit, but I understand that the plugin can't really create a full changelog for all previous releases from all time, so I don't mind the commit either 🙂

(opening issue here as I was directed from semantic-release/semantic-release#543)

Error: Command failed: git fetch --tags

The issue happens with tags that change their pointer.

❯ git fetch --tags
From gitlab.com:foo/repo
 ! [rejected]        flux-sync  -> flux-sync  (would clobber existing tag)

❯ git fetch --tags -f
From gitlab.com:foo/repo
 t [tag update]      flux-sync  -> flux-sync

Basically need to add -f, if it's safe globally, or maybe a config option.

Thanks!

semantic-release v15.8.0 + @semantic-release/git v7.0.0 does not work

for me it still does not work as cwd is undefined and it causes following error:

[Semantic release]: An error occurred while running semantic-release: { TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1090:7)
    at module.exports (/Users/joe/code/test/node_modules/@semantic-release/git/lib/prepare.js:42:30)
    at process._tickCallback (internal/process/next_tick.js:68:7) pluginName: '@semantic-release/git' }

An in-range update of ava is breaking the build 🚨

The devDependency ava was updated from 1.0.1 to 1.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ava is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for 1.1.0

1.1.0

New features

AVA now exports a meta object. Currently, you can retrieve the path of the test file being run:

import test from 'ava';

console.log('Test currently being run: ', test.meta.file);

import {meta} from 'ava';

console.log('Test currently being run: ', meta.file);

This is useful in helpers that need to know the test file. bccd297

Bug fixes and other improvements

  • t.log() now works in hooks d187712

  • Error output for improper usage of t.throws() once again links to the correct documentation dc552bc

  • We've added a section on webpack aliases to the Babel recipe c3bcbf2

  • We've updated the Vue recipe for Babel 7, and added a section on webpack aliases c3bcbf2

All changes 📚

v1.0.1...v1.1.0

Thanks 💌

💖 Huge thanks to @fitztrev, @forresst, @astrob0t, @pearofducks, @coreyfarrell and @dflupu for helping us with this release. We couldn’t have done it without you!

Get involved ✌️

We welcome new contributors. AVA is a friendly place to get started in open source. We have a great article on getting started contributing and a comprehensive contributing guide.

Commits

The new version differs by 9 commits.

  • a28094a 1.1.0
  • 7262a78 Bump dependencies
  • d187712 Fix t.log() in hooks
  • bccd297 Expose test file path within worker process
  • c3bcbf2 Improve Babel and Vue recipes
  • dc552bc Update link to t.throws() assertion in AVA output
  • f4b2d19 Fix links to French translation of docs (#2005)
  • 2e72fe7 Fix npm install command in readme (#2001)
  • 7b6e578 Use newer ES syntax where possible

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

any particular reason for not having `publish` plugin?

please correct me if i am mistaken - i assume that @semantic-release/github is for public github (github.com), while @semantic-release/git for private github instances (non github.com)

while publishing to a private git server works, there are some errors:

...
[Semantic release]: Call plugin generateNotes
  semantic-release:release-notes-generator version: '1.3.3' +4s
  semantic-release:release-notes-generator host: 'git.myserver.com' +0ms
  semantic-release:release-notes-generator owner: 'joe' +0ms
  semantic-release:release-notes-generator repository: 'repo' +0ms
  semantic-release:release-notes-generator previousTag: 'v1.3.2' +0ms
  semantic-release:release-notes-generator currentTag: 'v1.3.3' +0ms
Semantic release]: Create tag v1.3.3
[Semantic release]: Call plugin publish
[Semantic release]: Verify GitHub authentication (https://git.myserver.com/joe/repo)
[Semantic release]: An error occurred while running semantic-release: { HttpError:
    at response.text.then.message (/Users/joe/.nvm/versions/node/v10.1.0/lib/node_modules/semantic-release/node_modules/@octokit/rest/lib/request/request.js:78:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  name: 'HttpError',
  code: 406,
  status: undefined,
  headers:
   { 'cache-control': 'no-cache, no-store',
     connection: 'close',
     'content-security-policy': 'default-src \'none\'; base-uri \'self\'; block-all-mixed-content; child-src \'self\'; connect-src \'self\' git.myserver.com status.github.com wss://git.myserver.com; font-src \'self\'; form-action \'self\' git.myserver.com; frame-ancestors \'none\'; img-src * data:; manifest-src \'self\'; media-src \'none\'; script-src \'self\'; style-src \'unsafe-inline\' \'self\'; worker-src \'self\'',
     'content-type': 'text/html; charset=utf-8',
     date: 'Tue, 17 Jul 2018 09:05:57 GMT',
     server: 'GitHub.com',
     'set-cookie': '...; path=/; secure; HttpOnly',
     status: '406 Not Acceptable',
     'strict-transport-security': 'max-age=31536000; includeSubdomains',
     'transfer-encoding': 'chunked',
     vary: 'X-PJAX',
     'x-content-type-options': 'nosniff',
     'x-frame-options': 'deny',
     'x-github-request-id': '380ec586-1234-1234-1234-5a544de60b9c',
     'x-request-id': '...',
     'x-runtime': '0.005339',
     'x-runtime-rack': '0.009056',
     'x-ua-compatible': 'IE=Edge,chrome=1',
     'x-xss-protection': '1; mode=block' },
  pluginName: '@semantic-release/github' }
...

looks like githubUrl is not respected as in attached error i can see server: 'GitHub.com', - after that a new release is present in the repo, but still i want to get rid off that error message, any hints?

v16.0.0-beta.18 & Git Plugin - Edge Case

I'm setting up a workflow as described here: https://github.com/semantic-release/semantic-release/blob/beta/docs/usage/workflow-configuration.md

I have two pre-release branches:

  • dev
  • test

test was ahead of dev with a few fix commits. In addition to those manual commits, as a result of using semantic-release/git plugin, the latest commit in the test branch was done by semantic-release-bot and contained [skip ci] text in commit message.

After merging test to dev the release process in dev branch has failed. This happened because the tip of the dev was ahead of the commit that Travis checked out. It was the git plugin that failed. It failed because of the classic "you should pull first" git error. Travis ignored the latest commit done by semantic-release/git plugin in test branch. I presume it ignored it because of the [skip ci] message.

This probably can be easily fixed by removing [skip ci] from the commit message template in the semantic-release/git plugin, and then using if condition somewhere inside .travis.yml.

I believe that the documentation of the git plugin should mention that edge case somewhere. Or maybe even stop suggesting usage of [skip ci]. Otherwise the plugin should pull ... which I think might lead to other kind of problems.

Config

module.exports = {
  branches: [
    //
    '+([1-9])?(.{+([1-9]),x}).x',
    { name: 'release' },
    { name: 'master', channel: 'dev', prerelease: true },
    { name: 'test', prerelease: true },
  ],
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    [
      '@semantic-release/npm',
      {
        npmPublish: false,
        tarballDir: './',
      },
    ],
    [
      '@semantic-release/git',
      {
        assets: ['package.json'],
        message:
          'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
      },
    ],
    [
      '@semantic-release/github',
      {
        assets: [
          {
            path: ['package-*.tgz'],
            label: 'Build',
          },
        ],
      },
    ],
  ],
};

Travis

language: node_js
cache:
  yarn: true
  directories:
    - node_modules
node_js:
  - '10'
branches:
  except:
    - /^v\d+\.\d+\.\d+$/
before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH="$HOME/.yarn/bin:$PATH"
jobs:
  include:
    - stage: test, build and deploy
      script:
        - yarn build
      deploy:
        - provider: script
          script:
            - yarn semantic-release
          skip_cleanup: true
          on:
            branch:
              - master
              - dev
              - test

Versions in package.json:

...
  "@semantic-release/git": "7.1.0-beta.3",
  "semantic-release": "16.0.0-beta.18"
...

Steps

  1. git checkout -b dev
  2. git push origin
  3. git checkout -b test
  4. git commit -m 'fix: fixes this or that'
  5. git push origin
  6. ⏲ wait for release from test branch
  7. git checkout dev
  8. git merge origin/test
  9. git push origin
  10. ❗ Latest push to test would fail to produce new release with error similar to:
error: failed to push some refs to XXX
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.

Invalid git authentication does not fail build

The verifyConditions check in my build seems to fail correctly (because I have the wrong authentication configured), but it doesn't cause the overall build to fail.

screen shot 2019-01-23 at 10 26 25 am

This build proceeded on where I would expect this message to have put a halt on the whole process.

My build did end up failing down the line where a commit needed to be pushed, but at that point, I was left with a franken-release, with artifacts and release notes (via @semantic-release/github) successfully pushed...

Add documentation regarding Git host push permission configuration

Hello,

I've read through all the docs on setting this up, and have done it on multiple repos. This issue persists on a repo we have that has the same keys as another repo, but consistently fails to deploy.

  1. Both have the following in package.json
  "release": {
    "prepare": [
      "@semantic-release/npm",
      "@semantic-release/git"
    ]
  }
  1. Both have the same GITHUB_TOKEN and GITHUB_URL, and run release via GITHUB_URL=$GITHUB_URL GITHUB_TOKEN=$SERVICE_GITHUB_TOKEN yarn release where yarn release is just semantic-release. They run on CircleCI in the same org context.
  2. Both have branch protection enabled for status checks etc on master

screen shot 2018-08-05 at 11 49 39 am

4. Both have a repository field in package.json with structure:
  "repository": {
    "url": "[email protected]:Org/Repo.git",
    "type": "git"
  },

However, even with all of this, I still see on the failing repo when it tries to deploy.

[18:27:36] [semantic-release] › ✖  Failed step "prepare" of plugin "@semantic-release/git"
[18:27:36] [semantic-release] › ✖  An error occurred while running semantic-release: { Error: Command failed: git push --tags https://[secure]@github.enterprise.com/Org/Repo.git HEAD:master
remote: error: GH006: Protected branch update failed for refs/heads/master.        
remote: error: 2 of 2 required status checks are expected.        
To https://[secure]@github.enterprise.com/Org/Repo.git
 ! [remote rejected] HEAD -> master (protected branch hook declined)
error: failed to push some refs to 'https://[secure]@github.enterprise.com/Org/Repo.git'


    at makeError (/home/circleci/project/node_modules/execa/index.js:172:9)
    at Promise.all.then.arr (/home/circleci/project/node_modules/execa/index.js:277:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)
  code: 1,
  stdout: '',
  stderr: 'remote: error: GH006: Protected branch update failed for refs/heads/master.        \nremote: error: 2 of 2 required status checks are expected.        \nTo https://[secure]@github.enterprise.com/Org/Repo.git\n ! [remote rejected] HEAD -> master (protected branch hook declined)\nerror: failed to push some refs to \'https://[secure]@github.enterprise.com/Org/Repo.git\'\n',
  failed: true,
  signal: null,
  cmd: 'git push --tags https://[secure]@github.enterprise.com/Org/Repo.git HEAD:master',
  timedOut: false,
  killed: false,
  pluginName: '@semantic-release/git' }
{ Error: Command failed: git push --tags https://[secure]@github.enterprise.com/Org/Repo.git HEAD:master
remote: error: GH006: Protected branch update failed for refs/heads/master.        
remote: error: 2 of 2 required status checks are expected.        
To https://[secure]@github.enterprise.com/Org/Repo.git
 ! [remote rejected] HEAD -> master (protected branch hook declined)
error: failed to push some refs to 'https://[secure]@github.enterprise.com/Org/Repo.git'


    at makeError (/home/circleci/project/node_modules/execa/index.js:172:9)
    at Promise.all.then.arr (/home/circleci/project/node_modules/execa/index.js:277:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)
  code: 1,
  stdout: '',
  stderr: 'remote: error: GH006: Protected branch update failed for refs/heads/master.        \nremote: error: 2 of 2 required status checks are expected.        \nTo https://[secure]@github.enterprise.com/Org/Repo.git\n ! [remote rejected] HEAD -> master (protected branch hook declined)\nerror: failed to push some refs to \'https://[secure]@github.enterprise.com/Org/Repo.git\'\n',
  failed: true,
  signal: null,
  cmd: 'git push --tags https://[secure]@github.enterprise.com/Org/Repo.git HEAD:master',
  timedOut: false,
  killed: false,
  pluginName: '@semantic-release/git' }error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c semantic-release
Directory: /home/circleci/project
Output:

At this point, I'm all out of ideas as to where this problem is stemming from. Would love some guidance as to why one repo would experience this issue, but the other is completely fine. I have at least a dozen repos working with similar setups with the same token and don't have this issue.

Question: how to work with husky precommit

I'm having a problem running, it was working well until I added a pre-commit task to run some linter validations and flow typechecker. I have this configuration in my package.json

"husky": {
    "hooks": {
      "pre-commit": "lint-staged && yarn flow"
    }
  },

running yarn semantic-release it start running well until it try to commit and push the package.json with the new generated version. at that moment I can see how the pre-commit task start but when it finishes without errors, the semantic-releases never resume.

I tried changing this: await execa('git', ['commit', '-m', message], execaOpts); to this: await execa('git', ['commit', '-m', message, '--no-verify'], execaOpts); and it worked well because I'm preventing to run husky.

So, my questions is, how can I send the --no-verify flag when I run semantic-release? or how can I tell semantic-release to resume when the linters and flow finished without error?

GitLab Tokens not used.

Looking through the documentation it looks like this plugin will use the GITHUB_TOKEN or GH_TOKEN variables if present, but not the GITLAB_TOKEN or GL_TOKEN variables. Can this functionality be added?

Tag not on commit?

In my previous projects

"@semantic-release/git": "^2.0.1",
"semantic-release": "^11.0.2"

now:
"@semantic-release/git": "^3.0.0",
"semantic-release": "^12.4.1"

changelog.md and updated package(-lock).json is commited
but the tag not

Assets includes dist and docs independent of the assets configuration

We have several projects which share a common semantic-release configuration. These projects generate on the CI server artifacts in the /dist and /docs dirs. As soon as the semantic-release process finishes and creates a release commit, these dirs are added back to the repo.

The shared configuration is:
"release": { "prepare": [ "@semantic-release/changelog", { "path": "@semantic-release/git", "assets": [ "!dist/**/*.*", "!dist/**/*", "!docs/**/*.*", "!docs/**/*", "CHANGELOG.md" ], "message": "chore(release): v${nextRelease.version} \n\n${nextRelease.notes}\n\n[***NO_CI***]" } ], "verifyConditions": [ "@semantic-release/changelog", "@semantic-release/npm", "@semantic-release/git" ], "publish": [ "@semantic-release/npm" ], "success": [], "fail": [] }

In the projects using the shared configuration, we have an entry like:
"release": { "extends": "@company-repo/semantic-release-config" }

I've tried using negative globs for the two directories, removing them completely from the assets (they are anyway in the .gitignore file). All these seem to have no effect, the end result is that the files get added back always.

Here is the semantic release log:

`2018-11-07T17:06:16.3831769Z ##[section]Starting: Yarn semantic-release
2018-11-07T17:06:16.3831769Z ==============================================================================
2018-11-07T17:06:16.3831769Z Task : Yarn task
2018-11-07T17:06:16.3831769Z Description : Executes Yarn
2018-11-07T17:06:16.3831769Z Version : 2.6.999
2018-11-07T17:06:16.3831769Z Author : Geek Learning
2018-11-07T17:06:16.3831769Z Help : More Information (Version 2.6.999).

Dear Angular and Ember CLI users, please check our known issues
2018-11-07T17:06:16.3988548Z ==============================================================================
2018-11-07T17:06:17.9456790Z [command]C:\Windows\system32\cmd.exe /D /S /C "C:\Agents\TFS2013-1_work_tool\yarn\1.12.3\x64\yarn-v1.12.3\bin\yarn.cmd semantic-release"
2018-11-07T17:06:18.7894429Z yarn run v1.12.3
2018-11-07T17:06:18.9144270Z warning package.json: No license field
2018-11-07T17:06:18.9925571Z $ semantic-release
2018-11-07T17:06:21.2581792Z [18:06:21] [semantic-release] » i Running semantic-release version 15.10.8
2018-11-07T17:06:24.1488036Z [18:06:24] [semantic-release] » √ Loaded plugin "verifyConditions" from "@semantic-release/changelog" in shareable config "@company-repo/semantic-release-config"
2018-11-07T17:06:24.1488036Z [18:06:24] [semantic-release] » √ Loaded plugin "verifyConditions" from "@semantic-release/npm" in shareable config "@company-repo/semantic-release-config"
2018-11-07T17:06:24.1645071Z [18:06:24] [semantic-release] » √ Loaded plugin "verifyConditions" from "@semantic-release/git" in shareable config "@company-repo/semantic-release-config"
2018-11-07T17:06:24.1645071Z [18:06:24] [semantic-release] » √ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
2018-11-07T17:06:24.1645071Z [18:06:24] [semantic-release] » √ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
2018-11-07T17:06:24.1801537Z [18:06:24] [semantic-release] » √ Loaded plugin "prepare" from "@semantic-release/changelog" in shareable config "@company-repo/semantic-release-config"
2018-11-07T17:06:24.1957639Z [18:06:24] [semantic-release] » √ Loaded plugin "prepare" from "@semantic-release/exec" in shareable config "@company-repo/semantic-release-config"
2018-11-07T17:06:24.2113991Z [18:06:24] [semantic-release] » √ Loaded plugin "prepare" from "@semantic-release/git" in shareable config "@company-repo/semantic-release-config"
2018-11-07T17:06:24.2113991Z [18:06:24] [semantic-release] » √ Loaded plugin "publish" from "@semantic-release/npm" in shareable config "@company-repo/semantic-release-config"
2018-11-07T17:06:24.2426499Z [18:06:24] [semantic-release] » √ Run automated release from branch master
2018-11-07T17:06:24.8207254Z [18:06:24] [semantic-release] » √ Allowed to push to the Git repository
2018-11-07T17:06:24.8207254Z [18:06:24] [semantic-release] » i Start step "verifyConditions" of plugin "@semantic-release/changelog"
2018-11-07T17:06:24.8363362Z [18:06:24] [semantic-release] » √ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
2018-11-07T17:06:24.8363362Z [18:06:24] [semantic-release] » i Start step "verifyConditions" of plugin "@semantic-release/npm"
2018-11-07T17:06:24.9144906Z [18:06:24] [semantic-release] [@semantic-release/npm] » i Verify authentication for registry https://company-npm-repo/npm/
2018-11-07T17:06:24.9457474Z [18:06:24] [semantic-release] [@semantic-release/npm] » i Wrote NPM_TOKEN to C:\Agents\TFS2013-1_work\64\s.npmrc
2018-11-07T17:06:24.9457474Z [18:06:24] [semantic-release] » √ Completed step "verifyConditions" of plugin "@semantic-release/npm"
2018-11-07T17:06:24.9457474Z [18:06:24] [semantic-release] » i Start step "verifyConditions" of plugin "@semantic-release/git"
2018-11-07T17:06:24.9613723Z [18:06:24] [semantic-release] » √ Completed step "verifyConditions" of plugin "@semantic-release/git"
2018-11-07T17:06:26.3363022Z [18:06:26] [semantic-release] » i Found git tag v2.3.0 associated with version 2.3.0
2018-11-07T17:06:26.4613628Z [18:06:26] [semantic-release] » i Found 1 commits since last release
2018-11-07T17:06:26.4613628Z [18:06:26] [semantic-release] » i Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
2018-11-07T17:06:26.4770171Z [18:06:26] [semantic-release] [@semantic-release/commit-analyzer] » i Analyzing commit: fix(package.json): Update semantic config to exclude build artifacts from git
2018-11-07T17:06:26.4770171Z [18:06:26] [semantic-release] [@semantic-release/commit-analyzer] » i The release type for the commit is patch
2018-11-07T17:06:26.4925522Z [18:06:26] [semantic-release] [@semantic-release/commit-analyzer] » i Analysis of 1 commits complete: patch release
2018-11-07T17:06:26.4925522Z [18:06:26] [semantic-release] » √ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
2018-11-07T17:06:26.5707128Z [18:06:26] [semantic-release] » i The next release version is 2.3.1
2018-11-07T17:06:26.5707128Z [18:06:26] [semantic-release] » i Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
2018-11-07T17:06:26.7894274Z [18:06:26] [semantic-release] » √ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
2018-11-07T17:06:26.7894274Z [18:06:26] [semantic-release] » i Start step "prepare" of plugin "@semantic-release/changelog"
2018-11-07T17:06:26.8050523Z [18:06:26] [semantic-release] [@semantic-release/changelog] » i Update C:\Agents\TFS2013-1_work\64\s\CHANGELOG.md
2018-11-07T17:06:26.8050523Z [18:06:26] [semantic-release] » √ Completed step "prepare" of plugin "@semantic-release/changelog"
2018-11-07T17:06:26.8831770Z [18:06:26] [semantic-release] » i Start step "prepare" of plugin "@semantic-release/exec"
2018-11-07T17:06:26.8988693Z [18:06:26] [semantic-release] [@semantic-release/exec] » i Call script echo ## 2.3.1 (2018-11-07)
2018-11-07T17:06:26.8988693Z
2018-11-07T17:06:26.8988693Z
2018-11-07T17:06:26.8988693Z ### Bug Fixes
2018-11-07T17:06:26.8988693Z
2018-11-07T17:06:26.8988693Z * package.json: Update semantic config to exclude build artifacts from git (3e7d281)
2018-11-07T17:06:26.8988693Z
2018-11-07T17:06:26.8988693Z
2018-11-07T17:06:26.8988693Z
2018-11-07T17:06:26.8988693Z > CHANGELOG.md
2018-11-07T17:06:26.9301039Z ## 2.3.1 (2018-11-07)
2018-11-07T17:06:26.9301039Z [18:06:26] [semantic-release] » √ Completed step "prepare" of plugin "@semantic-release/exec"
2018-11-07T17:06:27.0081765Z [18:06:27] [semantic-release] » i Start step "prepare" of plugin "@semantic-release/git"
2018-11-07T17:06:27.3051390Z [18:06:27] [semantic-release] [@semantic-release/git] » i Found 230 file(s) to commit
2018-11-07T17:06:28.4769263Z [18:06:28] [semantic-release] [@semantic-release/git] » i Prepared Git release: v2.3.1
2018-11-07T17:06:28.4769263Z [18:06:28] [semantic-release] » √ Completed step "prepare" of plugin "@semantic-release/git"
2018-11-07T17:06:28.5550546Z [18:06:28] [semantic-release] » i Call plugin generateNotes
2018-11-07T17:06:28.5550546Z [18:06:28] [semantic-release] » i Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
2018-11-07T17:06:28.6488044Z [18:06:28] [semantic-release] » √ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
2018-11-07T17:06:29.1492554Z [18:06:29] [semantic-release] » √ Created tag v2.3.1
2018-11-07T17:06:29.1492554Z [18:06:29] [semantic-release] » i Start step "publish" of plugin "@semantic-release/npm"
2018-11-07T17:06:29.1644275Z [18:06:29] [semantic-release] [@semantic-release/npm] » i Wrote version 2.3.1 to C:\Agents\TFS2013-1_work\64\s\package.json
2018-11-07T17:06:29.1644275Z [18:06:29] [semantic-release] [@semantic-release/npm] » i Publishing version 2.3.1 to npm registry
2018-11-07T17:06:32.6331781Z npm notice
2018-11-07T17:06:32.6331781Z npm notice package: @company-repo/[email protected]
2018-11-07T17:06:32.6331781Z npm notice === Tarball Contents ===
2018-11-07T17:06:32.6801414Z npm notice 4.1kB package.json
2018-11-07T17:06:32.6801414Z npm notice 3.8kB CHANGELOG.md
2018-11-07T17:06:32.6801414Z npm notice 3.4kB README.md
2018-11-07T17:06:32.6801414Z npm notice 354B dist/common-web-infrastructure.module.js
2018-11-07T17:06:32.6801414Z npm notice 384B dist/common-web-infrastructure.module.js.map
2018-11-07T17:06:32.6801414Z npm notice 527B dist/index.js
2018-11-07T17:06:32.6801414Z npm notice 430B dist/index.js.map
2018-11-07T17:06:32.6957404Z npm notice 1.2kB dist/modularity/binding-to-syntax.js
2018-11-07T17:06:32.6957404Z npm notice 1.2kB dist/modularity/binding-to-syntax.js.map
2018-11-07T17:06:32.6957404Z npm notice 1.4kB dist/modularity/wf-container.js
2018-11-07T17:06:32.6957404Z npm notice 1.3kB dist/modularity/wf-container.js.map
2018-11-07T17:06:32.6957404Z npm notice 2.1kB dist/services/http/ajax-download.service.js
2018-11-07T17:06:32.6957404Z npm notice 810B dist/services/http/ajax-download.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 267B dist/services/http/error-code.js
2018-11-07T17:06:32.6957404Z npm notice 392B dist/services/http/error-code.js.map
2018-11-07T17:06:32.6957404Z npm notice 2.4kB dist/services/http/error-code.spec.js
2018-11-07T17:06:32.6957404Z npm notice 1.2kB dist/services/http/error-code.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 345B dist/services/http/file-blob.js
2018-11-07T17:06:32.6957404Z npm notice 456B dist/services/http/file-blob.js.map
2018-11-07T17:06:32.6957404Z npm notice 2.4kB dist/services/http/file-blob.spec.js
2018-11-07T17:06:32.6957404Z npm notice 1.3kB dist/services/http/file-blob.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 13.2kB dist/services/http/http.service.js
2018-11-07T17:06:32.6957404Z npm notice 6.8kB dist/services/http/http.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 16.7kB dist/services/http/http.service.spec.js
2018-11-07T17:06:32.6957404Z npm notice 12.7kB dist/services/http/http.service.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 2.0kB dist/services/http/secure-http.service.js
2018-11-07T17:06:32.6957404Z npm notice 883B dist/services/http/secure-http.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 4.0kB dist/services/http/secure-http.service.spec.js
2018-11-07T17:06:32.6957404Z npm notice 2.4kB dist/services/http/secure-http.service.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 48B dist/services/localization/contracts/language-api.service.js
2018-11-07T17:06:32.6957404Z npm notice 173B dist/services/localization/contracts/language-api.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 5.8kB dist/services/localization/language.service.js
2018-11-07T17:06:32.6957404Z npm notice 2.2kB dist/services/localization/language.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 6.2kB dist/services/localization/language.service.spec.js
2018-11-07T17:06:32.6957404Z npm notice 4.3kB dist/services/localization/language.service.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 36B dist/services/localization/models/language.js
2018-11-07T17:06:32.6957404Z npm notice 146B dist/services/localization/models/language.js.map
2018-11-07T17:06:32.6957404Z npm notice 4.2kB dist/services/location.service.js
2018-11-07T17:06:32.6957404Z npm notice 2.1kB dist/services/location.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 319B dist/services/logging/log-level.js
2018-11-07T17:06:32.6957404Z npm notice 307B dist/services/logging/log-level.js.map
2018-11-07T17:06:32.6957404Z npm notice 38B dist/services/logging/log-target.js
2018-11-07T17:06:32.6957404Z npm notice 135B dist/services/logging/log-target.js.map
2018-11-07T17:06:32.6957404Z npm notice 2.5kB dist/services/logging/logging-initializer.service.js
2018-11-07T17:06:32.6957404Z npm notice 1.7kB dist/services/logging/logging-initializer.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 4.7kB dist/services/logging/logging-initializer.service.spec.js
2018-11-07T17:06:32.6957404Z npm notice 3.1kB dist/services/logging/logging-initializer.service.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 8.0kB dist/services/logging/logging.service.js
2018-11-07T17:06:32.6957404Z npm notice 6.2kB dist/services/logging/logging.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 1.3kB dist/services/pattern-search.service.js
2018-11-07T17:06:32.6957404Z npm notice 745B dist/services/pattern-search.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 3.1kB dist/services/pattern-search.service.spec.js
2018-11-07T17:06:32.6957404Z npm notice 1.4kB dist/services/pattern-search.service.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 3.9kB dist/services/security/security.service.js
2018-11-07T17:06:32.6957404Z npm notice 1.5kB dist/services/security/security.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 11.9kB dist/services/security/security.service.spec.js
2018-11-07T17:06:32.6957404Z npm notice 8.3kB dist/services/security/security.service.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 2.9kB dist/services/serialization.service.js
2018-11-07T17:06:32.6957404Z npm notice 955B dist/services/serialization.service.js.map
2018-11-07T17:06:32.6957404Z npm notice 3.9kB dist/services/serialization.service.spec.js
2018-11-07T17:06:32.6957404Z npm notice 2.1kB dist/services/serialization.service.spec.js.map
2018-11-07T17:06:32.6957404Z npm notice 2.7kB dist/services/services.module.js
2018-11-07T17:06:32.6957404Z npm notice 2.3kB dist/services/services.module.js.map
2018-11-07T17:06:32.6957404Z npm notice 40B dist/services/signalr/interfaces/proxy-client.js
2018-11-07T17:06:32.6957404Z npm notice 153B dist/services/signalr/interfaces/proxy-client.js.map
2018-11-07T17:06:32.6957404Z npm notice 6.3kB dist/services/signalr/signalr-connection.service.js
2018-11-07T17:06:32.7113029Z npm notice 3.8kB dist/services/signalr/signalr-connection.service.js.map
2018-11-07T17:06:32.7113029Z npm notice 19.5kB dist/services/signalr/signalr-connection.service.spec.js
2018-11-07T17:06:32.7113029Z npm notice 14.7kB dist/services/signalr/signalr-connection.service.spec.js.map
2018-11-07T17:06:32.7113029Z npm notice 396B dist/services/signalr/subscription.js
2018-11-07T17:06:32.7113029Z npm notice 468B dist/services/signalr/subscription.js.map
2018-11-07T17:06:32.7113029Z npm notice 3.3kB dist/services/signalr/subscription.spec.js
2018-11-07T17:06:32.7113029Z npm notice 2.0kB dist/services/signalr/subscription.spec.js.map
2018-11-07T17:06:32.7113029Z npm notice 1.5kB dist/services/source-name-resolution.service.js
2018-11-07T17:06:32.7113029Z npm notice 1.0kB dist/services/source-name-resolution.service.js.map
2018-11-07T17:06:32.7113029Z npm notice 6.1kB dist/services/source-name-resolution.service.spec.js
2018-11-07T17:06:32.7269289Z npm notice 4.4kB dist/services/source-name-resolution.service.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 3.8kB dist/services/time.service.js
2018-11-07T17:06:32.7269289Z npm notice 3.7kB dist/services/time.service.js.map
2018-11-07T17:06:32.7269289Z npm notice 11.9kB dist/services/time.service.spec.js
2018-11-07T17:06:32.7269289Z npm notice 9.3kB dist/services/time.service.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 1.8kB dist/services/unique-id.service.js
2018-11-07T17:06:32.7269289Z npm notice 750B dist/services/unique-id.service.js.map
2018-11-07T17:06:32.7269289Z npm notice 3.3kB dist/services/unique-id.service.spec.js
2018-11-07T17:06:32.7269289Z npm notice 1.7kB dist/services/unique-id.service.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 202B dist/types/common-web-infrastructure.module.d.ts
2018-11-07T17:06:32.7269289Z npm notice 626B dist/types/index.d.ts
2018-11-07T17:06:32.7269289Z npm notice 1.1kB dist/types/modularity/binding-to-syntax.d.ts
2018-11-07T17:06:32.7269289Z npm notice 2.0kB dist/types/modularity/wf-container.d.ts
2018-11-07T17:06:32.7269289Z npm notice 194B dist/types/services/http/ajax-download.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 183B dist/types/services/http/error-code.d.ts
2018-11-07T17:06:32.7269289Z npm notice 304B dist/types/services/http/error-code.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 187B dist/types/services/http/file-blob.d.ts
2018-11-07T17:06:32.7269289Z npm notice 253B dist/types/services/http/file-blob.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 6.4kB dist/types/services/http/http.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/http/http.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 547B dist/types/services/http/secure-http.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/http/secure-http.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 279B dist/types/services/localization/contracts/language-api.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 2.5kB dist/types/services/localization/language.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/localization/language.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 172B dist/types/services/localization/models/language.d.ts
2018-11-07T17:06:32.7269289Z npm notice 2.4kB dist/types/services/location.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 164B dist/types/services/logging/log-level.d.ts
2018-11-07T17:06:32.7269289Z npm notice 90B dist/types/services/logging/log-target.d.ts
2018-11-07T17:06:32.7269289Z npm notice 357B dist/types/services/logging/logging-initializer.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/logging/logging-initializer.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 1.3kB dist/types/services/logging/logging.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 129B dist/types/services/pattern-search.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/pattern-search.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 2.2kB dist/types/services/security/security.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/security/security.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 1.7kB dist/types/services/serialization.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 399B dist/types/services/serialization.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 1.3kB dist/types/services/services.module.d.ts
2018-11-07T17:06:32.7269289Z npm notice 91B dist/types/services/signalr/interfaces/proxy-client.d.ts
2018-11-07T17:06:32.7269289Z npm notice 960B dist/types/services/signalr/signalr-connection.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 19B dist/types/services/signalr/signalr-connection.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 276B dist/types/services/signalr/subscription.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/signalr/subscription.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 176B dist/types/services/source-name-resolution.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 440B dist/types/services/source-name-resolution.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 1.2kB dist/types/services/time.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 1.1kB dist/types/services/time.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 301B dist/types/services/unique-id.service.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/services/unique-id.service.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 445B dist/types/utils/deferred.d.ts
2018-11-07T17:06:32.7269289Z npm notice 273B dist/types/utils/deferred.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 454B dist/types/utils/dictionary.d.ts
2018-11-07T17:06:32.7269289Z npm notice 323B dist/types/utils/generics.d.ts
2018-11-07T17:06:32.7269289Z npm notice 170B dist/types/utils/math.extension.d.ts
2018-11-07T17:06:32.7269289Z npm notice 228B dist/types/utils/math.extension.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 64B dist/types/utils/mix.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/utils/mix.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 12B dist/types/utils/moment.extension.d.ts
2018-11-07T17:06:32.7269289Z npm notice 83B dist/types/utils/promise.extension.d.ts
2018-11-07T17:06:32.7269289Z npm notice 31B dist/types/utils/promise.extension.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 112B dist/types/utils/string.extension.d.ts
2018-11-07T17:06:32.7269289Z npm notice 225B dist/types/utils/string.extension.spec.d.ts
2018-11-07T17:06:32.7269289Z npm notice 1.1kB dist/utils/deferred.js
2018-11-07T17:06:32.7269289Z npm notice 1.1kB dist/utils/deferred.js.map
2018-11-07T17:06:32.7269289Z npm notice 4.9kB dist/utils/deferred.spec.js
2018-11-07T17:06:32.7269289Z npm notice 3.1kB dist/utils/deferred.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 38B dist/utils/dictionary.js
2018-11-07T17:06:32.7269289Z npm notice 121B dist/utils/dictionary.js.map
2018-11-07T17:06:32.7269289Z npm notice 36B dist/utils/generics.js
2018-11-07T17:06:32.7269289Z npm notice 117B dist/utils/generics.js.map
2018-11-07T17:06:32.7269289Z npm notice 1.6kB dist/utils/math.extension.js
2018-11-07T17:06:32.7269289Z npm notice 1.6kB dist/utils/math.extension.js.map
2018-11-07T17:06:32.7269289Z npm notice 8.0kB dist/utils/math.extension.spec.js
2018-11-07T17:06:32.7269289Z npm notice 5.7kB dist/utils/math.extension.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 413B dist/utils/mix.js
2018-11-07T17:06:32.7269289Z npm notice 483B dist/utils/mix.js.map
2018-11-07T17:06:32.7269289Z npm notice 2.7kB dist/utils/mix.spec.js
2018-11-07T17:06:32.7269289Z npm notice 1.4kB dist/utils/mix.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 226B dist/utils/moment.extension.js
2018-11-07T17:06:32.7269289Z npm notice 314B dist/utils/moment.extension.js.map
2018-11-07T17:06:32.7269289Z npm notice 171B dist/utils/promise.extension.js
2018-11-07T17:06:32.7269289Z npm notice 283B dist/utils/promise.extension.js.map
2018-11-07T17:06:32.7269289Z npm notice 2.4kB dist/utils/promise.extension.spec.js
2018-11-07T17:06:32.7269289Z npm notice 1.1kB dist/utils/promise.extension.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 1.0kB dist/utils/string.extension.js
2018-11-07T17:06:32.7269289Z npm notice 1.3kB dist/utils/string.extension.js.map
2018-11-07T17:06:32.7269289Z npm notice 4.1kB dist/utils/string.extension.spec.js
2018-11-07T17:06:32.7269289Z npm notice 2.5kB dist/utils/string.extension.spec.js.map
2018-11-07T17:06:32.7269289Z npm notice 70.7kB docs/assets/css/main.css
2018-11-07T17:06:32.7269289Z npm notice 30.8kB docs/assets/css/main.css.map
2018-11-07T17:06:32.7269289Z npm notice 9.5kB docs/assets/images/icons.png
2018-11-07T17:06:32.7269289Z npm notice 27.7kB docs/assets/images/[email protected]
2018-11-07T17:06:32.7269289Z npm notice 480B docs/assets/images/widgets.png
2018-11-07T17:06:32.7269289Z npm notice 855B docs/assets/images/[email protected]
2018-11-07T17:06:32.7425521Z npm notice 152.1kB docs/assets/js/main.js
2018-11-07T17:06:32.7425521Z npm notice 88.9kB docs/assets/js/search.js
2018-11-07T17:06:32.7425521Z npm notice 9.9kB docs/classes/a.html
2018-11-07T17:06:32.7425521Z npm notice 12.0kB docs/classes/ajaxdownloadservice.html
2018-11-07T17:06:32.7425521Z npm notice 9.9kB docs/classes/b.html
2018-11-07T17:06:32.7425521Z npm notice 33.6kB docs/classes/bindingtosyntax.html
2018-11-07T17:06:32.7425521Z npm notice 10.1kB docs/classes/commonwebinfrastructuremodule.html
2018-11-07T17:06:32.7425521Z npm notice 20.5kB docs/classes/deferred.html
2018-11-07T17:06:32.7425521Z npm notice 22.1kB docs/classes/deferredspec.html
2018-11-07T17:06:32.7425521Z npm notice 13.5kB docs/classes/errorcode.html
2018-11-07T17:06:32.7425521Z npm notice 21.1kB docs/classes/errorcodespec.html
2018-11-07T17:06:32.7425521Z npm notice 12.8kB docs/classes/fileblob.html
2018-11-07T17:06:32.7425521Z npm notice 21.6kB docs/classes/fileblobspec.html
2018-11-07T17:06:32.7425521Z npm notice 57.0kB docs/classes/httpservice.html
2018-11-07T17:06:32.7425521Z npm notice 31.9kB docs/classes/httpservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 10.8kB docs/classes/item.html
2018-11-07T17:06:32.7425521Z npm notice 13.3kB docs/classes/languageapiservicestub.html
2018-11-07T17:06:32.7425521Z npm notice 24.3kB docs/classes/languageservice.html
2018-11-07T17:06:32.7425521Z npm notice 22.0kB docs/classes/languageservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 36.0kB docs/classes/locationservice.html
2018-11-07T17:06:32.7425521Z npm notice 11.1kB docs/classes/logginginitializerservice.html
2018-11-07T17:06:32.7425521Z npm notice 21.8kB docs/classes/logginginitializerservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 28.4kB docs/classes/loggingservice.html
2018-11-07T17:06:32.7425521Z npm notice 22.0kB docs/classes/mathextensionspec.html
2018-11-07T17:06:32.7425521Z npm notice 22.0kB docs/classes/mixspec.html
2018-11-07T17:06:32.7425521Z npm notice 11.2kB docs/classes/patternsearchservice.html
2018-11-07T17:06:32.7425521Z npm notice 22.6kB docs/classes/patternsearchservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 22.3kB docs/classes/promiseextensionspec.html
2018-11-07T17:06:32.7425521Z npm notice 60.1kB docs/classes/securehttpservice.html
2018-11-07T17:06:32.7425521Z npm notice 28.1kB docs/classes/securehttpservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 22.4kB docs/classes/securityservice.html
2018-11-07T17:06:32.7425521Z npm notice 22.5kB docs/classes/securityservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 15.6kB docs/classes/serializationservice.html
2018-11-07T17:06:32.7425521Z npm notice 22.0kB docs/classes/serializationservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 17.9kB docs/classes/signalrconnectionservice.html
2018-11-07T17:06:32.7425521Z npm notice 21.7kB docs/classes/signalrconnectionservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 12.2kB docs/classes/signalrconnectionstate.html
2018-11-07T17:06:32.7425521Z npm notice 12.9kB docs/classes/sourcenameresolutionservice.html
2018-11-07T17:06:32.7425521Z npm notice 22.2kB docs/classes/sourcenameresolutionservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 7.9kB docs/classes/sourcetestclass.html
2018-11-07T17:06:32.7425521Z npm notice 21.7kB docs/classes/stringextensionsspec.html
2018-11-07T17:06:32.7425521Z npm notice 13.5kB docs/classes/subscription.html
2018-11-07T17:06:32.7425521Z npm notice 22.4kB docs/classes/subscriptionspec.html
2018-11-07T17:06:32.7425521Z npm notice 14.3kB docs/classes/subscriptionstub.html
2018-11-07T17:06:32.7425521Z npm notice 37.3kB docs/classes/timeservice.html
2018-11-07T17:06:32.7425521Z npm notice 21.8kB docs/classes/timeservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 11.7kB docs/classes/uniqueidservice.html
2018-11-07T17:06:32.7425521Z npm notice 22.0kB docs/classes/uniqueidservicespec.html
2018-11-07T17:06:32.7425521Z npm notice 63.7kB docs/classes/wfcontainer.html
2018-11-07T17:06:32.7425521Z npm notice 12.6kB docs/enums/loglevel.html
2018-11-07T17:06:32.7425521Z npm notice 10.2kB docs/enums/logtarget.html
2018-11-07T17:06:32.7425521Z npm notice 101.6kB docs/globals.html
2018-11-07T17:06:32.7425521Z npm notice 24.5kB docs/index.html
2018-11-07T17:06:32.7425521Z npm notice 12.7kB docs/interfaces/ilanguageapiservice.html
2018-11-07T17:06:32.7425521Z npm notice 10.7kB docs/interfaces/iproxyclient.html
2018-11-07T17:06:32.7425521Z npm notice 52.6kB docs/interfaces/iwfcontainer.html
2018-11-07T17:06:32.7425521Z npm notice 11.7kB docs/interfaces/json.html
2018-11-07T17:06:32.7425521Z npm notice 12.9kB docs/interfaces/language.html
2018-11-07T17:06:32.7425521Z npm notice 13.3kB docs/interfaces/math.html
2018-11-07T17:06:32.7425521Z npm notice 10.2kB docs/interfaces/promiseconstructor.html
2018-11-07T17:06:32.7425521Z npm notice 12.5kB docs/interfaces/string.html
2018-11-07T17:06:32.7425521Z npm notice === Tarball Details ===
2018-11-07T17:06:32.7425521Z npm notice name: @company-repo/common-web-infrastructure
2018-11-07T17:06:32.7425521Z npm notice version: 2.3.1
2018-11-07T17:06:32.7425521Z npm notice package size: 248.9 kB
2018-11-07T17:06:32.7425521Z npm notice unpacked size: 2.1 MB
2018-11-07T17:06:32.7425521Z npm notice shasum: ac56585f044904f68c00b1bea809eff14d4ecba7
2018-11-07T17:06:32.7425521Z npm notice integrity: sha512-jvMbNbpqOBAhP[...]nccD0eAwoCyYA==
2018-11-07T17:06:32.7425521Z npm notice total files: 232
2018-11-07T17:06:32.7425521Z npm notice
2018-11-07T17:06:36.2425558Z + @company-repo/[email protected]
2018-11-07T17:06:36.2581789Z [18:06:36] [semantic-release] [@semantic-release/npm] » i Published @company-repo/[email protected] on https://company-npm-repo/npm/
2018-11-07T17:06:37.1956762Z [18:06:37] [semantic-release] » √ Completed step "publish" of plugin "@semantic-release/npm"
2018-11-07T17:06:37.1956762Z [18:06:37] [semantic-release] » √ Published release 2.3.1
2018-11-07T17:06:37.2113016Z Done in 18.44s.
2018-11-07T17:06:37.2738014Z ##[section]Finishing: Yarn semantic-release
`

Can @semantic-release/git be used and not push the `package.json`

However, the @semantic-release/git plugin can be used to push the updated package.json as well as other files to the Git repository.

We need that feature for the file, but we want to disable the push on release branch due to a conflicting issue on GitLab not allowing us to deploy page after the semantic-release.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/39141

After readiing this documentation, I assume it is not possible to disable the commit message. Am I correct?

An in-range update of sinon is breaking the build 🚨

Version 4.1.6 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 4.1.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 10 commits.

  • 68c37ed Update docs/changelog.md and set new release id in docs/_config.yml
  • cd8ae51 Add release documentation for v4.1.6
  • 29e80be 4.1.6
  • a5c59a5 Update History.md and AUTHORS for new release
  • 0ae60b6 Merge pull request #1653 from mroderick/upgrade-dependencies
  • dcd4191 Upgrade browserify to latest
  • a316f02 Upgrade markdownlint-cli to latest
  • 78ebdb3 Upgrade lint-staged to latest
  • fcf967b Upgrade dependency supports-color
  • 7c3cb4f Enable StaleBot with default configuration (#1649)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of lodash is breaking the build 🚨

The dependency lodash was updated from 4.17.10 to 4.17.11.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lodash is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Add asserts to new commit

Could you clarify how @semantic-release/git add new asserts to repo?

.releaserc

{
  "branch": "cicd",
  "repositoryUrl": "https://gitlab.url.com",
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/git", {
      "assets": ["dist/*.js", "package.json"],
      "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
    }],
    ["@semantic-release/gitlab", {
      "gitlabUrl": "https://gitlab.url.com"
    }],
  ]
}

I have pipeline like that:

    - yarn install (1)
    - yarn build (2)
    - git status (3)
    - yarn semantic-release (4)
    - git log --name-status HEAD^..HEAD (5)

3 (check current diff) and 5 (check latest commit) step added for test.

Step 2 create assert in my repo, but I cannot add it to my project and create commit.

Logs:

$ yarn install
Ok
$ yarn build
Ok
$ git status
HEAD detached at 4211db2
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   dist/main.js

no changes added to commit (use "git add" and/or "git commit -a")
$ yarn semantic-release
yarn run v1.13.0
$ /builds/arrhythmia/bootstrap/node_modules/.bin/semantic-release
[15:19:08] [semantic-release] › ℹ  Running semantic-release version 15.12.3
[15:19:08] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
[15:19:08] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
[15:19:08] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[15:19:08] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[15:19:08] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
[15:19:08] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
[15:19:08] [semantic-release] › ✔  Run automated release from branch cicd
[15:19:09] [semantic-release] › ✔  Allowed to push to the Git repository
[15:19:09] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
[15:19:09] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
[15:19:09] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[15:19:09] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication
[15:19:09] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[15:19:09] [semantic-release] › ℹ  Found git tag v1.4.1 associated with version 1.4.1
[15:19:09] [semantic-release] › ℹ  Found 1 commits since last release
[15:19:09] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[15:19:09] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Update release stage

Add build operation for release stage
[15:19:09] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[15:19:09] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 1 commits complete: no release
[15:19:09] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[15:19:09] [semantic-release] › ℹ  There are no relevant changes, so no new version is released.
Done in 1.21s.
$ git log --name-status HEAD^..HEAD
commit 4211db296061a26667eab41d2cb18923eb407e69
Author: XXX
Date:   Tue Jan 15 17:11:45 2019 +0300

    Update release stage
    
    Add build operation for release stage

M	.gitlab-ci.yml
M	.releaserc
M	dist/main.js
M	dist/main.js.map
M	package.json
M	yarn.lock
Creating cache default...
node_modules/: found 52656 matching files          
Created cache
Job succeeded

I have There are no relevant changes, so no new version is released

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.