Skip to content

Commit

Permalink
Minor update v8.2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoudkooi committed Nov 11, 2024
1 parent 547f87b commit ee43119
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG.md

## 8.2.5.1 (2024-11-11)
Fixes / changes:
- Updates to the package script publish.sh, goal is to prevent renaming of the tsWorker.js file.

## 8.2.5.0 (2024-11-09)
Features:
- Add /sns command to open the new ServiceNow Studio (LinkedIn post #philgoesdeep)
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"short_name": "SN Utils",
"description": "Productivity tools for ServiceNow. (Personal work, not affiliated to ServiceNow)",
"author": "Arnoud Kooi / arnoudkooi.com",
"version": "8.2.5.0",
"version": "8.2.5.1",
"manifest_version": 3,
"permissions": [
"activeTab",
Expand Down
38 changes: 20 additions & 18 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
#!/bin/bash

networksetup -setairportpower en0 off #disable wifi while packaging, to prevent iCloud sync issues

rm -f publish/*.zip
rm -f publish/*.xpi
var=$(sed '6!d' manifest.json) #get version from main manifest.json (content of line 6)
sed -i '' "6s/.*/$var/" publish/manifest-firefox.json #sync version to other
sed -i '' "6s/.*/$var/" publish/manifest-onprem.json
sed -i '' "6s/.*/$var/" publish/manifest-firefox-onprem.json
sed -i '' "6s/.*/$var/" publish/manifest-edge.json
zip -r publish/chrome-snutils.zip . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
zip -r publish/snutils-chrome-base.zip . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
mv manifest.json publish/manifest-chrome.json
mv publish/manifest-firefox.json manifest.json
mv js/monaco/vs/language/typescript/tsWorker.js publish/tsWorker.js
mv publish/tsWorkerFF.js js/monaco/vs/language/typescript/tsWorker.js
zip -r publish/firefox-snutils.xpi . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
echo "1th"
mv js/monaco/vs/language/typescript/tsWorker.js publish/tsWorkerFF.js
mv publish/tsWorker.js js/monaco/vs/language/typescript/tsWorker.js
mv manifest.json publish/manifest-firefox.json

mv publish/manifest-edge.json manifest.json
zip -r publish/edge-snutils.zip . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
mv manifest.json publish/manifest-edge.json

sed -i '' "1s/.*/var onprem = true;/" background.js
mv publish/manifest-onprem.json manifest.json
zip -r publish/onprem-snutils.zip . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
zip -r publish/snutils-chrome-onprem.zip . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
mv manifest.json publish/manifest-onprem.json

mv publish/manifest-firefox-onprem.json manifest.json
mv publish/manifest-firefox.json manifest.json
mv js/monaco/vs/language/typescript/tsWorker.js publish/tsWorker.js
mv publish/tsWorkerFF.js js/monaco/vs/language/typescript/tsWorker.js
zip -r publish/onprem-firefox-snutils.xpi . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
echo "2nd"
zip -r publish/snutils-firefox-base.xpi . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
mv manifest.json publish/manifest-firefox.json

mv publish/manifest-firefox-onprem.json manifest.json
zip -r publish/snutils-firefox-onprem.xpi . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
mv js/monaco/vs/language/typescript/tsWorker.js publish/tsWorkerFF.js
mv publish/tsWorker.js js/monaco/vs/language/typescript/tsWorker.js
mv manifest.json publish/manifest-firefox-onprem.json

mv publish/manifest-edge.json manifest.json
zip -r publish/snutils-edge-base.zip . -x "*.DS_Store" -x "*.git*" -x ".jshintrc" -x ".docx" -x "*.sh" -x "*.md" -x "*publish*"
mv manifest.json publish/manifest-edge.json

mv publish/manifest-chrome.json manifest.json
sed -i '' "1s/.*/var onprem = false;/" background.js
var=' "version": "0.0.0.0",'
Expand All @@ -45,7 +43,11 @@ sed -i '' "6s/.*/$var/" publish/manifest-edge.json

#publishing same version# to Chrome is a pain, adding a check..
currentversion=$(sed '6!d' manifest.json) #get version from main manifest.json (content of line 6)
lastpublishedversion=`cat publish/lastpublishedversion.txt`
lastpublishedversion=`cat publish/lastpublishedversion.txt`

networksetup -setairportpower en0 on
sleep 6

if [ "$lastpublishedversion" = "$currentversion" ]; then
echo "Can not publish, version not updated in manifest.json: $currentversion"
else
Expand Down

0 comments on commit ee43119

Please sign in to comment.