Skip to content

Commit 3a110a9

Browse files
authored
Deploy to dev instead of prod
1 parent d285759 commit 3a110a9

File tree

9 files changed

+522
-46
lines changed

9 files changed

+522
-46
lines changed

.github/workflows/deploy.yaml

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: Deploy to Production
1+
# name: Deploy to Production
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
workflow_dispatch:
3+
# on:
4+
# push:
5+
# branches:
6+
# - master
7+
# workflow_dispatch:
88

9-
jobs:
10-
deploy:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@master
9+
# jobs:
10+
# deploy:
11+
# runs-on: ubuntu-latest
12+
# steps:
13+
# - uses: actions/checkout@master
1414

15-
- name: Merge dev branch
16-
uses: devmasx/[email protected]
17-
with:
18-
type: now
19-
from_branch: develop
20-
target_branch: master
21-
github_token: ${{ github.token }}
15+
# - name: Merge dev branch
16+
# uses: devmasx/[email protected]
17+
# with:
18+
# type: now
19+
# from_branch: develop
20+
# target_branch: master
21+
# github_token: ${{ github.token }}

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ format: .gitignore node_modules
4646
.pull:
4747
@git stash
4848
@git reset --hard HEAD
49-
@git checkout master
49+
@git checkout develop
5050
@git fetch --all
5151
@git pull
5252
@cd controller; npm install;

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Kanatran
22
[![Build Runner](https://github.com/LiveTL/kanatran/actions/workflows/build_runner.yaml/badge.svg)](https://github.com/LiveTL/kanatran/actions/workflows/build_runner.yaml)
33
[![Build Watcher](https://github.com/LiveTL/kanatran/actions/workflows/build_watcher.yaml/badge.svg)](https://github.com/LiveTL/kanatran/actions/workflows/build_watcher.yaml)
4-
[![Deploy to Production](https://github.com/LiveTL/kanatran/actions/workflows/deploy.yaml/badge.svg)](https://github.com/LiveTL/kanatran/actions/workflows/deploy.yaml)
4+
<!-- [![Deploy to Production](https://github.com/LiveTL/kanatran/actions/workflows/deploy.yaml/badge.svg)](https://github.com/LiveTL/kanatran/actions/workflows/deploy.yaml) -->
55

66
## Usage
77

controller/src/index.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function runQueue() {
4848
id: item,
4949
streamId: queue.top.data
5050
}));
51-
sockets[item].runningContainers[queue.top.data] = false;
51+
sockets[item].runningContainers[queue.top.data] = { playing: false };
5252
console.log(`Requesting to play ${queue.top.data} on ${item}`);
5353
// sockets[item].locked = true;
5454
queue.pop();
@@ -74,7 +74,7 @@ app.post('/stream', (req, res) => {
7474
app.post('/github', (req, res) => {
7575
res.status(200);
7676
res.end();
77-
if (req.body.ref === 'refs/heads/master' ) {
77+
if (req.body.ref === 'refs/heads/develop' ) {
7878
console.log('Pulling new changes and rebooting if neccessary...');
7979
exec('cd ..; make update &').stdout.pipe(process.stdout);
8080
}
@@ -93,7 +93,7 @@ wsServer.on('connection', (socket) => {
9393
switch (data.event){
9494
case 'status': {
9595
if (data.playing) {
96-
sockets[socket.id].runningContainers[data.video] = true;
96+
sockets[socket.id].runningContainers[data.video] = { playing: true };
9797
console.log(
9898
`${data.video} is ${data.alreadyPlaying ? 'already ' : ''}playing on ${socket.id}`
9999
);
@@ -119,6 +119,10 @@ wsServer.on('connection', (socket) => {
119119
sockets[socket.id].relativeLoad = data.relativeLoad;
120120
updateLog();
121121
break;
122+
} case 'timestamp': {
123+
sockets[socket.id].runningContainers[data.video].playBegin = data.playBegin;
124+
updateLog();
125+
break;
122126
}
123127
}
124128
});

controller/src/versionValidation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const serverVersion = '1.1.0';
1+
const serverVersion = '1.2.0';
22

33
// dynamic validation in case a range of versions are supported
44
const serverVersionSplit = serverVersion.split('.').map(d => parseInt(d));

0 commit comments

Comments
 (0)