Skip to content

Commit

Permalink
Chore: Add the package release shell (#767)
Browse files Browse the repository at this point in the history
* Chore: Add the package release shell

Signed-off-by: barnettZQG <[email protected]>

* Fix: Update the package.json

Signed-off-by: barnettZQG <[email protected]>

* Fix: Install @parcel/watcher fails on ARM

Signed-off-by: barnettZQG <[email protected]>

---------

Signed-off-by: barnettZQG <[email protected]>
  • Loading branch information
barnettZQG authored Apr 16, 2023
1 parent dabefee commit 3cae9e1
Show file tree
Hide file tree
Showing 12 changed files with 3,151 additions and 131 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ dist
tsconfig.tsbuildinfo

e2e-plugins

npm-artifacts
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ ARG VERSION
WORKDIR /app/velaux
ADD . .
ENV VERSION=${VERSION}
RUN apk add --no-cache git && yarn install && yarn build
RUN apk add --no-cache git make clang build-base python3
RUN yarn install && yarn build

# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as server-builder
Expand Down
8 changes: 8 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
"packages/*"
],
"version": "9.4.0-pre"
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"packages:theme": "yarn workspace @velaux/theme build",
"packages:ui": "yarn workspace @velaux/ui build",
"packages:data": "yarn workspace @velaux/data build",
"packages:plugins": "yarn workspace @velaux-plugins/app-demo build && yarn workspace @velaux-plugins/node-dashboard build"
"packages:plugins": "yarn workspace @velaux-plugins/app-demo build && yarn workspace @velaux-plugins/node-dashboard build",
"packages:pack": "rm -rf ./npm-artifacts && mkdir -p ./npm-artifacts && lerna exec --no-private -- yarn pack --out \"../../npm-artifacts/%s-%v.tgz\""
},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -82,6 +83,7 @@
"fork-ts-checker-webpack-plugin": "7.3.0",
"html-loader": "4.2.0",
"html-webpack-plugin": "5.5.0",
"lerna": "5.5.4",
"less": "4.1.3",
"less-loader": "11.1.0",
"mini-css-extract-plugin": "2.7.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/velaux-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "KubeVela",
"license": "Apache-2.0",
"name": "@velaux/data",
"version": "0.0.1",
"version": "0.0.4",
"description": "VelaUX Data Library",
"keywords": [
"typescript"
Expand All @@ -13,8 +13,6 @@
"url": "http://github.com/kubevela/velaux.git",
"directory": "packages/velaux-data"
},
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/esm/index.js",
Expand All @@ -27,6 +25,8 @@
"./CHANGELOG.md",
"LICENSE_APACHE2"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -p ./tsconfig.build.json && rollup -c rollup.config.ts",
"clean": "rimraf ./dist ./compiled ./package.tgz",
Expand Down
11 changes: 8 additions & 3 deletions packages/velaux-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "@velaux/theme",
"version": "0.0.1",
"version": "0.0.2",
"author": "KubeVela",
"scripts": {
"build": "yarn sass2less && node bin/build.js",
"sass2less": "sass2less variables.scss variables.less"
},
"main": "index.js",
"files": [
"./dist/**"
],
"main": "dist/next.js",
"devDependencies": {
"@types/react-dom": "^17.0.2",
"autoprefixer": "^7.1.4",
Expand Down Expand Up @@ -34,6 +37,8 @@
},
"license": "Apache 2.0",
"publishConfig": {
"registry": "https://registry.npmjs.org"
"registry": "https://registry.npmjs.org",
"access": "public",
"main": "dist/next.js"
}
}
14 changes: 8 additions & 6 deletions packages/velaux-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@velaux/ui",
"version": "1.8.0",
"private": true,
"version": "0.0.4",
"scripts": {
"build": "tsc -p ./tsconfig.build.json && rollup -c rollup.config.ts",
"test": "ts-mocha -p tsconfig.test.json src/**/**.test.ts",
Expand All @@ -21,11 +20,14 @@
"path": "./node_modules/cz-customizable"
}
},
"types": "src/types.ts",
"main": "src/index.ts",
"directories": {
"src": "./src"
},
"files": [
"dist/**"
],
"main": "dist/types.js",
"types": "dist/types.d.ts",
"publishConfig": {
"main": "dist/types.js",
"module": "dist/esm/types.js",
Expand All @@ -50,8 +52,8 @@
"@alifd/theme-2": "0.4.4",
"@kubernetes/client-node": "0.18.1",
"@sentry/browser": "7.45.0",
"@velaux/data": "0.0.1",
"@velaux/theme": "0.0.1",
"@velaux/data": "^0.0.4",
"@velaux/theme": "0.0.2",
"ansi-to-html": "^0.7.2",
"ansi-to-react": "^6.1.6",
"axios": "0.24.0",
Expand Down
19 changes: 19 additions & 0 deletions packages/velaux-ui/rollup.build.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.title-wrapper {
display: flex;
justify-content: space-between;
width: 100%;
padding: 8px 0;
line-height: 36px;
}
.title-wrapper .title {
font-weight: 500;
font-size: 18px;
}
.title-wrapper .subTitle {
margin-left: 15px;
}
@media (max-width: 719px) and (min-width: 480px) {
.title-wrapper .subTitle {
display: none;
}
}
5 changes: 3 additions & 2 deletions plugins/app-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"author": "KubeVela",
"license": "Apache-2.0",
"private": true,
"name": "@velaux-plugins/app-demo",
"version": "0.0.1",
"description": "VelaUX plugin demo",
Expand All @@ -19,8 +20,8 @@
"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development"
},
"dependencies": {
"@velaux/data": "0.0.1",
"@velaux/ui": "1.8.0",
"@velaux/data": "0.0.4",
"@velaux/ui": "0.0.4",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-scripts": "^3.4.0",
Expand Down
5 changes: 3 additions & 2 deletions plugins/node-dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"author": "KubeVela",
"license": "Apache-2.0",
"private": true,
"name": "@velaux-plugins/node-dashboard",
"version": "0.0.1",
"description": "Kubernetes node dashboard VelaUX plugin",
Expand All @@ -21,8 +22,8 @@
},
"dependencies": {
"@kubernetes/client-node": "0.18.0",
"@velaux/data": "0.0.1",
"@velaux/ui": "1.8.0",
"@velaux/data": "0.0.4",
"@velaux/ui": "0.0.4",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-scripts": "^3.4.0",
Expand Down
11 changes: 11 additions & 0 deletions scripts/package-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

echo $'\nBuilding packages'
yarn build-packages

echo $'\nPacking packages'
yarn packages:pack

echo $'\nPublishing packages'
for file in ./npm-artifacts/*.tgz; do npm publish "$file"; done

Loading

0 comments on commit 3cae9e1

Please sign in to comment.