Skip to content

Commit

Permalink
fix: clarity not work in rpm/deb build (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
nianiaJR authored Nov 23, 2022
1 parent f8e2143 commit 03f8820
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
required: true
ga_id:
required: true
clarity_id:
required: true
jobs:
package:
name: build package
Expand All @@ -37,6 +39,6 @@ jobs:
with:
node-version: '16'
- name: Package
run: bash ./source/nebula-graph-studio/scripts/pack.sh ${{ secrets.ga_id }} ${{ matrix.os }}
run: bash ./source/nebula-graph-studio/scripts/pack.sh ${{ secrets.ga_id }} ${{ secrets.clarity_id }} ${{ matrix.os }}
- name: Upload to OSS
run: bash ./source/nebula-graph-studio/scripts/upload.sh ${{ secrets.oss_endpoint }} ${{ secrets.oss_id }} ${{ secrets.oss_secret }} ${{ secrets.oss_url }} ${{ matrix.os }}
1 change: 1 addition & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
oss_secret: ${{ secrets.OSS_SECRET }}
oss_url: ${{ secrets.OSS_TEST_URL }}
ga_id: ${{ secrets.GA_ID }}
clarity_id: ${{ secrets.CLARITY_ID }}
docker-image:
name: docker image build
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
oss_secret: ${{ secrets.OSS_SECRET }}
oss_url: ${{ secrets.OSS_URL }}
ga_id: ${{ secrets.GA_ID }}
clarity_id: ${{ secrets.CLARITY_ID }}
docker-image:
name: docker image build
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions scripts/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ DIR=`pwd`
STUDIO=$DIR/source/nebula-graph-studio

cd $STUDIO
bash ./scripts/build.sh $1
bash ./scripts/build.sh $1 $2
cd $DIR
case $2 in
case $3 in
centos7)
bash $STUDIO/scripts/pack_CentOS.sh
;;
Expand Down
2 changes: 1 addition & 1 deletion scripts/setEventTracking.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sed -i "s~<!-- Global Event Tracking -->~<script async src='https://www.googletagmanager.com/gtag/js?id=$1'></script>\n<script>\nwindow.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', '$1');\n</script>\n<script type='text/javascript'>(function(c,l,a,r,i,t,y){c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};t=l.createElement(r);t.async=1;t.src='https://www.clarity.ms/tag/'+i;y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);})(window, document, 'clarity', 'script', '$2');</script>~g" ./app/index.html
sed -i "s~<!-- Global Event Tracking -->~<script async src='https://www.googletagmanager.com/gtag/js?id=$1'></script>\n<script>\nwindow.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', '$1');\n</script>\n<script type='text/javascript'>\n(function(c,l,a,r,i,t,y){c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\nt=l.createElement(r);\nt.async=1;\nt.src='https://www.clarity.ms/tag/'+i;\ny=l.getElementsByTagName(r)[0];\ny.parentNode.insertBefore(t,y);\n})(window, document, 'clarity', 'script', '$2');\n</script>~g" ./app/index.html

0 comments on commit 03f8820

Please sign in to comment.