Skip to content

Commit

Permalink
Dev 1.0.17-dev.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed Sep 30, 2024
1 parent c178eb2 commit cc22fb1
Show file tree
Hide file tree
Showing 5 changed files with 695 additions and 180 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/build-matterbridge-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Clean cache
run: npm cache clean --force

- name: Install latest npm
run: npm install -g npm@latest

- name: Verify Node.js version
run: node -v

- name: Verify Npm version
run: npm -v

- name: Install matterbridge
run: npm install -g matterbridge
run: npm install -g matterbridge --omit=dev

- name: Install dependencies
run: npm install
run: npm ci

- name: Link matterbridge
run: npm link matterbridge

- name: Lint the project
run: npm run lint

Expand All @@ -42,14 +51,3 @@ jobs:
- name: Build the project
run: npm run build

# - name: List, audit, fix outdated dependencies and build again
# run: |
# npm uninstall matterbridge
# npm list --outdated
# npm audit || true # ignore failures
# npm audit fix || true
# npm list --outdated
# npm install -g matterbridge
# npm install
# npm run build

13 changes: 11 additions & 2 deletions .github/workflows/publish-matterbridge-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,27 @@ jobs:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Clean cache
run: npm cache clean --force

- name: Install latest npm
run: npm install -g npm@latest

- name: Verify Node.js version
run: node -v

- name: Verify Npm version
run: npm -v

- name: Install matterbridge
run: npm install -g matterbridge
run: npm install -g matterbridge --omit=dev

- name: Install dependencies
run: npm install
run: npm ci

- name: Link matterbridge
run: npm link matterbridge

- name: Lint the project
run: npm run lint

Expand Down
16 changes: 1 addition & 15 deletions link-matterbridge-script.js
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
/* eslint-disable no-console */
import { exec } from 'child_process';

const command = process.platform === 'win32' ? 'npm link matterbridge' : 'sudo npm link matterbridge';

exec(command, (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.log(`stdout: ${stdout}`);
if (stderr) {
console.error(`stderr: ${stderr}`);
}
});
// Nothing to do in production, just a script to link the matterbridge package in development
Loading

0 comments on commit cc22fb1

Please sign in to comment.