diff --git a/appveyor.yml b/appveyor.yml index cd68770..5e9e8bd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,15 +24,29 @@ environment: test_script: - sh: | + mkdir /lib64 ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 chmod -R 777 /appveyor/projects npm install npm test npm run test:integration +deploy_script: + - sh | + CURR_VER=$(npm view package.json version) + if curl -s -X GET -H "token: $deploytoken" https://git.nfp.is/api/v1/repos/$APPVEYOR_REPO_NAME/releases | grep -o "\"name\"\:\"v${CURR_VER}\"" > /dev/null; then + echo "Release already exists, nothing to do."; + else + ./test/7zas a -mx9 "${CURR_VER}_sc-core.7z" package.json index.mjs cli.mjs core bin + + fi + + on_finish: - sh: | - apk update - apk add bash curl openssh - - sh: export APPVEYOR_SSH_BLOCK=true - - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e - + YELLOW='\033[0;33m' + NC='\033[0m' + LOCK_FILE="${HOME}/build.lock" + export APPVEYOR_SSH_BLOCK=true + touch "${LOCK_FILE}" + echo -e "Build paused. To resume it, open a bash session to run '${YELLOW}rm \"${LOCK_FILE}\"${NC}' command." diff --git a/core/util.mjs b/core/util.mjs index 02b6f41..d9aedf3 100644 --- a/core/util.mjs +++ b/core/util.mjs @@ -191,7 +191,7 @@ export default class Util { execSync('taskkill /pid ' + processor.pid + ' /T /F') } catch {} }else{ - processor.kill(); + processor._kill(); } } return processor diff --git a/package.json b/package.json index 1289f4f..4106721 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "service-core", - "version": "2.0.2", + "version": "3.0.0-beta.1", "description": "Core boiler plate code to install node server as windows service", - "main": "lib.mjs", + "main": "index.mjs", "scripts": { "dev": "nodemon --watch dev/api --watch core --watch runner.mjs --watch db.mjs --watch log.mjs runner.mjs | bunyan", "test": "eltro \"test/**/*.test.mjs\" -r dot", @@ -27,14 +27,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/TheThing/service-core.git" + "url": "git+https://git.nfp.is/TheThing/service-core.git" }, "author": "Jonatan Nilsson", "license": "WTFPL", "bugs": { - "url": "https://github.com/TheThing/service-core/issues" + "url": "https://git.nfp.is/TheThing/service-core/issues" }, - "homepage": "https://github.com/TheThing/service-core#readme", + "homepage": "https://git.nfp.is/TheThing/service-core#readme", "files": [ "index.mjs", "cli.mjs",