9 Commits

Author SHA1 Message Date
bfba6e47d1 Fixing pipeline
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-30 12:21:23 -05:00
28abf136b7 Updating to use gitea for npm registry
All checks were successful
continuous-integration/drone Build is passing
2023-01-27 16:17:58 -06:00
ed652b2f76 Updating drone
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-06 09:04:46 -05:00
0846a72931 Update
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-07 16:50:16 -05:00
f1d1da0945 Adding step to remove old packages
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-07 16:48:45 -05:00
76438d6811 Separating restart step
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-07 16:38:49 -05:00
7971fd3ec1 Updating deployment step
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-07 16:22:38 -05:00
3fe902c50b Adding deploy step
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-07 16:16:15 -05:00
52a259dafd Fixing restart issue
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-04 13:24:54 -05:00
4 changed files with 78 additions and 19 deletions

View File

@ -5,6 +5,9 @@ name: default
clone: clone:
disable: true disable: true
node:
lan: internal
steps: steps:
- name: clone - name: clone
image: alpine/git image: alpine/git
@ -34,14 +37,14 @@ steps:
- master - master
- name: publish pre - name: publish pre
image: plugins/npm image: node
settings: environment:
username: token:
from_secret: npm_username from_secret: npm_token
password: commands:
from_secret: npm_password - npm config set @watsonb8:registry https://gitea.watsonlabs.net/api/packages/watsonb8/npm/
email: brandon@watsonlabs.net - npm config set -- '//gitea.watsonlabs.net/api/packages/watsonb8/npm/:_authToken' "$token"
registry: "http://10.44.1.6:4873/" - npm publish
when: when:
event: event:
exclude: exclude:
@ -52,14 +55,70 @@ steps:
- master - master
- name: publish tagged version - name: publish tagged version
image: plugins/npm image: node
environment:
token:
from_secret: npm_token
commands:
- npm config set @watsonb8:registry https://gitea.watsonlabs.net/api/packages/watsonb8/npm/
- npm config set -- '//gitea.watsonlabs.net/api/packages/watsonb8/npm/:_authToken' "$token"
- npm publish
when:
event:
- tag
exclude:
- pull_request
- name: remove old package
image: appleboy/drone-ssh
environment:
SSH_USER:
from_secret: ssh_user
settings: settings:
host: homebridge.me
envs:
- SSH_USER
username: username:
from_secret: npm_username from_secret: ssh_user
password: key:
from_secret: npm_password from_secret: ssh_key
email: brandon@watsonlabs.net port: 22
registry: "http://10.44.1.6:4873/" script:
- rm -r /home/$SSH_USER/.npm-global/lib/node_modules/@watsonb8/homebridge-harmony-control || true
when:
event:
- tag
exclude:
- pull_request
- name: deploy
image: appleboy/drone-ssh
settings:
host: homebridge.me
username:
from_secret: ssh_user
key:
from_secret: ssh_key
port: 22
script:
- npm install -g @watsonb8/homebridge-harmony-control
when:
event:
- tag
exclude:
- pull_request
- name: restart homebridge
image: appleboy/drone-ssh
settings:
host: homebridge.me
username:
from_secret: elevated_ssh_user
key:
from_secret: ssh_key
port: 22
script:
- systemctl restart homebridge
when: when:
event: event:
- tag - tag

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@watsonb8/homebridge-harmony-control", "name": "@watsonb8/homebridge-harmony-control",
"version": "1.2.1", "version": "1.2.3",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,10 +1,10 @@
{ {
"name": "@watsonb8/homebridge-harmony-control", "name": "@watsonb8/homebridge-harmony-control",
"version": "1.2.1", "version": "1.3.0",
"description": "Homebridge platform to control smart home equipment by room.", "description": "Homebridge platform to control smart home equipment by room.",
"main": "bin/index.js", "main": "bin/index.js",
"publishConfig": { "publishConfig": {
"registry": "http://10.44.1.6:4873/" "registry": "https://gitea.watsonlabs.net"
}, },
"scripts": { "scripts": {
"build": "tsc --build", "build": "tsc --build",
@ -44,4 +44,4 @@
"request": "^2.88.0", "request": "^2.88.0",
"tsyringe": "^4.6.0" "tsyringe": "^4.6.0"
} }
} }

View File

@ -117,7 +117,7 @@ export class ActivityService {
let currentOtherState: IActivityState = let currentOtherState: IActivityState =
this._stateDataProvider.states[controlUnitKey]!; this._stateDataProvider.states[controlUnitKey]!;
if (!currentOtherState) { if (!currentOtherState || !currentOtherState.currentActivity) {
return devicesToTurnOn; return devicesToTurnOn;
} }