Remove built assets from repo, updates to docs + GH templates (#1955)

* Revamp issue and pull request templates, other docs tweaks

`yarn test` now runs all of our tests.

* Remove generated files from the repository

* Update to new Signal support URL

* Prevent the 'Test failed 2 == 1' from test-release in CI

* Another attempt to fix grunt test-release on Appveyor

* grunt test-release: Fail build if test fails

* Lint fix, and move jshint earlier in CI process
This commit is contained in:
Scott Nonnenberg 2018-01-09 15:31:23 -08:00 committed by GitHub
parent 752ef40d47
commit d503d1ace3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 168 additions and 129879 deletions

View File

@ -1,39 +1,73 @@
<!-- This is a bug report template. By following the instructions below and filling out the sections with your information, you will help the developers to get all the necessary data to fix your issue.
You can also preview your report before submitting it. You may remove sections that aren't relevant to your particular case.
<!--
Please fill out this template with all the information you have. We can't do much without
both logs and a detailed description of what you encountered. Please do your best!
Before we begin, please note that this tracker is only for issues, not questions or comments.
Please note that this tracker is only for bugs and feature requests. Please try these
locations if you have a question or comment:
If you are looking for support, please see our support center instead:
http://support.whispersystems.org/
or email support@whispersystems.org
https://whispersystems.discoursehosting.net/
http://support.signal.org/
support@whispersystems.org
Let's begin with a checklist: please replace the empty checkbox [ ] below with a checked one [x] if you have searched for existing issues -->
Lastly, be sure to preview your issue before saving. Thanks!
-->
- [ ] I have searched open and closed issues for duplicates
<!--
You can search all issues here:
https://github.com/WhisperSystems/Signal-Desktop/issues?utf8=%E2%9C%93&q=is%3Aissue
Replace [ ] with [X] once you've searched
-->
----------------------------------------
### Bug description
Describe here the issue that you are experiencing.
<!-- Give an overall summary of the issue. -->
### Steps to reproduce
- using hyphens as bullet points
- list the steps
- that reproduce the bug
**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behaviour)
**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)
<!-- Using bullet points, list the steps that reproduce the bug. -->
1.
2.
3.
Actual result:
<!-- Describe the details of the buggy behaviour. -->
Expected result:
<!-- Describe in detail what the correct behavior should be. -->
### Screenshots
<!-- you can drag and drop images below -->
<!--
How to take screenshots on all OSes: https://www.take-a-screenshot.org/
You can drag and drop images into this text box.
-->
### Platform info
<!-- replace examples with your info -->
**Operating System**: My Operating System A
**Browser**: My Browser X.Y.Z
<!-- you can see Signal's version number in your browser's extensions page: chrome://extensions -->
**Signal version:** Z.Y.Y
Signal version:
<!-- You can see Signal's version number at Help -> About or File -> About Signal Desktop -->
Operating System:
<!-- Instructions for finding your OS version are here: http://whatsmyos.com/ -->
Linked device version:
<!-- Android: Settings -> Advanced, iOS: Settings -> About -->
### Link to debug log
<!-- immediately after the bug has happened submit a debug log via the ⋮ menu above the conversation list -->
<!--
Immediately after the bug has happened, submit a debug log via View -> Debug Log, then copy that URL here.
In most cases, a log from your other devices is also useful:
Android: https://support.signal.org/hc/en-us/articles/212535838
iOS: https://support.signal.org/hc/en-us/articles/229676507
-->

View File

