Skip to content

Commit

Permalink
major: master does everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Johnson committed Jul 2, 2020
1 parent 89fc0bb commit 2427d79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
7 changes: 3 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ workflows:
filters:
branches:
only:
- alpha
- qa
- dev
- /prerelease-.*/
- master
- tag_latest:
context: public_package_publish
requires:
- do_release
filters:
branches:
only:
Expand Down
22 changes: 5 additions & 17 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,18 @@ export type Branch =

export type Plugin = string | [string, Record<string, any>]

/** The default release configuration */
export enum ReleaseConfiguration {
/** Apps like skills */
App = 'app',
/** Packages / libraries that are published publicly */
Skill = 'skill',
Package = 'package'
}

export const defaultOptions = {
[ReleaseConfiguration.App]: {
branches: [
'master',
{ name: 'alpha', prerelease: true },
{ name: 'qa', prerelease: true },
{ name: 'dev', prerelease: true }
]
[ReleaseConfiguration.Skill]: {
branches: ['master']
},
[ReleaseConfiguration.Package]: {
npmPublish: true,
branches: [
{ name: 'dev', channel: 'beta' },
{ name: 'canary', prerelease: true },
{ name: 'prerelease-*', prerelease: true }
],
branches: ['master'],
releaseMessage: 'chore(release): ${nextRelease.version} [skip-ci-version]'
}
}
Expand Down Expand Up @@ -57,7 +45,7 @@ function spruceSemanticRelease(options?: {
}

const branches: Branch[] =
options.branches || defaultOptions[ReleaseConfiguration.App].branches
options.branches || defaultOptions[ReleaseConfiguration.Skill].branches

const currentBranch = require('child_process')
.execSync('git rev-parse --abbrev-ref HEAD')
Expand Down

0 comments on commit 2427d79

Please sign in to comment.