Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Merge fa86e20 into 3750a6d
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Sep 29, 2018
2 parents 3750a6d + fa86e20 commit bb8178f
Show file tree
Hide file tree
Showing 127 changed files with 6,077 additions and 388 deletions.
19 changes: 19 additions & 0 deletions .alobuild-prep-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

PLAINTEXT_GPG=/tmp/alobuild-$(cat /proc/sys/kernel/random/uuid)

echo $BUILD_GPG_PUB_KEY | base64 -d > $PLAINTEXT_GPG
echo >> $PLAINTEXT_GPG
echo $BUILD_GPG_PRIV_KEY | base64 -d >> $PLAINTEXT_GPG
chmod 600 $PLAINTEXT_GPG
gpg --batch --yes --import $PLAINTEXT_GPG
rm -f $PLAINTEXT_GPG

PWD_GPG=/tmp/alobuild-$(cat /proc/sys/kernel/random/uuid)

echo '/usr/bin/gpg2 --passphrase ${BUILD_GPG_KEY_PWD} --batch --no-tty "$@"' > $PWD_GPG
chmod 700 $PWD_GPG

git config gpg.program $PWD_GPG
git config commit.gpgsign true
git config --global user.signingkey $BUILD_GPG_KEY_ID
9 changes: 9 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- Please only include exactly one feature/bugfix per commit.
- Please use the [Angular commit message format](https://github.com/bcoe/conventional-changelog-standard/blob/61da424c2aabf93ff9302b42d6fc2c17ff95c087/convention.md) for your commits.
- When applicable, please use an appropriate scope, e.g. if fixing a bug in the *foo* feature, the commit message could look something like `fix(foo): The hug() method no longer eats babies`.
- Please ensure that your branch is up to date with master before opening the pull request.
- Please ensure that there is adequate test coverage for your code: run `yarn test` and see the `coverage` directory.
- Please lint your work; see [package.json](https://github.com/Alorel/personal-build-tools/blob/master/package.json).
- Please ensure that your code is well-documented. Add README entries if applicable.
- If your pull request is a work in progress, please start the title with `[WIP]`, e.g. `[WIP] One glorious feature`
- Please ensure you use [yarn package manager](https://yarnpkg.com) and not npm.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- [ ] I have read the README and API docs (if applicable); the issue is not covered there.
- [ ] I have searched the repository issues and pull requests; my query is not covered there.

-----

Issue goes here.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug Report
about: Something isn't working

---

- [ ] I have read the README and API docs (if applicable); the issue is not covered there.
- [ ] I have searched the repository issues and pull requests; my query is not covered there.

-----

- **Expected behaviour**: XXXXX
- **Actual behaviour**: XXXXX
- **Environment**:
- **Node version**: x.y.z
- **Browser and browser version (if applicable)**: XXXXX
- **Steps to reproduce**:
- Step 1
- Step 2
- ...
- Step n
- **Reproducible code sample**:
- **[stackblitz.com](https://stackblitz.com)** (preferred):
- **Git repository** (*only* if a Stackblitz example is not possible):

-----

Additional information, screenshots etc go here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature Request
about: I want new functionality

---

- [ ] I have read the README and API docs (if applicable); the issue is not covered there.
- [ ] I have searched the repository issues and pull requests; my query is not covered there.

-----

- **Describe the feature**: XXXXX
- **Why it is needed** (include use cases): XXXXX
- **Pseudocode** (non-functional schematic of how it could operate):
```javascript
const code = await getCode();
await makePR(code);
```
- [ ] I would be able to implement this feature and make a pull request.

-----

Additional information goes here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/guidance_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Guidance Request
about: I don't know how to do something

---

- [ ] I have read the README and API docs (if applicable); the issue is not covered there.
- [ ] I have searched the repository issues and pull requests; my query is not covered there.

-----

- **Desired outcome**: XXXXX
- **My attempts**:
- **On [stackblitz.com](https://stackblitz.com)** (preferred):
- **Git repository** (*only* if a Stackblitz example is not possible):

-----

Additional information goes here.
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- [ ] I have read and followed the [contribution guidelines](https://github.com/Alorel/personal-build-tools/blob/master/.github/CONTRIBUTING.md).

My pull request is a:

- [ ] Feature
- [ ] Bug fix
- [ ] Documentation fix
- [ ] Other

-----
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/.tmp/
/package-lock.json
/git_gpg_keys.asc
/tmp.ts
/tmp.js
/tmp.sh
.idea/
node_modules/
package-lock.json
!test/fixtures/reinstall/node_modules/
!test/fixtures/reinstall/package-lock.json
dist/
coverage/
.nyc_output/
Expand Down
4 changes: 1 addition & 3 deletions .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"ts-node/register"
],
"exclude": [
"**/test/**/*",
"**/build/**/*",
"**/webpack.config.js"
"**/test/**/*"
],
"sourceMap": true,
"instrument": true
Expand Down
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ node_js:

before_install:
- npm i -g yarn greenkeeper-lockfile
- &prepKey if [[ $GH_TOKEN ]]; then ./prepare-gpg-key.sh; fi;
- &prepKey if [[ $GH_TOKEN ]]; then ./.alobuild-prep-release.sh; fi;
- greenkeeper-lockfile-update

install: yarn install --check-files --ignore-engines

script: yarn run tslint && yarn run build --noEmit && yarn test --forbid-only --forbid-pending
script:
- yarn run tslint
- yarn run build --noEmit
- if [[ $GH_TOKEN ]]; then yarn test --forbid-only --forbid-pending; else yarn test --forbid-only; fi;

after_script: if [[ $GH_TOKEN ]]; then greenkeeper-lockfile-upload; fi;
after_success: cat ./coverage/lcov.info | coveralls

cache:
yarn: true
directories:
- /home/travis/.cache/alobuild

stages:
- Test
Expand All @@ -32,8 +37,8 @@ jobs:
- npm i -g yarn
- *prepKey
before_script:
- yarn run build
- node dist/alo copy-files
- yarn run build
- node dist/alo copy-files
script: semantic-release
after_success: []
after_script: []
Binary file modified git_gpg_keys.asc.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion mocha.opts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--full-trace
-r ts-node/register
-r source-map-support/register
-t 10000
-t 20000
--trace-deprecation
--trace-warnings
--throw-deprecation
Expand Down
19 changes: 15 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,26 @@
"test:watch": "npm run test -- --watch"
},
"dependencies": {
"chalk": "^2.4.0",
"cross-spawn": "^6.0.0",
"custom-tslint-formatters": "2.4.0",
"delete-empty": "^2.0.0",
"fs-extra": "^7.0.0",
"glob": "^7.0.0",
"js-base64": "^2.4.0",
"json-to-graphql-query": "^1.7.0",
"json5": "^2.0.0",
"lodash": "^4.17.0",
"log-symbols": "^2.2.0",
"readline-sync": "^1.4.0",
"reflect-metadata": "^0.1.12",
"request": "^2.88.0",
"request-promise": "^4.2.0",
"rimraf": "^2.6.0",
"tmp": "~0.0.33",
"tslib": "^1.9.0",
"tslint": "5.11.0",
"typescript": "~3.1.1",
"typescript-lazy-get-decorator": "^1.2.0",
"yamljs": "^0.3.0",
"yargs": "^12.0.0"
Expand All @@ -61,27 +70,29 @@
"@types/delete-empty": "~2.0.0",
"@types/fs-extra": "~5.0.4",
"@types/glob": "~7.1.0",
"@types/js-base64": "~2.3.1",
"@types/json5": "~0.0.30",
"@types/lodash": "~4.14.116",
"@types/log-symbols": "~2.0.0",
"@types/mocha": "~5.2.5",
"@types/node": "~10.11.0",
"@types/readline-sync": "~1.4.3",
"@types/request": "~2.47.1",
"@types/request-promise": "~4.1.42",
"@types/rimraf": "~2.0.2",
"@types/tmp": "~0.0.33",
"@types/uuid": "~3.4.4",
"@types/yamljs": "~0.2.30",
"@types/yargs": "~12.0.0",
"bluebird": "~3.5.1",
"chai": "~4.1.2",
"chai": "~4.2.0",
"coveralls": "~3.0.2",
"cross-env": "~5.2.0",
"mocha": "~5.2.0",
"nyc": "~13.0.0",
"rimraf": "~2.6.2",
"semantic-release": "~15.9.9",
"source-map-support": "~0.5.9",
"tmp": "~0.0.33",
"ts-node": "~7.0.1",
"typescript": "~3.0.1",
"uuid": "~3.3.2"
}
}
9 changes: 0 additions & 9 deletions prepare-gpg-key.sh

This file was deleted.

6 changes: 3 additions & 3 deletions src/alo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {join} from 'path';
import * as yargs from 'yargs';
import {addCommandDir} from './fns/addCommandDir';
import {applyGlobalGroup} from './fns/applyGlobalGroup';
import {addCommandDir} from './fns/add-cmd/addCommandDir';
import {applyGlobalGroup} from './fns/add-cmd/applyGlobalGroup';

const argv = addCommandDir(join(__dirname, 'commands'), yargs)
.scriptName('alo')
Expand All @@ -24,6 +24,6 @@ export function alo(args: string | string[]): Promise<string> {
});
}

if (!process.env.RUNNING_PERSONAL_BUILD_TOOLS_TESTS) {
if (!process.env.RUNNING_PERSONAL_BUILD_TOOLS_TESTS || process.env.RUNNING_PERSONAL_BUILD_TOOLS_TESTS_FORCE) {
argv.global('config').parse();
}
2 changes: 1 addition & 1 deletion src/commands/cfg.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {noop} from 'lodash';
import {join} from 'path';
import {CommandModule} from 'yargs';
import {addCommandDir} from '../fns/addCommandDir';
import {addCommandDir} from '../fns/add-cmd/addCommandDir';
import {cmdName} from '../fns/cmdName';

const cmd: CommandModule = {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/cfg/clear.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as readline from 'readline-sync';
import {CommandModule} from 'yargs';
import {applyGlobalGroup} from '../../fns/applyGlobalGroup';
import {applyGlobalGroup} from '../../fns/add-cmd/applyGlobalGroup';
import {cmdName} from '../../fns/cmdName';
import {ConfigWriter} from '../../lib/ConfigWriter';

function prompt(): boolean {
return readline.keyInYNStrict('Are you sure you want to remove shared config?');
return readline.keyInYNStrict('Are you sure you want to remove shared config? ');
}

const cmd: CommandModule = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/cfg/rm.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {CommandModule} from 'yargs';
import {addCfgKey, addCfgScope, CfgRmConf} from '../../commons/cfg';
import {applyGlobalGroup} from '../../fns/applyGlobalGroup';
import {applyGlobalGroup} from '../../fns/add-cmd/applyGlobalGroup';
import {cmdName} from '../../fns/cmdName';
import {ConfigWriter} from '../../lib/ConfigWriter';

Expand Down

0 comments on commit bb8178f

Please sign in to comment.