chore: remove semantic-release
MODIFY
scripts/release-example.js
scripts/release-example.js
@@ -26,8 +26,8 @@ module.exports = (_, options) => {
const [, type, format] = example.split('-')
const options = format === 'ts' ?
- '--options=yarn,typescript,mocha,semantic-release,circleci,appveyor,codecov' :
- '--options=yarn,mocha,semantic-release,circleci,appveyor,codecov'
+ '--options=yarn,typescript,mocha,circleci,appveyor,codecov' :
+ '--options=yarn,mocha,circleci,appveyor,codecov'
const d = path.join(__dirname, '../tmp/examples', example)
sh.mkdir('-p', path.dirname(d))

MODIFY
src/app-command.ts
src/app-command.ts
@@ -5,7 +5,7 @@ import Base from './command-base'
export default abstract class AppCommand extends Base {
static flags = {
defaults: flags.boolean({description: 'use defaults for every setting'}),
- options: flags.string({description: '(yarn|typescript|tslint|semantic-release|mocha)'}),
+ options: flags.string({description: '(yarn|typescript|tslint|mocha)'}),
force: flags.boolean({description: 'overwrite existing files'}),
}
static args = [

MODIFY
src/generators/app.ts
src/generators/app.ts
@@ -44,7 +44,6 @@ class App extends Generator {
circleci: boolean
appveyor: boolean
codecov: boolean
- 'semantic-release': boolean
typescript: boolean
tslint: boolean
yarn: boolean
@@ -72,14 +71,12 @@ class App extends Generator {
typescript: boolean
tslint: boolean
yarn: boolean
- 'semantic-release': boolean
}
}
mocha!: boolean
circleci!: boolean
appveyor!: boolean
codecov!: boolean
- semantic_release!: boolean
ts!: boolean
tslint!: boolean
yarn!: boolean
@@ -102,7 +99,6 @@ class App extends Generator {
circleci: opts.options.includes('circleci'),
appveyor: opts.options.includes('appveyor'),
codecov: opts.options.includes('codecov'),
- 'semantic-release': opts.options.includes('semantic-release'),
typescript: opts.options.includes('typescript'),
tslint: opts.options.includes('tslint'),
yarn: opts.options.includes('yarn'),
@@ -156,10 +152,6 @@ class App extends Generator {
if (this.repository && (this.repository as any).url) {
this.repository = (this.repository as any).url
}
- try {
- let yml = this.fs.read('.circleci/config.yml')
- this.options['semantic-release'] = yml.includes('semantic-release')
- } catch { }
if (this.options.defaults) {
this.answers = defaults
} else {
@@ -239,7 +231,6 @@ class App extends Generator {
{name: 'codecov (online code coverage report viewer)', value: 'codecov', checked: true},
{name: 'typescript (static typing for javascript)', value: 'typescript', checked: true},
{name: 'tslint (static analysis tool for typescript)', value: 'tslint', checked: true},
- {name: 'semantic-release (automated version management)', value: 'semantic-release', checked: this.options['semantic-release']}
],
filter: ((arr: string[]) => _.keyBy(arr)) as any,
},
@@ -261,7 +252,6 @@ class App extends Generator {
this.circleci = this.options.circleci
this.appveyor = this.options.appveyor
this.codecov = this.options.codecov
- this.semantic_release = this.options['semantic-release']
this.pjson.name = this.answers.name || defaults.name
this.pjson.description = this.answers.description || defaults.description

MODIFY
templates/circle.yml.ejs
templates/circle.yml.ejs
@@ -30,7 +30,6 @@ jobs:
./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
curl -s https://codecov.io/bash | bash
<%_ } _%>
- <%_ if (!semantic_release) { _%>
- save_cache:
key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
paths:
@@ -42,55 +41,13 @@ jobs:
- ~/.npm
- /usr/local/lib/node_modules
<%_ } _%>
- <%_ } _%>
node-8:
<<: *test
docker:
- image: node:8
-<%_ if (semantic_release) { _%>
- release:
- <<: *test
- steps:
- - add_ssh_keys
- - checkout
- - restore_cache: *restore_cache
- - run:
- name: Install dependencies
- command: |
- <%- yarn ? 'yarn global add' : 'npm install -g' %> @oclif/semantic-release@3 semantic-release@15
- <%- yarn ? 'yarn --frozen-lockfile' : 'npm install' %>
- - run:
- name: Cutting release
- command: |
- <%_ if (yarn) { _%>
- export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
- <%_ } _%>
- semantic-release -e @oclif/semantic-release
- - save_cache:
- key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
- paths:
- - ~/cli/node_modules
- <%_ if (yarn) { _%>
- - /usr/local/share/.cache/yarn
- - /usr/local/share/.config/yarn
- <%_ } else { _%>
- - ~/.npm
- - /usr/local/lib/node_modules
- <%_ } _%>
-<%_ } _%>
-
workflows:
version: 2
"<%= pjson.name %>":
jobs:
- node-latest
- node-8
-<%_ if (semantic_release) { _%>
- - release:
- context: org-global
- filters:
- branches: {only: master}
- requires:
- - node-latest
- - node-8
-<%_ } _%>

DELETE
templates/gitattributes
-* text=auto
-*.js text eol=lf
-<%_ if (ts) { _%>
-*.ts text eol=lf
-<%_ } _%>

DELETE
templates/scripts/release
-#!/usr/bin/env bash
-
-set -ex
-
-PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
-
-yarn global add @oclif/semantic-release@1 semantic-release@12
-semantic-release -e @oclif/semantic-release

MODIFY
test/run.js
test/run.js
@@ -21,7 +21,7 @@ function generate(args) {
function build(type, features) {
let options = ''
- if (features === 'everything') options = '--options=yarn,typescript,tslint,mocha,semantic-release'
+ if (features === 'everything') options = '--options=yarn,typescript,tslint,mocha'
if (features === 'typescript') options = '--options=yarn,typescript'
if (features === 'mocha') options = '--options=yarn,mocha'
let dir = CI ? tmp.tmpNameSync() : path.join(__dirname, '../tmp')

chore: remove semantic-release