-
Notifications
You must be signed in to change notification settings - Fork 49
Update the build and publish process #503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d821cce
d61ab76
4abcd19
bbfc1a5
91fd7cc
ebdf9cb
b4be7d2
08f3e5d
1e36e12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ out | |
| coverage | ||
| coverage-web | ||
| .nyc_output | ||
| packages/*/README.md | ||
| packages/*/LICENSE | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| version=${1:-} | ||
| if [ -z "$version" ]; then | ||
| echo "Usage: $0 <version>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Setting the version to: $version" | ||
|
|
||
| for package in packages/client-node packages/client-web; do | ||
| if [ -f "$package/package.json" ]; then | ||
| echo "Updating client-common version in $package/package.json" | ||
| json=$(cat "$package/package.json") | ||
| echo "$json" | jq --arg version "$version" '.dependencies["@clickhouse/client-common"] = $version' > "$package/package.json" | ||
| fi | ||
| done | ||
|
|
||
| npm --workspaces version "$version" | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| "name": "clickhouse-js", | ||
| "description": "Official JS client for ClickHouse DB", | ||
| "homepage": "https://clickhouse.com", | ||
| "version": "0.0.0", | ||
| "version": "1.15.0", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it need to be manually updated?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simply put, yes, which does not differ from the current approach. The update is done by the script above ( Potentially, with a more streamlined deploy pipeline we'd stick to only using |
||
| "license": "Apache-2.0", | ||
| "keywords": [ | ||
| "clickhouse", | ||
|
|
@@ -19,9 +19,6 @@ | |
| }, | ||
| "scripts": { | ||
| "build:node:all": "rm -rf out; tsc --project tsconfig.all.json", | ||
| "build:common:package": ".scripts/build.sh client-common", | ||
| "build:node:package": ".scripts/build.sh client-node", | ||
| "build:web:package": ".scripts/build.sh client-web", | ||
| "build:web:minjs": "webpack --config webpack.release.js", | ||
| "typecheck": "tsc --project tsconfig.all.json --noEmit", | ||
| "lint": "eslint .", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "include": ["./src/**/*.ts"], | ||
| "compilerOptions": { | ||
| "outDir": "./dist" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "include": ["./src/**/*.ts"], | ||
| "compilerOptions": { | ||
| "outDir": "./dist" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not a js script to avoid
jqrequirementThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. I'm surely ok with switching back to a JS script if there is a preference on your side.
My reason is that in automation scripts the unix-way (i.e. using existing CLI tools) is the way to go. Also,
jqis sort of a living standard these days (together withyq). This holds true, of course, until the complexity overgrows bash as a language in general.Let me know if you'd like to switch and keep the pure JS approach here, I'll then make a follow-up PR.