diff --git a/.circleci/config.yml b/.circleci/config.yml index 88d5cc9..2c5d422 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,30 +126,48 @@ jobs: - run: ./node_modules/.bin/nps release - save_cache: *save_cache + example-multi-cli-typescript: &example + <<: *test + steps: + - add_ssh_keys + - checkout + - restore_cache: *restore_cache + - run: .circleci/greenkeeper + - run: .circleci/setup_git + - run: .circleci/release_example + - save_cache: *save_cache + workflows: version: 2 - "create-dxcli": + create-dxcli: jobs: - - lint - - node-latest-base - - node-latest-single - - node-latest-plugin - - node-latest-multi - - node-8-base - - node-8-single - - node-8-plugin - - node-8-multi - - release: + # - lint + # - node-latest-base + # - node-latest-single + # - node-latest-plugin + # - node-latest-multi + # - node-8-base + # - node-8-single + # - node-8-plugin + # - node-8-multi + # - release: + # context: org-global + # filters: + # branches: {only: master} + # requires: + # - lint + # - node-latest-base + # - node-latest-single + # - node-latest-plugin + # - node-latest-multi + # - node-8-base + # - node-8-single + # - node-8-plugin + # - node-8-multi + - example-multi-cli-typescript: &example_workflow context: org-global - filters: - branches: {only: master} requires: - - lint - - node-latest-base - - node-latest-single - - node-latest-plugin - - node-latest-multi - - node-8-base - - node-8-single - - node-8-plugin - - node-8-multi + - release + # - example-multi-cli-javascript: *example_workflow + # - example-single-cli-typescript: *example_workflow + # - example-single-cli-javascript: *example_workflow diff --git a/.circleci/release_example b/.circleci/release_example new file mode 100755 index 0000000..1dec1c9 --- /dev/null +++ b/.circleci/release_example @@ -0,0 +1,17 @@ +#!/usr/bin/env node + +const sh = require('shelljs') + +sh.set('-ev') + +const example = process.env.CIRCLE_JOB +const [, type,, format] = example.split('-') + +console.dir({type, format}) + +const options = format === 'typescript' ? + '--options=typescript,mocha,semantic-release' : + '--options=mocha,semantic-release' + +sh.cd(`examples/${example}`) +sh.exec(`yarn create dxcli ${type} --defaults ${options}`)