mirror of
https://github.com/fuse-friends/fuse-native
synced 2024-10-27 18:34:01 +00:00
try to add travis file
This commit is contained in:
parent
65e819f84e
commit
34b158fa43
32
.travis.yml
Normal file
32
.travis.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
language: node_js
|
||||||
|
|
||||||
|
node_js:
|
||||||
|
- node
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-4.8
|
||||||
|
- gcc-4.8-multilib
|
||||||
|
- g++-4.8-multilib
|
||||||
|
- gcc-multilib
|
||||||
|
- g++-multilib
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then cinst -y python2; fi
|
||||||
|
|
||||||
|
after_install:
|
||||||
|
- sudo ./bin.js configure
|
||||||
|
|
||||||
|
before_deploy:
|
||||||
|
- ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$TRAVIS_OS_NAME.tar"
|
||||||
|
- npm run prebuild
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then PREBUILD_ARCH=ia32 npm run prebuild; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then PREBUILD_ARCH=ia32 npm run prebuild; fi
|
||||||
|
- cd prebuilds && tar cvf "../$ARCHIVE_NAME" . && cd ..
|
20
bin.js
Executable file
20
bin.js
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const Fuse = require('./')
|
||||||
|
const cmd = process.argv[2]
|
||||||
|
|
||||||
|
if (cmd === 'configure') {
|
||||||
|
Fuse.configure(onerror)
|
||||||
|
} else if (cmd === 'unconfigure') {
|
||||||
|
Fuse.unconfigure(onerror)
|
||||||
|
} else if (cmd === 'is-configured') {
|
||||||
|
Fuse.isConfigured(function (err, bool) {
|
||||||
|
if (err) return onerror(err)
|
||||||
|
console.log('' + bool)
|
||||||
|
process.exit(bool ? 0 : 1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function onerror (err) {
|
||||||
|
if (err) throw err
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user