Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,5 @@ Once your branch has been approved and merged, follow these steps from `main` to
4. Bump the version — this will update `package.json` and automatically create a commit and tag: `yarn version`
5. If the remote has received commits since the container was built, rebase on top of them: `git pull --rebase`
6. Push the commit and tag to the repository: `git push && git push --tags`
7. Build the distributable: `yarn build`
8. Log in to npm using an account authorised to publish to the `@hubble` namespace: `yarn login`
9. Publish to npm: `yarn publish`
7. Log in to npm using an account authorised to publish to the `@hubble` namespace: `yarn login`
8. Publish to npm: `yarn publish` (this will automatically build `dist` before publishing)
14 changes: 14 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ steps:
dev yarn test
waitFor: ['Build image', 'Run linting']

- id: 'Verify package contents'
name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- -c
- |
docker compose \
-f docker-compose.yml \
--profile dev \
run \
--rm \
dev sh -c "yarn pack --filename /tmp/test-package.tgz && tar -tzf /tmp/test-package.tgz | grep -q 'dist/' && echo 'dist/ found in package' || (echo 'ERROR: dist/ missing from package' && exit 1)"
waitFor: ['Build image']

substitutions:
_SERVICE_NAME: request
_BUILD_ID_SHORT: ${BUILD_ID:0:8}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
"docs:publish": "yarn docs:build && gh-pages -d ./docs",
"docs:start": "serve ./docs",
"format": "prettier \"./src/**/*.{js,json}\" --write",
"lint": "yarn lint:eslint && yarn lint:format",
"lint:eslint": "eslint .",
"lint:format": "prettier \"./src/**/*.{js,json}\" --check",
"lint": "yarn lint:eslint && yarn lint:format",
"prepublishOnly": "yarn build",
"start": "yarn build --watch",
"test": "jest"
},
Expand Down