Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pkg #849

Merged
merged 3 commits into from Aug 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,3 +9,4 @@ test/fixtures/dat.json
test/**.db
test/.datrc-test
package-lock.json
dist
22 changes: 15 additions & 7 deletions .travis.yml
@@ -1,22 +1,30 @@
language: node_js

node_js:
- "4"
- "6"
- "8"

- '4'
- '6'
- '8'
sudo: false

script:
- npm test
- npm test

notifications:
irc:
channels:
- "chat.freenode.net#datbots"
- chat.freenode.net#datbots
template:
- "%{repository_slug} - %{commit_subject} - %{result} - %{build_url}"
- '%{repository_slug} - %{commit_subject} - %{result} - %{build_url}'
skip_join: true
on_success: change
on_failure: always

deploy:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to figure it out =)

  1. package binary with pkg (npm run package)
  2. travis automatically builds after tests pass
  3. uploads to github releases

I don't see the result of this last build anywhere though. Not sure how it works without the tags.

provider: releases
script: npm run package
api_key:
secure: GF+Ehh9kDu2m+KqSzciZRQmUfubnVGDEfxZKVX+psesKoxxDSq8/wkl7g1yR2H8DO0dg3lW8opbsKbfOOUWztyIfFxFukgwKIawUd7Krtr4XQLyywq49NdYARKP6bSxeEb8N3xVTo5fuq104KT0mMUB9di/iunsO/ITOzbCZyWE=
skip_cleanup: true
file: dist/*
on:
repo: datproject/dat
15 changes: 14 additions & 1 deletion package.json
Expand Up @@ -17,7 +17,8 @@
"install-precommit": "echo ./node_modules/.bin/standard > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit",
"standard": "standard",
"deps": "dependency-check . && dependency-check . --extra --no-dev",
"test": "standard && npm run deps && tape 'test/*.js' | tap-spec"
"test": "standard && npm run deps && tape 'test/*.js' | tap-spec",
"package": "pkg package.json -o dist/dat"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -60,6 +61,7 @@
"hypercore": "^6.5.0",
"hyperdiscovery": "^6.0.1",
"mkdirp": "^0.5.1",
"pkg": "^4.2.2",
"random-access-memory": "^2.4.0",
"recursive-readdir-sync": "^1.0.6",
"request": "^2.81.0",
Expand All @@ -68,5 +70,16 @@
"tape": "^4.6.3",
"tape-spawn": "^1.4.2",
"temporary-directory": "^1.0.2"
},
"pkg": {
"assets": [
"node_modules/utp-native/prebuilds/**",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why double * when globbing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that means it is recursive but I don't really know what I'm doing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"node_modules/sodium-native/prebuilds/**"
],
"targets": [
"node8-linux-x64",
"node8-macos-x64",
"node8-win-x64"
]
}
}