From f93679000dfae1801bcaf7eaf12258e0338622ce Mon Sep 17 00:00:00 2001 From: Yefu Zhang Date: Mon, 27 Nov 2023 15:49:58 +0800 Subject: [PATCH] [ci-change] update version in package.json error fix **Phenomenon and reproduction steps** none **Root cause and solution** none **Impactions** none **Test method** none **Affected branch(es)** - main **Checklist** - [ ] Dependencies update required - [ ] Common bug (similar problem in other repo) --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c8f17c3..6e67181 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,14 +39,6 @@ jobs: echo "IMAGE_TAG_PREFIX=${{ github.ref_name }}"|sed 's|main|latest|' >> $GITHUB_ENV echo "IMAGE_TAG=$(git rev-list --count HEAD)" >> $GITHUB_ENV - - name: Update Version - run: | - files=(package.json */package.json) - version=${{ env.IMAGE_TAG_PREFIX }} - for file in "${files[@]}"; do - sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" $file - done - - name: Setup Yarn uses: DerYeger/yarn-setup-action@master with: @@ -72,10 +64,18 @@ jobs: - name: Review plugin.json run: cat ./deepflow-querier-datasource/src/plugin.json - - name: Install All Dependencies run: 'test -d deepflow-apptracing-panel/dist || yarn install:all' + - name: Update Version + run: | + files=(package.json */package.json) + version=${{ env.IMAGE_TAG_PREFIX }} + version=${version#v} + for file in "${files[@]}"; do + sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" $file + done + - name: Build All Plugins run: 'test -d deepflow-apptracing-panel/dist || yarn build:all'