Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Trying to solve repo correctness #1638

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ settings:
import/core-modules: ## don't lint for these missing packages in package.json
- electron ## 'electron' is only needed as devDependency / global installation


rules:
# "off" or 0 - turn the rule off
# "warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
Expand All @@ -22,7 +21,13 @@ rules:
no-underscore-dangle: off
comma-dangle:
- error
- only-multiline
- only-multiline ## no comma after last item if one line, though allow comma if multiline
import/no-extraneous-dependencies: ## checks if required modules are missing in packages.json
- error
- devDependencies: ## declares files, whose imports belong to devDependencies
- "**/scripts/build-dist.js"
- "**/tests/_base.js"
- "**/*.test.js"

globals: # don't warn about missing declarations
i18n: true
Expand Down
1 change: 1 addition & 0 deletions .mention-bot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"actions": ["labeled"],
"withLabel": "please review",
"maxReviewers": 3,
"numFilesToCheck": 5,
Expand Down
101 changes: 75 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,89 @@
sudo: required
dist: trusty

language: node_js
node_js: 6

cache:
yarn: true
sudo: required

branches:
only:
- develop
- master

matrix:
include:

# WINDOWS cross-built from linux
- os: linux
dist: trusty
node_js: 6
env:
- GULP_PLATFORM=win
addons:
apt:
packages:
- icnsutils
- graphicsmagick
- xz-utils
- nsis
sources:
- mono
before_install:
- sudo dpkg --add-architecture i386 && sudo add-apt-repository ppa:ubuntu-wine/ppa -y
- sudo apt-get update -q
- sudo apt-get install --no-install-recommends -y mono-devel ca-certificates-mono wine1.8
after_script:
- makensis -V2 scripts/windows-installer.nsi


addons:
apt:
packages:
- icnsutils
- graphicsmagick
- xz-utils
- gcc-multilib
- g++-multilib

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- curl https://install.meteor.com/ | sh
- npm install -g meteor-build-client
# LINUX
- os: linux
dist: trusty
node_js: 6
env:
- GULP_PLATFORM=linux
addons:
apt:
packages:
- icnsutils
- graphicsmagick
- xz-utils
- gcc-multilib
- g++-multilib

# MAC
- os: osx
osx_image: xcode8 # currently xcode8.1+ doesn't support electron-builder macOS code-signing (https://github.com/electron-userland/electron-builder/issues/820#issuecomment-267777060)
node_js: 6
env:
- GULP_PLATFORM=mac
before_install:
- npm install -g yarn # macOS xcode8 image doesn't natively support yarn yet

allow_failures:
- os: osx

fast_finish: true

cache:
yarn: true

install:
- PATH=$PATH:$HOME/.meteor && curl -L https://raw.githubusercontent.com/arunoda/travis-ci-meteor-packages/master/configure.sh | /bin/sh
- yarn global add gulp-cli meteor-build-client
- yarn

script:
- npm run ci
- if [[ $TRAVIS_BRANCH != "master" ]]; then unset CSC_LINK CSC_KEY_PASSWORD; fi # disable macOS code-signing (production certificate) on develop branch
- travis_wait 60 gulp mist --platform $GULP_PLATFORM
- if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait 60 gulp wallet --platform $GULP_PLATFORM; fi # also build wallet if on master branch
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi
- if [[ $GULP_PLATFORM != "win" ]]; then gulp test-mist; fi

after_success:
- gulp mist-checksums --platform $GULP_PLATFORM
- if [[ $TRAVIS_BRANCH == "master" ]]; then gulp wallet-checksums --platform $GULP_PLATFORM; fi

notifications:
email:
- EMAIL
webhooks:
urls:
- YOUR_WEBHOOK_URL
on_success: change # options: [always|never|change] default: always
- https://webhooks.gitter.im/e/33972d9e627a142c57a6
on_success: change
on_failure: always
on_start: never
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To run mist in development you need [Node.js NPM](https://nodejs.org) and [Meteo
$ npm install -g electron@1.3.13
$ npm install -g gulp

And some futher tools to help with downloading and unzipping client nodes:
And some further tools to help with downloading and unzipping client nodes:

_Linux:_

Expand Down Expand Up @@ -154,7 +154,7 @@ Mist normally.
To create a binaries you need to install [`electron-builder` dependencies](https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#macos):

// tools for the windows binaries
$ brew install wine --without-x11 mono
$ brew install wine --without-x11 mono makensis
// tools for the Linux binaries
$ brew install gnu-tar libicns graphicsmagick xz
// general dependencies
Expand Down Expand Up @@ -223,3 +223,11 @@ It expects installer/zip files to be in the generated folders e.g. `dist_mist/re
### Code signing for production

**As of [#972](https://github.com/ethereum/mist/pull/972) we've updated the build process and thus need to redo code-signing.**


## Testing

First make sure to build Mist with:
`gulp mist --platform [mac,linux]` or `gulp wallet --platform [mac,linux]`.

Then run `gulp test-mist` or `gulp test-wallet`, accordingly.
9 changes: 4 additions & 5 deletions customProtocols.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const electron = require('electron');
const protocol = electron.protocol;
const path = require('path');
const { protocol } = require('electron');


protocol.registerHttpProtocol('mist', (request, callback) => {
Expand All @@ -19,8 +17,9 @@ protocol.registerHttpProtocol('mist', (request, callback) => {

callback(call);
}, (error) => {
if (error)
{ console.error('Failed to register protocol'); }
if (error) {
console.error('Failed to register protocol');
}
});


Expand Down
2 changes: 1 addition & 1 deletion errorPages/400.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
background-color: #f0f0f0;
color: #ACACAC;
text-shadow: 0 -1px #fff;
font: 20px Helvetica Neue, Arial;
font: 20px Source Sans Pro, Helvetica Neue, Arial;
font-weight: 200;
text-align: center;
padding: 10px;
Expand Down
19 changes: 19 additions & 0 deletions errorPages/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<html>
<head>
<title>Error 404</title>
<meta charset="utf-8">
</head>
<body style="
background-color: #f0f0f0;
color: #ACACAC;
text-shadow: 0 -1px #fff;
font: 20px Source Sans Pro, Helvetica Neue, Arial;
font-weight: 200;
text-align: center;
padding: 10px;
padding-top: 100px;
">
<span style="font-size: 80px; font-family: 'Courier New', monospace;">﴾๏๏﴿</span><br><br>
URL not found.
</body>
</html>
19 changes: 19 additions & 0 deletions errorPages/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<html>
<head>
<title>Error 500</title>
<meta charset="utf-8">
</head>
<body style="
background-color: #f0f0f0;
color: #ACACAC;
text-shadow: 0 -1px #fff;
font: 20px Source Sans Pro, Helvetica Neue, Arial;
font-weight: 200;
text-align: center;
padding: 10px;
padding-top: 100px;
">
<span style="font-size: 80px; font-family: 'Courier New', monospace;">(ノಠ益ಠ)ノ</span><br><br>
Oops.. Something went wrong!
</body>
</html>
Loading