mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-25 18:37:19 +00:00
remove pre 4.0 stuff
This commit is contained in:
parent
223d39ff3f
commit
efee0cd46f
7 changed files with 87 additions and 108 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,9 +1,6 @@
|
|||
# MAKE SURE ALL ADDITIONS HERE ARE MIRRORED INTO THE .npmignore AS WELL
|
||||
*.node
|
||||
.DS_Store
|
||||
build/
|
||||
node_modules
|
||||
npm-debug.log
|
||||
gyp-mac-tool
|
||||
.node_pre_gyprc
|
||||
coverage
|
||||
.mailmap
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@ PUBLISHING.md
|
|||
test/
|
||||
UPGRADE_GUIDE.md
|
||||
changelog.md
|
||||
.DS_Store
|
||||
|
||||
# MIRRORED FROM .gitignore PLEASE MAINTAIN
|
||||
*.node
|
||||
.DS_Store
|
||||
build/
|
||||
node_modules
|
||||
npm-debug.log
|
||||
gyp-mac-tool
|
||||
.node_pre_gyprc
|
||||
/.idea
|
||||
coverage
|
||||
.mailmap
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ install:
|
|||
|
||||
script:
|
||||
# linting no longer works on node 0.10
|
||||
- node bin/lower-than-node-4.0.js || npm run lint
|
||||
- npm run lint
|
||||
- npm run docs:diff
|
||||
- >
|
||||
if [[ -z $TRAVIS_ELECTRON_VERSION ]]; then
|
||||
|
|
|
|||
168
appveyor.yml
168
appveyor.yml
|
|
@ -13,111 +13,105 @@ environment:
|
|||
nodejs_version: "6"
|
||||
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
- x86
|
||||
- x64
|
||||
|
||||
install:
|
||||
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform;
|
||||
- ps: $env:Path += ";$(pwd)\node_modules\.bin";
|
||||
- ps: >
|
||||
@{
|
||||
"nodejs_version" = $env:nodejs_version
|
||||
"platform" = $env:platform
|
||||
"node binary version" = $(node -v)
|
||||
"node platform@arch" = $(node -p 'process.platform + process.arch')
|
||||
"npm version" = $(npm -v)
|
||||
"APPVEYOR_REPO_COMMIT_MESSAGE" = $env:APPVEYOR_REPO_COMMIT_MESSAGE
|
||||
"git latest tag" = "$(git describe --tags --always HEAD)"
|
||||
"appveyor_repo_tag" = $env:appveyor_repo_tag
|
||||
"electron_version" = $env:electron_version
|
||||
} | Out-String | Write-Host;
|
||||
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform;
|
||||
- ps: $env:Path += ";$(pwd)\node_modules\.bin";
|
||||
- ps: >
|
||||
@{
|
||||
"nodejs_version" = $env:nodejs_version
|
||||
"platform" = $env:platform
|
||||
"node binary version" = $(node -v)
|
||||
"node platform@arch" = $(node -p 'process.platform + process.arch')
|
||||
"npm version" = $(npm -v)
|
||||
"APPVEYOR_REPO_COMMIT_MESSAGE" = $env:APPVEYOR_REPO_COMMIT_MESSAGE
|
||||
"git latest tag" = "$(git describe --tags --always HEAD)"
|
||||
"appveyor_repo_tag" = $env:appveyor_repo_tag
|
||||
"electron_version" = $env:electron_version
|
||||
} | Out-String | Write-Host;
|
||||
|
||||
# work around bug in npm 2.15.1 where checksums were coming back bad (node 0.12)
|
||||
- ps: >
|
||||
if ($(npm -v) -eq "2.15.1") {
|
||||
npm install -g npm@3 | Write-Host;
|
||||
}
|
||||
npm -v | Write-Host;
|
||||
# work around bug in npm 2.15.1 where checksums were coming back bad (node 0.12)
|
||||
- ps: >
|
||||
if ($(npm -v) -eq "2.15.1") {
|
||||
npm install -g npm@3 | Write-Host;
|
||||
}
|
||||
npm -v | Write-Host;
|
||||
|
||||
# work around an issue with node-gyp v3.3.1 and node 4x
|
||||
# package.json has no certificates in it so we're cool
|
||||
# https://github.com/nodejs/node-gyp/issues/921
|
||||
- ps: npm config set -g cafile=package.json | Write-Host;
|
||||
- ps: npm config set -g strict-ssl=false | Write-Host;
|
||||
# work around an issue with node-gyp v3.3.1 and node 4x
|
||||
# package.json has no certificates in it so we're cool
|
||||
# https://github.com/nodejs/node-gyp/issues/921
|
||||
- ps: npm config set -g cafile=package.json | Write-Host;
|
||||
- ps: npm config set -g strict-ssl=false | Write-Host;
|
||||
|
||||
# Check if we're building the latest tag, if so
|
||||
# then we publish the binaries if tests pass.
|
||||
- ps: >
|
||||
if ($env:appveyor_repo_tag -match "true" -and ("$(git describe --tags --always HEAD)" -eq $env:appveyor_repo_tag_name)) {
|
||||
$env:publish_binary = 1;
|
||||
# Check if we're building the latest tag, if so
|
||||
# then we publish the binaries if tests pass.
|
||||
- ps: >
|
||||
if ($env:appveyor_repo_tag -match "true" -and ("$(git describe --tags --always HEAD)" -eq $env:appveyor_repo_tag_name)) {
|
||||
$env:publish_binary = 1;
|
||||
} else {
|
||||
$env:publish_binary = 0;
|
||||
}
|
||||
true;
|
||||
|
||||
- ps: >
|
||||
if ($env:publish_binary -eq 1) {
|
||||
"We're publishing a binary!" | Write-Host
|
||||
} else {
|
||||
"We're not publishing a binary" | Write-Host
|
||||
}
|
||||
true;
|
||||
|
||||
# Cleanup the output of npm
|
||||
- ps: >
|
||||
npm config set progress false
|
||||
npm config set spin false
|
||||
|
||||
# We don't currently have a port to test on windows
|
||||
# - ps: $env:TEST_PORT = "COM1";
|
||||
|
||||
# Setup Electron variables
|
||||
- ps: >
|
||||
if ($env:electron_version) {
|
||||
"We're an electron build, setup variables" | Write-Host
|
||||
$env:npm_config_target = $env:electron_version
|
||||
$env:npm_config_disturl = "https://atom.io/download/atom-shell"
|
||||
$env:npm_config_runtime = "electron"
|
||||
|
||||
if ($env:plaftorm -eq "x86") {
|
||||
$env:npm_config_arch = "ia32"
|
||||
} else {
|
||||
$env:publish_binary = 0;
|
||||
$env:npm_config_arch = "x64"
|
||||
}
|
||||
true;
|
||||
|
||||
- ps: >
|
||||
if ($env:publish_binary -eq 1) {
|
||||
"We're publishing a binary!" | Write-Host
|
||||
} else {
|
||||
"We're not publishing a binary" | Write-Host
|
||||
}
|
||||
true;
|
||||
"Install electron and electron-mocha" | Write-Host
|
||||
|
||||
# Cleanup the output of npm
|
||||
- ps: >
|
||||
npm config set progress false
|
||||
npm config set spin false
|
||||
|
||||
# We don't currently have a port to test on windows
|
||||
# - ps: $env:TEST_PORT = "COM1";
|
||||
|
||||
# Setup Electron variables
|
||||
- ps: >
|
||||
if ($env:electron_version) {
|
||||
"We're an electron build, setup variables" | Write-Host
|
||||
$env:npm_config_target = $env:electron_version
|
||||
$env:npm_config_disturl = "https://atom.io/download/atom-shell"
|
||||
$env:npm_config_runtime = "electron"
|
||||
|
||||
if ($env:plaftorm -eq "x86") {
|
||||
$env:npm_config_arch = "ia32"
|
||||
} else {
|
||||
$env:npm_config_arch = "x64"
|
||||
}
|
||||
|
||||
"Install electron and electron-mocha" | Write-Host
|
||||
|
||||
npm install -g electron@$env:electron_version
|
||||
npm install electron-mocha
|
||||
}
|
||||
true;
|
||||
npm install -g electron@$env:electron_version
|
||||
npm install electron-mocha
|
||||
}
|
||||
true;
|
||||
|
||||
build_script:
|
||||
- npm install --build-from-source --msvs_version=2013
|
||||
- npm install --build-from-source --msvs_version=2013
|
||||
|
||||
test_script:
|
||||
- ps: >
|
||||
if (node bin/at-least-node-4.0.js) {
|
||||
npm run lint;
|
||||
} else {
|
||||
"Not linting because the linter doesn't run on this version of node" | Write-Host
|
||||
true;
|
||||
}
|
||||
- ps: npm run lint
|
||||
|
||||
# If we run npm test in powershell it'll have the wrong encoding
|
||||
# so we have to do it like this
|
||||
# If we run npm test in powershell it'll have the wrong encoding
|
||||
# so we have to do it like this
|
||||
|
||||
- IF DEFINED electron_version (electron test/electron)
|
||||
- IF NOT DEFINED electron_version (node ./)
|
||||
- IF NOT DEFINED electron_version (npm test)
|
||||
- IF DEFINED electron_version (electron test/electron)
|
||||
- IF NOT DEFINED electron_version (node ./)
|
||||
- IF NOT DEFINED electron_version (npm test)
|
||||
|
||||
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp package 2>&1)
|
||||
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp-github publish --release 2>&1)
|
||||
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp clean)
|
||||
- IF %PUBLISH_BINARY% == 1 (npm install --fallback-to-build=false)
|
||||
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp package 2>&1)
|
||||
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp-github publish --release 2>&1)
|
||||
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp clean)
|
||||
- IF %PUBLISH_BINARY% == 1 (npm install --fallback-to-build=false)
|
||||
|
||||
after_test:
|
||||
- pip install codecov && codecov
|
||||
- pip install codecov && codecov
|
||||
|
||||
deploy: OFF
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
if (process.versions.node.split('.')[0] < 4) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
if (process.versions.node.split('.')[0] >= 4) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
@ -7,7 +7,8 @@ try {
|
|||
} catch (e) {
|
||||
console.error('Error loading serialport');
|
||||
console.error(e);
|
||||
console.error(e.stack);
|
||||
app.exit(-1);
|
||||
}
|
||||
|
||||
app.quit();
|
||||
app.quit();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue