Skip to content

Commit 1bec171

Browse files
twou12031travilyu
authored andcommitted
[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)
1 parent bfd1970 commit 1bec171

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ jobs:
3939
echo "IMAGE_TAG_PREFIX=${{ github.ref_name }}"|sed 's|main|latest|' >> $GITHUB_ENV
4040
echo "IMAGE_TAG=$(git rev-list --count HEAD)" >> $GITHUB_ENV
4141
42-
- name: Update Version
43-
run: |
44-
files=(package.json */package.json)
45-
version=${{ env.IMAGE_TAG_PREFIX }}
46-
for file in "${files[@]}"; do
47-
sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" $file
48-
done
49-
5042
- name: Setup Yarn
5143
uses: DerYeger/yarn-setup-action@master
5244
with:
@@ -72,10 +64,18 @@ jobs:
7264
- name: Review plugin.json
7365
run: cat ./deepflow-querier-datasource/src/plugin.json
7466

75-
7667
- name: Install All Dependencies
7768
run: 'test -d deepflow-apptracing-panel/dist || yarn install:all'
7869

70+
- name: Update Version
71+
run: |
72+
files=(package.json */package.json)
73+
version=${{ env.IMAGE_TAG_PREFIX }}
74+
version=${version#v}
75+
for file in "${files[@]}"; do
76+
sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" $file
77+
done
78+
7979
- name: Build All Plugins
8080
run: 'test -d deepflow-apptracing-panel/dist || yarn build:all'
8181

0 commit comments

Comments
 (0)