From a403e954ab57ec52a523ae7378895bcab35cd117 Mon Sep 17 00:00:00 2001 From: li Nico <37568394+NicolaCage@users.noreply.github.com> Date: Thu, 26 Aug 2021 17:44:17 +0800 Subject: [PATCH] mod: version & workflows (#6) * mod: version * mod: workflows * mod: code review --- .github/workflows/package.yml | 5 +++-- DEPLOY.md | 4 ++-- package.json | 3 +-- scripts/package.sh | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index b0e17f1e..3057c43b 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,8 +1,9 @@ name: Dashboard RPM Relase on: push: - branches: - - master + release: + types: + - published jobs: package: name: build package diff --git a/DEPLOY.md b/DEPLOY.md index 6f53dd62..f4352421 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -5,10 +5,10 @@ - Linux ## Download -` wget https://oss-cdn.nebula-graph.com.cn/nebula-graph-dashboard/nebula-graph-dashboard-${version-release}.x86_64.tar.gz` +` wget https://oss-cdn.nebula-graph.com.cn/nebula-graph-dashboard/nebula-graph-dashboard-${version}.x86_64.tar.gz` ## Unpress -`tar -xvf nebula-graph-dashboard-${version-release}.x86_64.tar.gz` +`tar -xvf nebula-graph-dashboard-${version}.x86_64.tar.gz` ## Directory descrption diff --git a/package.json b/package.json index dabd0a96..329040d5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "name": "nebula-graph-dashboard", - "version": "1.0.0", - "release": "1", + "version": "1.0.1", "description": "nebula-dashboard", "private": true, "egg": { diff --git a/scripts/package.sh b/scripts/package.sh index b08fb04e..337a0243 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -30,7 +30,6 @@ mv $DASHBOARD/vendors/prometheus/ $TARGET/ ### Nebula Graph Dashboard relative ### cd $DASHBOARD VERSION=`cat package.json | grep '"version":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'` -RELEASE=`cat package.json | grep '"release":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'` bash ./scripts/setEventTracking.sh $1 npm install --unsafe-perm @@ -49,4 +48,4 @@ cp $DASHBOARD/app/assets/index.html ./app/assets/ ### tar cd $DIR -tar -czf nebula-graph-dashboard-$VERSION-$RELEASE.x86_64.tar.gz nebula-graph-dashboard \ No newline at end of file +tar -czf nebula-graph-dashboard-$VERSION.x86_64.tar.gz nebula-graph-dashboard \ No newline at end of file