diff --git a/.travis.yml b/.travis.yml index aa04504f..c7790e9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,23 @@ language: node_js node_js: 4 -before_install: npm prune +before_install: + - 'git config --global user.email "algobot@users.noreply.github.com"' + - 'git config --global user.name "algobot"' + - npm prune + - rvm install 2.2.0 + - rvm use 2.2.0 before_cache: npm prune install: npm install -script: npm test +script: ./scripts/test-ci branches: only: - master - develop -# force container based infra -# http://docs.travis-ci.com/user/workers/container-based-infrastructure/#Routing-your-build-to-container-based-infrastructure sudo: false cache: directories: - node_modules +env: + global: + - secure: Y2qFJk1LUqyGD38psPIOBhgokn6E+G9xOO725KvmcPkmB8B9cFHoY5+tgFeAU96QjSdcePJIISeKBGnknPljyCPQ9q49twHPduS4tT9iIN1MjSEv76C4qJ3M1P9HAV8c3RukWjqlgvDXJQNFA9xCh6Cs3aKqJfiQrJhMpSmGjZlJfsLjfss8N9Rp9gRrsRp0m0vgxKA2ASCKz6ArDl5XxfnnSjDyp487lURD83To/Wijbm+6Wrl/AZVKlEnzXNl2V1Qn62ZZbkHvD6xAbGFm5BNP9yjsFHwhr/YEhpRoINOfmDBsUQojOCZf71offXA8IQiGfwIq3Jg8+gar7aQd+EvgDiiwtzoBwvNDZw82AUfB2bHSAIFYn/RgNDmyWqN9BObKw6rM/MhqCGn+jBFHVEcHP5FtFawsM6j+4OareB03ycpkUu+nFmAvmpVenzHtbSZQtP2GnmBYoRBL+zp4O8CAOZv6VTlxYd/pwJor0yZa7ZKu/DDjfOAyTOD/tBfmvVkxGUS8tRXMBcMDdzh9I6eb/QrBPT0tHc3HLVtWmA+yBJ0B4pTZai4uzEcZFHzyIhNRxshZ36uObbxNWOa+52RKrJlsPJ35Drosdqt7O7rVFrOGH4H0aKfA+WjO7pky6rSB5oILHZdz3r2G4PIXFLpAtyV0pMUso3xk1akR2MI= + - secure: d9QgN3kXLHwYt3w/ff0nzqVVtm+UhZ2NS7Xl6oWoEzz4518TEmTXkDjfhPGVm0tTlFm9/oNDQhg5ozIVjiPooiC0wpHUubFBI7wrzLjmxYjvFTgaN3YI+HBJJGlUU120mYtXIiP8WVnoViyceSMkXUIe7jjgeche7XLHgEgQwzR1qYfNlwMiAjEU1iCmJmiJ8Xa+QJHNAeG/RLn+6TtRCvTsIeZlWLpq+uaQH/93ehhtLVnqhaOxE7dPYQT6J1PrDb8PrwUaTqLaeEK1UDGvHJWmqSsXxHVSTMulovXBXYKGNmrk8Kk7fAT7jFdxJBsbYYMjDbIiTE9F1zh4Z39Bwl89NHj33107zjiAlv5nFpOJgHIdoL6wW1bmMoYls3Z5jrcYAHbKwWa9WqPHjW4MbW8MxbGI5t0NqWnk/XGZb96uvzhqN9zyWCNPI7G+uxjHbme0YnL7SyJ5cD+uQyGKxCSJP+/4UJJWXJF+P0dwjKj16qhhSM3XNvKjE2S+iU+/yoH6ZuaiqSz9JMbs48+gtLdc+lz8tqGauKXrj6+WJBGmzj1IZKxi85lwpwWH+9cMfqOJdUoKrENKwEkDdkfcElZGRT5QtdWcnAysIyVpk81ndmayJLv1NP/uqyctJkmfH+X1ghyiz9lennrpgP57ezZtx1u2AAVKGmIvzjWzx3o= diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..335b8ce4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,234 @@ +Hi (future) collaborator! + +**tl;dr;** +- submit pull requests to develop branch +- use [conventional changelog](https://github.com/ajoslin/conventional-changelog/blob/master/conventions/angular.md) commit style messages +- squash your commits +- have fun + + + +**Table of Contents** + +- [Where to start?](#where-to-start) +- [Development workflow](#development-workflow) +- [Adding/Updating a package](#addingupdating-a-package) +- [Removing a package](#removing-a-package) +- [Commit message guidelines](#commit-message-guidelines) + - [Revert](#revert) + - [Type](#type) + - [Scope](#scope) + - [Subject](#subject) + - [Body](#body) + - [Footer](#footer) +- [Stash your commits](#stash-your-commits) +- [When are issues closed?](#when-are-issues-closed) +- [Milestones](#milestones) +- [Releasing](#releasing) + - [Beta releases](#beta-releases) +- [Hotfixes](#hotfixes) + - [Releasing hotfixes](#releasing-hotfixes) + - [Documentation updates](#documentation-updates) + + + +# Where to start? + +Have a fix or a new feature? [Search for corresponding issues](https://github.com/algolia/docsearch/issues) first then create a new one. + +Always check the status of the [develop branch](https://github.com/algolia/docsearch/tree/develop) for the freshest code. + +Always submit pull requests to the develop branch. + +# Development workflow + +## Local example + +We use a simple documentation example website as a way to develop the docsearch.js library. + +Requirements: +- [Node.js](https://nodejs.org/en/) +- npm@2 + +```sh +npm run dev +# open http://localhost:8080 +``` + +## Documentation website + +This is the [Jekyll](https://jekyllrb.com/) instance running at https://community.algolia.com/docsearch. + +Requirements: +- [Ruby](https://www.ruby-lang.org/en/) +- [Bundler](http://bundler.io/) + +```sh +npm run dev:docs +# open http://localhost:4000/docsearch/ +``` + +# Adding/Updating a package + +We use a [specific shrinkwrapping tool](https://github.com/uber/npm-shrinkwrap) and npm@2. + +```sh +npm install +npm install package --save[-dev] +npm run shrinkwrap +``` + +# Removing a package + +```sh +npm install +npm remove package --save[-dev] +npm run shrinkwrap +``` + +Removing packages can be really tricky to handle if the package was used by +both the host project and sub dependencies. + +# In case of shrinkwrap madness + +```sh +rm -rf node_modules +rm npm-shrinkwrap.json +npm cache clean +npm install +# check everything is working +npm run shrinkwrap +``` + +Don't do this too often because it breaks the whole shrinkwrap idea. Since +you are completely rebuilding the dependency tree and possibly updating things. + +# Commit message guidelines + +We use [conventional changelog](https://github.com/ajoslin/conventional-changelog) to generate our changelog from our git commit messages. + +Here are the rules to write commit messages, they are the same than [angular/angular.js](https://github.com/angular/angular.js/blob/7c792f4cc99515ac27ed317e0e35e40940b3a400/CONTRIBUTING.md#commit-message-format). + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +```text +(): + + + +