@ -1,27 +1,37 @@
<!--
Thanks for contributing to the project!
Please help us keep this project in good shape by going through this checklist.
Replace the empty checkboxes [ ] below with checked ones [X] as they are completed
Remember, you can preview this before saving it.
-->
<!-- You can remove this first section if you have contributed before -->
### First time contributor checklist
<!-- replace the empty checkboxes [ ] below with checked ones [x] accordingly -->
### First time contributor checklist:
- [ ] I have read the [README](https://github.com/WhisperSystems/Signal-Desktop/blob/master/README.md) and [Contributor Guidelines](https://github.com/WhisperSystems/Signal-Desktop/blob/master/CONTRIBUTING.md)
- [ ] I have signed the [Contributor Licence Agreement](https://whispersystems.org/cla/)
### Contributor checklist
<!-- replace the empty checkboxes [ ] below with checked ones [x] accordingly -->
- [ ] My contribution is fully baked and ready to be merged as is
- [ ] My changes are rebased on the latest master branch
- [ ] My commits are in nice logical chunks
- [ ] I have followed the [best practices](http://chris.beams.io/posts/git-commit/) in my commit messages
- [ ] I have tested my contribution on these platforms:
* GNU Hurd 1.0, Chrom{e,ium} X.Y.Z
* Amiga OS 3.1, Chrom{e,ium} Z.Y
- [ ] My changes pass all the [local tests](https://github.com/WhisperSystems/Signal-Desktop/blob/master/CONTRIBUTING.md#tests) 100%
- [ ] I have considered whether my changes need additional [tests](https://github.com/WhisperSystems/Signal-Desktop/blob/master/CONTRIBUTING.md#tests), and in the case they do, I have written them
----------------------------------------
### Contributor checklist:
- [ ] My commits are in nice logical chunks with [good commit messages](http://chris.beams.io/posts/git-commit/)
- [ ] My changes are [rebased](https://medium.freecodecamp.org/git-rebase-and-the-golden-rule-explained-70715eccc372) on the latest [`development`](https://github.com/WhisperSystems/Signal-Desktop/tree/development) branch
- [ ] My changes pass 100% of [local tests](https://github.com/WhisperSystems/Signal-Desktop/blob/master/CONTRIBUTING.md#tests)
- [ ] My changes are ready to be shipped to users
### Description
<!--
Describe briefly what your pull request proposes to fix. Especially if you have more than one commit, it is helpful to give a summary of what your contribution as a whole is trying to solve.
Also, please describe shortly how you tested that your fix actually works.
Please note, that after you have submitted your PR, the Travis CI build check will fail. This is a known issue (#708) and you don't have to worry about it. (■_■¬)
<!--
Describe briefly what your pull request changes. Focus on the value provided to users.
Does it address any outstanding issues in this project?
https://github.com/WhisperSystems/Signal-Desktop/issues?utf8=%E2%9C%93&q=is%3Aissue
Reference an issue with the hash symbol: "#222"
If you're fixing it, use something like "Fixes #222"
Please write a summary of your test approach:
- What kind of manual testing did you do?
- Did you write any new tests?
- What operating systems did you test with? (please use specific versions: http://whatsmyos.com/)
- What other devices did you test with? (other Desktop devices, Android, Android Simulator, iOS, iOS Simulator)
-->

8
.gitignore vendored
View File

@ -14,3 +14,11 @@ release/
/dev-app-update.yml
.nyc_output/
*.sublime*
# generated files
js/components.js
libtextsecure/components.js
js/libtextsecure.js
stylesheets/*.css
test/test.js
libtextsecure/test/test.js

View File

@ -11,6 +11,7 @@ script:
- yarn prepare-build
- yarn eslint
- yarn test-server
- yarn lint
- ./node_modules/.bin/build --em.environment=$SIGNAL_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --publish=never
- ./travis.sh
env:

View File

@ -18,9 +18,11 @@ ounce of prevention, as they say!](https://www.goodreads.com/quotes/247269-an-ou
## Developer Setup
First, you'll need [Node.js](https://nodejs.org/) installed. Anything 6.x or newer works
as of Summer 2017. You might consider a [version](https://github.com/creationix/nvm)
[manager](https://github.com/coreybutler/nvm-windows) to make this easier for yourself.
First, you'll need [Node.js](https://nodejs.org/) which matches our current version.
You can check [`.nvmrc` in the `development` branch](https://github.com/WhisperSystems/Signal-Desktop/blob/development/.nvmrc) to see what the current version is. If you have [nvm](https://github.com/creationix/nvm)
you can just run `nvm use` in the project directory and it will switch to the project's
desired Node.js version. [nvm for windows](https://github.com/coreybutler/nvm-windows) is
still useful, but it doesn't support `.nvmrc` files.
Then you need `git`, if you don't have that yet: https://git-scm.com/
@ -34,16 +36,33 @@ npm install --global --production windows-build-tools
```
On OSX you can install the [XCode Command-line tools](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/). On Linux you'll need to take a trip to your
favorite package manager. Python 2.x and GCC two key necessary components.
favorite package manager. Python 2.x and GCC are two key necessary components.
Now, run these commands in your preferred terminal in a good directory for development:
```
git clone https://github.com/WhisperSystems/Signal-Desktop.git
cd Signal-Desktop
npm install -g yarn # (only if you don't already have yarn)
yarn install # install and build dependencies (this will take a while)
yarn run start # run!
npm install -g yarn # (only if you don't already have yarn)
npm install -g grunt-cli # (only if you don't already have grunt)
yarn install # Install and build dependencies (this will take a while)
grunt # Generate final js/css assets
yarn icon-gen # Generate full set of icons for Electron
yarn test # A good idea to make sure tests run first
yarn run start # Run!
```
You'll need to restart the application regularly to see your changes, as there is no
automatic restart mechanism.
Also, note that the assets loaded by the application are not necessarily the same files
you're touching. You may not see your changes until you run `grunt` on the command-line
like you did during setup. You can make it easier on yourself by generating the latest
built assets when you change a file. Run this in its own terminal instance while you make
changes:
```
grunt dev # runs until you stop it, re-generating built assets on file changes
```
## Setting up standalone
@ -124,8 +143,17 @@ Please write tests! Our testing framework is
[mocha](http://mochajs.org/) and our assertion library is
[chai](http://chaijs.com/api/assert/).
To run tests, you can run them from the command line with `grunt unit-tests` or in an
interactive session with `NODE_ENV=test yarn run start`.
The easiest way to run all tests at once is `yarn test`.
You can browser tests from the command line with `grunt unit-tests` or in an
interactive session with `NODE_ENV=test yarn run start`. The `libtextsecure` tests are run
similarly: `grunt lib-unit-tests` and `NODE_ENV=test-lib yarn run start`. You can tweak
the appropriate `test.html` for both of these runs to get code coverage numbers via
`blanket.js` (it's shown at the bottom of the web page when the run is complete).
To run Node.js tests, you can run `yarn test-server` from the command line. You can get
code coverage numbers for this kind of run via `yarn test-server-coverage`, then display
the report with `yarn open-coverage`.
## Pull requests
@ -213,6 +241,16 @@ production servers will _unregister_ your mobile device! All messages from your
will go to your new development desktop app instead of your phone.
## Testing Production Builds
To test changes to the build system, build a release using
```
yarn generate
yarn build-release
```
Then, run the tests using `grunt test-release:osx --dir=release`, replacing `osx` with `linux` or `win` depending on your platform.
## Dependencies
**Note**: You probably won't end up doing this. Feel free to skip for now.
@ -246,11 +284,3 @@ Now, run `grunt` to delete unused package files and build `js/components.js`.
Finally, stage and commit changes to bower.json, `js/components.js`,
and `components/`. The latter should be limited to files we actually use.
### Testing
To test changes to the build system, build a release using
```
yarn generate
yarn build-release
```
Then, run the tests using `grunt test-release:osx --dir=release`, replacing `osx` with `linux` or `win` depending on your platform.

View File

@ -471,15 +471,15 @@ module.exports = function(grunt) {
}).then(function () {
assert(app.chromeDriver.logLines.indexOf('NODE_ENV ' + environment) > -1);
console.log('environment ok');
}).catch(function (error) {
// Log any failures
console.log('Test failed', error.message);
}).then(function () {
// Stop the application
// Successfully completed test
return app.stop();
}, function (error) {
// Test failed!
return app.stop().then(function() {
grunt.fail.fatal('Test failed: ' + error.message + ' ' + error.stack);
});
}).then(done);
// todo: verify package.json has `environment: <environment>`
});
grunt.registerTask('tx', ['exec:tx-pull', 'locale-patch']);
@ -489,5 +489,4 @@ module.exports = function(grunt) {
grunt.registerTask('date', ['gitinfo', 'getExpireTime']);
grunt.registerTask('prep-release', ['gitinfo', 'clean-release', 'fetch-release']);
grunt.registerTask('default', ['concat', 'copy:deps', 'sass', 'date']);
};

View File

@ -2,18 +2,30 @@
Signal Desktop
==========================
Install [Signal Desktop](https://support.signal.org/hc/en-us/articles/214507138)!
Signal Desktop is an Electron application that links with your
[Signal Android](https://github.com/WhisperSystems/Signal-Android)
or [Signal iOS](https://github.com/WhisperSystems/Signal-iOS) app.
Install [Signal Desktop](https://signal.org/download/)!
## Install the beta
You can install it on a computer which already has the production version installed. It uses different data and install locations.
- _Windows:_ You can find the most recent build here: https://updates.signal.org/desktop/beta.yml
- _Mac:_ You can find the most recent build here: https://updates.signal.org/desktop/beta-mac.yml
- _Linux:_ same instructions as above, but run `apt-get signal-desktop-beta` instead
## Got a question?
The best place to ask questions is [https://support.signal.org/](https://support.signal.org/).
You can find a number of frequently asked questions here https://support.signal.org/.
The discussion groups are another good place for questions: https://whispersystems.discoursehosting.net/.
## Found a Bug?
## Found a Bug? Have a feature request?
Please search the existing issues for your bug and create a new one if the issue is not yet tracked!
https://github.com/WhisperSystems/Signal-Desktop/issues
@ -26,17 +38,16 @@ https://www.transifex.com/projects/p/signal-desktop
## Contributing Code
Please see
[CONTRIBUTING.md](https://github.com/WhisperSystems/Signal-Desktop/blob/master/CONTRIBUTING.md)
Please see [CONTRIBUTING.md](https://github.com/WhisperSystems/Signal-Desktop/blob/master/CONTRIBUTING.md)
for setup instructions and contributor guidelines. And don't forget to sign the
[CLA](https://signal.org/cla/).
## Contributing Ideas
Have something you want to say about Open Whisper Systems projects or want to be part of the conversation? Get involved in the [community forum](https://whispersystems.discoursehosting.net)!
## Contributing Funds
You can donate to Signal development through the [Freedom of the Press Foundation](https://freedom.press/crowdfunding/signal/).
## Cryptography Notice
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software.

View File

@ -14,6 +14,7 @@ install:
build_script:
- yarn eslint
- yarn test-server
- yarn lint
- yarn run icon-gen
- node build\grunt.js
- type package.json | findstr /v certificateSubjectName > temp.json
@ -22,8 +23,9 @@ build_script:
- node_modules\.bin\build --em.environment=%SIGNAL_ENV% --publish=never
test_script:
- node build\grunt.js test-release:win
- node build\grunt.js test
- set NODE_ENV=production
- node build\grunt.js test-release:win
environment:
SIGNAL_ENV: production

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
"main": "main.js",
"scripts": {
"postinstall": "electron-builder install-app-deps && rimraf node_modules/dtrace-provider",
"test": "grunt test",
"test": "npm run eslint && npm run test-server && grunt test",
"lint": "grunt jshint",
"start": "electron .",
"asarl": "asar l release/mac/Signal.app/Contents/Resources/app.asar",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

12298
test/test.js

File diff suppressed because it is too large Load Diff

View File

@ -10,4 +10,4 @@ fi
grunt test
grunt test-release:$TRAVIS_OS_NAME
NODE_ENV=production grunt test-release:$TRAVIS_OS_NAME