Skip to content

Commit 201f534

Browse files
committed
feat: anycli conversion
1 parent 00606d8 commit 201f534

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1401
-3870
lines changed

.circleci/config.yml

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,61 @@
11
---
22
version: 2
33
jobs:
4-
node-latest: &test-build
4+
node-latest: &test
55
docker:
66
- image: node:latest
77
working_directory: ~/cli
8+
environment:
9+
NYC: "yarn exec nyc -- --nycrc-path node_modules/@anycli/nyc-config/.nycrc"
10+
MOCHA_FILE: "reports/mocha.xml"
811
steps:
912
- checkout
10-
- restore_cache:
13+
- restore_cache: &restore_cache
1114
keys:
12-
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{checksum "yarn.lock"}}
13-
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-
14-
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Environment.CIRCLE_JOB }}-master
15-
- run: ./scripts/ci_run
15+
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}}
16+
- v0-yarn-{{checksum ".circleci/config.yml"}}
17+
- run: .circleci/greenkeeper
18+
- run: yarn add -D nyc@11 @anycli/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
19+
- run: |
20+
mkdir -p reports
21+
$NYC yarn test --reporter mocha-junit-reporter
22+
$NYC report --reporter text-lcov > coverage.lcov
23+
curl -s https://codecov.io/bash | bash
24+
- run: yarn exec commitlint -- -x @commitlint/config-conventional --from origin/master
25+
- store_test_results: &store_test_results
26+
path: ~/cli/reports
27+
node-8:
28+
<<: *test
29+
docker:
30+
- image: node:8
31+
release:
32+
<<: *test
33+
steps:
34+
- add_ssh_keys
35+
- checkout
36+
- restore_cache: *restore_cache
37+
- run: yarn global add @anycli/semantic-release@1 semantic-release@12
38+
- run: yarn --frozen-lockfile
39+
- run: |
40+
export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
41+
semantic-release -e @anycli/semantic-release
1642
- save_cache:
17-
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{checksum "yarn.lock"}}
43+
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
1844
paths:
1945
- ~/cli/node_modules
2046
- /usr/local/share/.cache/yarn
21-
22-
node-8:
23-
<<: *test-build
24-
docker:
25-
- image: node:8
26-
node-6:
27-
<<: *test-build
28-
docker:
29-
- image: node:6
47+
- /usr/local/share/.config/yarn
3048

3149
workflows:
3250
version: 2
33-
test:
51+
"@heroku-cli/command":
3452
jobs:
3553
- node-latest
3654
- node-8
37-
- node-6
55+
- release:
56+
context: org-global
57+
filters:
58+
branches: {only: master}
59+
requires:
60+
- node-latest
61+
- node-8

.circleci/greenkeeper

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
6+
7+
if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
8+
yarn
9+
# yarn check
10+
exit 0
11+
fi
12+
13+
if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
14+
git config --global push.default simple
15+
git config --global user.email "$GIT_EMAIL"
16+
git config --global user.name "$GIT_USERNAME"
17+
fi
18+
19+
if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
20+
yarn global add greenkeeper-lockfile@1
21+
fi
22+
23+
greenkeeper-lockfile-update
24+
yarn
25+
greenkeeper-lockfile-upload

.editorconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ root = true
33
[*]
44
indent_style = space
55
indent_size = 2
6-
tab_width = 2
7-
end_of_line = lf
86
charset = utf-8
97
trim_trailing_whitespace = true
108
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/lib

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "anycli"
3+
}

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.ts text eol=lf

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
*-debug.log
2+
*-error.log
3+
/lib
4+
/node_modules
5+
/tmp
16
lib/
27
node_modules/

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# @cli-engine/heroku
1+
@heroku-cli/command
2+
===================
23

3-
[![Greenkeeper badge](https://badges.greenkeeper.io/heroku/cli-engine-heroku.svg)](https://greenkeeper.io/)
4-
[![CircleCI](https://circleci.com/gh/heroku/cli-engine-heroku.svg?style=svg)](https://circleci.com/gh/heroku/cli-engine-heroku)
5-
[![Build status](https://ci.appveyor.com/api/projects/status/2o5qa4nbjryx8du5/branch/master?svg=true)](https://ci.appveyor.com/project/Heroku/cli-engine-heroku/branch/master)
6-
[![codecov](https://codecov.io/gh/heroku/cli-engine-heroku/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/cli-engine-heroku)
4+
heroku specific functionality for the cli-engine
5+
6+
[![Version](https://img.shields.io/npm/v/@heroku-cli/command.svg)](https://npmjs.org/package/@heroku-cli/command)
7+
[![CircleCI](https://circleci.com/gh/heroku/cli-engine-heroku/tree/master.svg?style=svg)](https://circleci.com/gh/heroku/cli-engine-heroku/tree/master)
8+
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/cli-engine-heroku?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/cli-engine-heroku/branch/master)
9+
[![Codecov](https://codecov.io/gh/heroku/cli-engine-heroku/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/cli-engine-heroku)
10+
[![Greenkeeper](https://badges.greenkeeper.io/heroku/cli-engine-heroku.svg)](https://greenkeeper.io/)
11+
[![Known Vulnerabilities](https://snyk.io/test/npm/@heroku-cli/command/badge.svg)](https://snyk.io/test/npm/@heroku-cli/command)
12+
[![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/command.svg)](https://npmjs.org/package/@heroku-cli/command)
13+
[![License](https://img.shields.io/npm/l/@heroku-cli/command.svg)](https://github.com/heroku/cli-engine-heroku/blob/master/package.json)

appveyor.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@ environment:
22
nodejs_version: "9"
33
cache:
44
- '%LOCALAPPDATA%\Yarn -> appveyor.yml'
5-
- node_modules -> package.json
5+
- node_modules -> yarn.lock
66

77
install:
88
- ps: Install-Product node $env:nodejs_version x64
9-
- yarn
9+
- yarn add -D nyc@11 @anycli/nyc-config@0
1010
test_script:
11-
- yarn test --coverage
11+
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc yarn test
1212
after_test:
13+
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc report --reporter text-lcov > coverage.lcov
1314
- ps: |
1415
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
1516
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
1617
bash codecov.sh
1718
1819
build: off
20+

jest.config.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)