Skip to content

Commit

Permalink
Merge branch 'master' into no-babel
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c committed Sep 14, 2021
2 parents 31bad03 + ebd6489 commit 3bdec95
Show file tree
Hide file tree
Showing 13 changed files with 838 additions and 704 deletions.
7 changes: 7 additions & 0 deletions .changeset/quick-plants-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'skuba': minor
---

**format:** Execute ESLint with `--report-unused-disable-directives`

`skuba format` will now flag unused disable directives, and will [automatically remove](https://eslint.org/blog/2021/06/whats-coming-in-eslint-8.0.0#unused-disable-directives-are-now-fixable) them once ESLint v8 is released.
7 changes: 7 additions & 0 deletions .changeset/tender-ads-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'skuba': patch
---

**template:** Propagate BUILDKITE environment variable to Docker

This forces serial execution of certain **skuba** commands to avoid overwhelming underprovisioned Buildkite agents. See [docs/buildkite.md](https://github.com/seek-oss/skuba/tree/master/docs/buildkite.md) for more information.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEEK_OSS_CI_NPM_TOKEN }}

- name: Deploy to GitHub Pages
run: yarn deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IS_GITHUB_PAGES: true
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"license": "MIT",
"scripts": {
"build": "yarn skuba build && scripts/postbuild.sh",
"deploy": "scripts/deploy.sh",
"format": "yarn skuba format",
"lint": "yarn skuba lint",
"release": "yarn build && changeset publish",
Expand Down
46 changes: 46 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env sh

set -e

echo '=> Packaging...'

rm -rf dist-docs

mkdir -p dist-docs

cp README.md dist-docs/

cp -R docs dist-docs/docs/

exit 0

cd dist-docs

git init

git add --all

git \
-c 'user.email=<>' \
-c 'user.name=skuba' \
commit \
--author 'skuba <>' \
--message 'Deploy to GitHub Pages' \
--quiet

echo '=> Deploying...'

{
GIT_URL="[email protected]:seek-oss/skuba.git"

if [ "${IS_GITHUB_PAGES:-}" = 'true' ]; then
GIT_URL="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/seek-oss/skuba.git"
fi

git push --force --quiet "${GIT_URL}" 'master:gh-pages'
}

cd ..
rm -rf dist-docs

echo "=> Deployed: https://seek-oss.github.io/skuba"
2 changes: 2 additions & 0 deletions src/cli/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('format', () => {
"eslint",
"--ext=js,ts,tsx",
"--fix",
"--report-unused-disable-directives",
".",
Object {
"localDir": "REDACTED",
Expand Down Expand Up @@ -71,6 +72,7 @@ describe('format', () => {
"--debug",
"--ext=js,ts,tsx",
"--fix",
"--report-unused-disable-directives",
".",
Object {
"localDir": "REDACTED",
Expand Down
1 change: 1 addition & 0 deletions src/cli/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const format = async () => {
...(debug ? ['--debug'] : []),
'--ext=js,ts,tsx',
'--fix',
'--report-unused-disable-directives',
'.',
);
log.ok('✔ ESLint');
Expand Down
2 changes: 2 additions & 0 deletions template/express-rest-api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ version: '3.7'

services:
app:
env:
- BUILDKITE
image: ${BUILDKITE_PLUGIN_DOCKER_IMAGE:-''}
init: true
volumes:
Expand Down
2 changes: 2 additions & 0 deletions template/greeter/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ version: '3.7'

services:
app:
env:
- BUILDKITE
image: ${BUILDKITE_PLUGIN_DOCKER_IMAGE:-''}
init: true
volumes:
Expand Down
2 changes: 2 additions & 0 deletions template/koa-rest-api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ version: '3.7'

services:
app:
env:
- BUILDKITE
image: ${BUILDKITE_PLUGIN_DOCKER_IMAGE:-''}
init: true
volumes:
Expand Down
1 change: 1 addition & 0 deletions template/lambda-sqs-worker-cdk/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '3.7'
services:
app:
environment:
- BUILDKITE
- BUILDKITE_COMMIT
- ENVIRONMENT
- VERSION
Expand Down
1 change: 1 addition & 0 deletions template/lambda-sqs-worker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '3.7'
services:
app:
environment:
- BUILDKITE
- BUILDKITE_COMMIT
- ENVIRONMENT
- VERSION
Expand Down
Loading

0 comments on commit 3bdec95

Please sign in to comment.