Fix some bug in build. Also intentionally create bad build
This commit is contained in:
parent
ba12f8f59e
commit
13c2d3ac1a
5 changed files with 42 additions and 4 deletions
|
@ -6,6 +6,11 @@ jobs:
|
|||
working_directory: ~/app
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Get current git commit message
|
||||
command: |
|
||||
echo "export COMMIT_MESSAGE=\"$(git log --format=oneline -n 1 $CIRCLE_SHA1)\"" >> $BASH_ENV
|
||||
source $BASH_ENV
|
||||
- run:
|
||||
name: Install npm deployment app
|
||||
command: sudo npm install -g github-release-cli
|
||||
|
@ -19,7 +24,7 @@ jobs:
|
|||
command: |
|
||||
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
|
||||
echo "Packaging to ${CIRCLE_PROJECT_REPONAME}_build-sc.zip"
|
||||
zip "${CIRCLE_PROJECT_REPONAME}_build-sc.zip" index.mjs package.json public api/**
|
||||
zip "${CIRCLE_PROJECT_REPONAME}_build-sc.zip" index.mjs package.json api/**/*
|
||||
echo "Creating release '${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}'"
|
||||
github-release upload \
|
||||
--commitish $CIRCLE_SHA1 \
|
||||
|
@ -28,7 +33,7 @@ jobs:
|
|||
--repo $CIRCLE_PROJECT_REPONAME \
|
||||
--tag "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \
|
||||
--name "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \
|
||||
--body "Automatic CircleCI Build of v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM} from ${CIRCLE_SHA1}" \
|
||||
--body "Automatic CircleCI Build of v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM} from ${CIRCLE_SHA1}: ${COMMIT_MESSAGE}" \
|
||||
"${CIRCLE_PROJECT_REPONAME}_build-sc.zip"
|
||||
|
||||
workflows:
|
||||
|
|
|
@ -17,4 +17,10 @@ export default function coremonitor(io, config, db, log, core) {
|
|||
logs: app.logs,
|
||||
})
|
||||
}))
|
||||
core.on('managelog', safeWrap(log, 'coremonitor.on.managelog', function(manage) {
|
||||
io.to('core.manage').emit('core.program.log', {
|
||||
name: 'manage',
|
||||
logs: manage.logs,
|
||||
})
|
||||
}))
|
||||
}
|
|
@ -120,6 +120,19 @@ export async function listentoapp(ctx) {
|
|||
})
|
||||
}
|
||||
|
||||
/*
|
||||
* Event: 'core.listentomanage'
|
||||
*
|
||||
* Start listening to changes in core manage
|
||||
*/
|
||||
export async function listentomanage(ctx) {
|
||||
ctx.socket.join('core.manage')
|
||||
ctx.socket.emit('core.program.log', {
|
||||
name: 'manage',
|
||||
logs: ctx.core.getProgramLogs('manage')
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
* Event: 'core.unlistentoapp'
|
||||
*
|
||||
|
@ -128,3 +141,12 @@ export async function listentoapp(ctx) {
|
|||
export async function unlistentoapp(ctx) {
|
||||
ctx.socket.leave('core.app')
|
||||
}
|
||||
|
||||
/*
|
||||
* Event: 'core.unlistentomanage'
|
||||
*
|
||||
* Stop listening to new log lines
|
||||
*/
|
||||
export async function unlistentomanage(ctx) {
|
||||
ctx.socket.leave('core.manage')
|
||||
}
|
||||
|
|
|
@ -80,7 +80,11 @@ const Updater = Module({
|
|||
loadAppData() {
|
||||
this.updateActiveDb()
|
||||
if (this.activeApp === 'app') {
|
||||
socket.emit('core.unlistentomanage', {})
|
||||
socket.emit('core.listentoapp', {})
|
||||
} else {
|
||||
socket.emit('core.unlistentoapp', {})
|
||||
socket.emit('core.listentomanage', {})
|
||||
}
|
||||
/* request to listen to app updates */
|
||||
},
|
||||
|
@ -88,6 +92,7 @@ const Updater = Module({
|
|||
remove: function() {
|
||||
socket.emit('core.unlistencore', {})
|
||||
socket.emit('core.unlistentoapp', {})
|
||||
socket.emit('core.unlistentomanage', {})
|
||||
},
|
||||
|
||||
startUpdate: function() {
|
||||
|
@ -113,7 +118,7 @@ const Updater = Module({
|
|||
href: '/updater/app',
|
||||
}, 'Update App'),
|
||||
m(m.route.Link, {
|
||||
hidden: this.manageRepository,
|
||||
hidden: !this.manageRepository,
|
||||
class: 'button' + (this.activeApp === 'manage' ? ' active' : ''),
|
||||
href: '/updater/manage',
|
||||
}, 'Update Manager'),
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"managePort": 4271,
|
||||
"devPort": 4269,
|
||||
"appRepository": "thething/sc-helloworld",
|
||||
"manageRepository": null
|
||||
"manageRepository": "TheThing/sc-manager"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue