runner: Fix logging slightly, add circleci

This commit is contained in:
Jonatan Nilsson 2020-09-12 20:39:34 +00:00
parent 8952c93f2c
commit f29f12a63e
3 changed files with 36 additions and 0 deletions

33
.circleci/config.yml Normal file
View File

@ -0,0 +1,33 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:latest
working_directory: ~/app
steps:
- checkout
- run:
name: Install npm deployment app
command: sudo npm install -g github-release-cli
- run:
name: Check if this is a new release
command: |
echo test
- 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
- deploy:
name: Create a release
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-core.zip" runner.mjs package.json service/* core/**/* core/*
workflows:
version: 2
build_deploy:
jobs:
- build:
context: github-thething

View File

@ -41,12 +41,14 @@ lowdb(util, log).then(async function(db) {
try {
await core.start('app')
} catch (err) {
log.event.error('Unable to start app: ' + err.message)
log.error(err, 'Unable to start app')
errors++
}
try {
await core.start('manage')
} catch (err) {
log.event.error('Unable to start manage: ' + err.message)
log.error(err, 'Unable to start manage')
errors++
}

View File

@ -1 +1,2 @@
node service\uninstall.mjs
PAUSE