Skip to content

Commit

Permalink
Fix pipeline release
Browse files Browse the repository at this point in the history
  • Loading branch information
tulios committed Sep 13, 2019
1 parent 72d4fd5 commit 566965d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ trash
#
tmp
dist
release

# website
#
build
build
29 changes: 29 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.DS_Store
test-report.xml
junit.xml
coverage/
yarn-error.log
yarn.lock
**/*.spec.js
__tests__
__snapshots__
fixtures
declarations/
docs/
pipeline/
website/
docker-compose.yml
docker-compose.*.yml
jest.config.js
jest.setup.js
.prettierrc
.prettierignore
.eslintrc.js
.eslintignore
.travis.yml
azure-pipelines.yml
*.png
*.svg
*.tgz
.vscode/
.tsconfig.json
4 changes: 3 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ jobs:
versionSpec: '8.x'
- bash: yarn install
displayName: yarn install
- bash: yarn prepare:release
displayName: yarn prepare:release
- task: Npm@1
inputs:
command: custom
customCommand: publish --access public
customCommand: publish release/ --access public
customEndpoint: npm_registry
publishEndpoint: npm_registry
- bash: TOKEN=${GH_TOKEN} TAG=$(Build.SourceBranch) ./pipeline/updateGithubRelease.js
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@kafkajs/confluent-schema-registry",
"version": "0.1.0",
"main": "index.js",
"main": "dist/index.js",
"description": "ConfluentSchemaRegistry is a library that makes it easier to interact with the Confluent schema registry, it provides convenient methods to encode, decode and register new schemas using the Apache Avro serialization format.",
"keywords": [
"confluent schema registry",
Expand All @@ -12,7 +12,7 @@
"url": "https://github.com/kafkajs/confluent-schema-registry.git"
},
"scripts": {
"prepare": "npm run build",
"prepare:release": "./pipeline/prepareRelease.sh",
"build": "rm -rf ./dist && tsc",
"build:watch": "rm -rf ./dist && tsc --watch",
"test:unit:watch": "yarn test:unit -- --watch",
Expand Down
14 changes: 14 additions & 0 deletions pipeline/prepareRelease.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -euv

rm -rf dist/
rm -rf release/

npm run build

mkdir -p release
mv ./dist ./release/dist
cp package.json ./release/package.json
cp README.md ./release/README.md
cp CHANGELOG.md ./release/CHANGELOG.md
cp LICENSE ./release/LICENSE

0 comments on commit 566965d

Please sign in to comment.