Skip to content

Commit

Permalink
Test build trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Feb 29, 2024
1 parent 7b49457 commit 83cde08
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ jobs:
fs.readFile('./static/manifest.json', 'utf8').then(data => {
const manifest = JSON.parse(data);
const currentVersion = manifest.version;
fetch(`https://chrome.google.com/webstore/detail/${{ secrets.CHROME_CLIENT_ID }}?hl=en`).then(response => {
response.text().then(text => {
const match = text.match(/"version": "(\d+\.\d+\.\d+)"/);
const latestVersion = match ? match[1] : null;
if (currentVersion === latestVersion) {
core.setOutput('abort', 'true');
} else {
core.setOutput('abort', 'false');
}
fetch(`https://chromewebstore.google.com/detail/holo-key-manager/${{ secrets.CHROME_ID }}`)
.then(response => response.text())
.then(text => {
const versionPattern = /<div[^>]*>Version<\/div><div[^>]*>(\d+\.\d+\.\d+)<\/div>/;
const versionMatch = text.match(versionPattern);
const latestVersion = versionMatch ? versionMatch[1] : null;
core.setOutput('abort', currentVersion === latestVersion ? 'true' : 'false');
});
- name: Abort build if version matches
if: steps.check_version.outputs.abort == 'true'
run: |
Expand Down
3 changes: 2 additions & 1 deletion holo-key-manager-js-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prebuild": "node prebuild.cjs",
"buildPack": "npm run prebuild && tsc && npm pack"
"buildPack": "npm run prebuild && tsc && npm pack",
"packDev": "tsc && npm pack"
},
"keywords": [
"holo",
Expand Down

0 comments on commit 83cde08

Please sign in to comment.