214 Commits

Author SHA1 Message Date
Pierre Vanduynslager
4abda31f83 fix: add debug log for git fetch command 2018-07-02 16:50:41 -04:00
Pierre Vanduynslager
4454d57e02 feat: allow to disable the publish plugin hook 2018-06-19 15:03:43 -04:00
Pierre Vanduynslager
2b6378f26f fix: use git ls-remote to verify if the remote branch is ahead 2018-06-15 16:16:55 -04:00
Pierre Vanduynslager
24a8052038 refactor: simply EGITNOPERMISSION error parameters 2018-06-15 16:16:55 -04:00
Matt Travi
6a36832398 fix(plugin-load): clarify load message
added quotes around plugin name to set it apart from the message. without the quotes, some consumers
were missunderstanding the successful loading of the `fail` plugin as a load failure and assuming
something was broken

resolves #811
2018-06-05 22:27:05 -07:00
Pierre Vanduynslager
47c73eb672 feat: add support for git version 2.0.0 2018-05-21 17:52:52 -04:00
Pierre Vanduynslager
a72d8f52af fix: add clarification in EGITNOPERMISSION error message
Clarify that the error might be due to an invalid `repositoryUrl` configuration.
2018-05-20 23:14:44 +03:00
Pierre Vanduynslager
d7081fadb1 fix: use git rev-parse origin/${branch} to verify origin head 2018-05-09 13:27:33 -07:00
Pierre Vanduynslager
61d7d38ec2 feat: set tag author and committer name/email
Use [Git Environment Variables](https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables#Committing). Set default values if environement variables are not set.
2018-05-08 14:25:23 -04:00
Cory Reed
4352144a98 fix: correct git merge-base error code handling 2018-05-08 10:03:46 -07:00
greenkeeper[bot]
349b2e8d77 fix(package): update cosmiconfig to version 5.0.0 2018-05-05 15:04:42 -04:00
greenkeeper[bot]
f3e4991819 chore(package): update xo to version 0.21.0 2018-05-04 16:06:24 -04:00
pvdlg
cd9f2bdd44 feat: log git error message when authentication verification fails 2018-05-04 12:19:24 -07:00
pvdlg
c93775cc38 feat: add support for Bitbucket token in environment variables 2018-05-01 12:02:29 -07:00
pvdlg
e88ac6300c fix: fix Bitbucket authenticated URL 2018-05-01 10:44:02 -04:00
pvdlg
a52f258fa4 refactor: rename origin parameters to repositoryUrl 2018-05-01 09:59:57 -04:00
pvdlg
d15905c0d5 fix: verify the local branch is up to date with the remote one 2018-05-01 09:59:57 -04:00
Anshuk Kumar
45d7e6f25f fix: unshallow repository with credentials 2018-05-01 09:47:15 -04:00
Pierre Vanduynslager
cb1f80cb56 fix: add trailing .git to repositoryUrl only if it's present in the configured URL 2018-04-12 17:42:53 -04:00
Pierre Vanduynslager
31ad23125a fix: match tag to tagFormat from the begining of the string 2018-04-11 17:11:33 -04:00
Pierre Vanduynslager
51e340f44e fix: handle case with no last release in history 2018-03-21 21:41:50 -04:00
Pierre Vanduynslager
30ee231116 fix: prevent git prompt before permissions verification 2018-03-20 11:24:08 -04:00
Pierre Vanduynslager
3c46455929 fix: remove execa timeout 2018-03-20 11:24:08 -04:00
Pierre Vanduynslager
7c48afad47 fix: prevent git CLI to prompt user/password on CI 2018-03-16 14:33:18 -04:00
Pierre Vanduynslager
5f1d530e2a feat: allow to use shorthand for repositoryUrl
- `owner/repo` => `https://github.com/owner/repo.git`
- `gitlab:owner/repo` => `https://gitlab.com/owner/repo.git`
- `bitbucket:owner/repo` => `https://bitbucket.com/owner/repo.git`
2018-03-15 22:40:09 +00:00
Pierre Vanduynslager
b0b4fc82de fix: convert git+https URL in package.json to https 2018-03-13 00:54:32 +00:00
Pierre Vanduynslager
6f74dcbd4a fix: use correct debug namespace 2018-03-13 00:54:32 +00:00
Pierre Vanduynslager
e4618a2fbc fix: exclude prereleases from version retrived by getLastRelease 2018-03-08 17:25:40 +00:00
Pierre Vanduynslager
c2beb643fa feat: add the prepare plugin hook
BREAKING CHANGE: Committing or creating files in the `publish` plugin hook is not supported anymore and now must be done in the `prepare` hook

Plugins with a `publish` hook that makes a commit or create a file that can be committed must use the `prepare` hook.
2018-02-19 00:28:50 -05:00
Pierre Vanduynslager
20246c02b1 fix: exclude empty env var value from replacement 2018-02-19 00:01:06 -05:00
Pierre Vanduynslager
1966f0e3e2 fix: verify branch first 2018-02-15 18:35:37 +00:00
Pierre Vanduynslager
305f4ee8eb fix: do not transform repositoryUrl if it allow to push
Even the user set Git credentials via environment variable, use the configured URL (with authentication) if it works.
This allow users to push tags and commits via ssh while still using the GitHub/GitLab API.
2018-02-14 10:45:44 -05:00
Pierre Vanduynslager
9788fcad4e feat: use @semantic-release/github as default for success and fail hooks
BREAKING CHANGE: `success` and `fail` hooks are now enabled by default

In order to disable the `@semantic-release/github` plugin for the `success` and `fail` hook, the corresponding options have to be set to `false` in the **semantic-release** configuration:

```json
{
  "release": {
    "success": false,
    "fail": false
  }
}
```

Users who do not use the `@semantic-release/github` plugin, should disable it in the `success` and `fail` by setting the corresponding options to `false` or to alternative plugin providing `success` and `fail` hooks.
2018-02-13 16:33:37 -05:00
Pierre Vanduynslager
04f3061bed fix: remove the github plugin from default success and fail hooks 2018-02-13 16:06:30 -05:00
Pierre Vanduynslager
ce1e74f611 fix: set repository authentication when repositoryUrl is set as an option 2018-02-12 16:17:09 -05:00
Pierre Vanduynslager
9dd127ba98 fix: fix EPLUGINCONF error details 2018-02-12 00:36:06 -05:00
Pierre Vanduynslager
49f5e704ba feat: add success and fail notification plugins
- Allow `publish` plugins to return an `Object` with information related to the releases
- Add the `success` plugin hook, called when all `publish` are successful, receiving a list of release
- Add the `fail` plugin hook, called when an error happens at any point, receiving a list of errors
- Add detailed message for each error
2018-02-11 19:53:41 -05:00
Pierre Vanduynslager
9b2f6bfed2 feat: allow plugins to throw an iterable list of errors 2018-02-11 19:53:41 -05:00
Pierre Vanduynslager
687435b9a2 feat: add debug logs for git commands 2018-02-08 16:43:17 -05:00
Pierre Vanduynslager
7e785fa757 fix: debug log all options 2018-02-08 16:13:04 -05:00
Pierre Vanduynslager
cbf57851fb fix: always transform git+https url to https 2018-02-02 15:33:36 -05:00
Christian Musa
d8208237f2 fix: use long option to delete tag in git push 2018-01-31 16:22:04 -05:00
Pierre Vanduynslager
39536fa34e feat: add tagFormat option to customize Git tag name 2018-01-29 00:55:32 -05:00
Pierre Vanduynslager
faabffb208 fix: log all core verification errors 2018-01-29 00:55:32 -05:00
Pierre Vanduynslager
467635bc14 fix: prioritize GIT_CREDENTIALS for gtit credentials
Allow to defined a both `GIT_CREDENTIALS` for repository access and `GH_TOKEN` or `GL_TOKEN` for API access
2018-01-27 20:31:59 -05:00
Pierre Vanduynslager
8b3605dd04 fix: hide sensitive info for Buffer and undefined 2018-01-27 18:24:24 -05:00
Pierre Vanduynslager
d0b304e240 feat: get last release with git tags
- Remove the `getLastRelease` plugin type
- Retrieve the last release based on Git tags
- Create the next release Git tag before calling the `publish` plugins

BREAKING CHANGE: Remove the `getLastRelease` plugin type

The `getLastRelease` plugins will not be called anymore.

BREAKING CHANGE: Git repository authentication is now mandatory

The Git authentication is now mandatory and must be set via `GH_TOKEN`, `GITHUB_TOKEN`,  `GL_TOKEN`, `GITLAB_TOKEN` or `GIT_CREDENTIALS` as described in [CI configuration](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/ci-configuration.md#authentication).
2018-01-27 16:50:29 -05:00
Pierre Vanduynslager
fb0caa005b feat: hide sensitive info in stdout/sdtin 2018-01-27 14:00:06 -05:00
Pierre Vanduynslager
cdb98f919f feat: log all verification errors 2018-01-27 13:24:39 -05:00
Pierre Vanduynslager
8d575654c2 feat: make semantic-release CI agnostic
- Remove `@semantic-release/condition-travis` from the default plugins
- Verify the current branch in the core
- Verify the build is not triggered by a PR in the core
- Run in dry-run mode if not triggered on CI
- Dry-run mode runs the `verifyConditions` plugins, allowing to detect configuration error locally
- Return without error when no version has to be released due to no changes
- Return without error if the build is triggered from a PR
- Return without error if the current branch is not the configured branch
- CLI return with exit code 1 if there is a `semanticReleaseError`, allowing to fail builds in case of config error, missing token etc...

BREAKING CHANGE: `semantic-release` doesn't make sure it runs only on one Travis job anymore.
The CI configuration has to be done such that `semantic-release`
- runs only once per build
- runs only after all tests are successful on every jobs of the build
- runs on Node >=8

This can easily be done with [travis-deploy-once](https://github.com/semantic-release/travis-deploy-once).

Migration Guide

Modify your `.travis.yml` to use `travis-deploy-once`.
Replace:
```yaml
after_success:
  - npm run semantic-release
```
by:
Replace
```yaml
after_success:
  - npm install -g travis-deploy-once@4
  - travis-deploy-once "npm run semantic-release"
```
2017-12-30 23:15:25 -05:00