Skip to content

Commit

Permalink
Merge pull request #679 from aeternity/release/v0.8.0
Browse files Browse the repository at this point in the history
Release 0.8.0
  • Loading branch information
etharner authored May 3, 2019
2 parents 045789b + 9721bb2 commit e80bf34
Show file tree
Hide file tree
Showing 396 changed files with 39,501 additions and 5,972 deletions.
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VUE_APP_MIGRATION_STATUS_URL=https://api.backendless.com/CBD0589C-4114-2D15-FF41-6FC7F3EE8800/39EBBD6D-5A94-0739-FF27-B17F3957B700/data/TokenBurnings?pageSize=100&where=pubKey%20%3D%20%27ADDRESS%27
VUE_APP_MIGRATION_PHASE=0
UNFINISHED_FEATURES=true
VUE_APP_REMOTE_CONNECTION_BACKEND_URL=https://stage-signaling.aepps.com
VUE_APP_VAPID_PUBLIC_KEY=BJP4PnSPRizQofIOBhe8o-AlaElRYbp7Mi_nirXzPYkJPkZfu-ONL7M14Y2c_q9LfU1K3XUcwzfx3lNM_jBLJrc
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UNFINISHED_FEATURES=false
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

40 changes: 18 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
// http://eslint.org/docs/user-guide/configuring

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
node: true,
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
extends: [
'plugin:vue/recommended',
'@vue/airbnb',
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
overrides: [{
files: '**/__tests__/*',
env: {
jest: true,
},
}],
};
23 changes: 16 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
.DS_Store
node_modules/
dist/
node_modules
/dist

# Cordova files
/www
/platforms
/plugins
/resources/*/

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
test/unit/coverage
test/e2e/reports
selenium-debug.log
package-lock.json

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
.vscode
*.sw*
11 changes: 4 additions & 7 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
"plugins": {
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
plugins: {
autoprefixer: {},
},
};
39 changes: 21 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
language: node_js
os:
- linux
- osx
osx_image: xcode10.2
node_js:
- '8'
- '10'
cache:
directories:
- node_modules
- platforms
- plugins
- /home/travis/.cache/Cypress
install:
- npm install
- travis_wait 30 scripts/install.sh
script:
- npm run lint
- npm run unit
- npm run build
- if [[ $TRAVIS_OS_NAME != "osx" ]]; then npm test; fi
before_deploy: scripts/before-deploy.sh
deploy:
- provider: script
skip_cleanup: true
script: rsync -r --delete-after -v $TRAVIS_BUILD_DIR/dist/* deploy@139.59.142.164:/var/www/html/identity.aepps.com/
script: scripts/deploy.sh
on:
branch: master
- provider: script
all_branches: true
- provider: releases
api_key: $GITHUB_TOKEN
file: aeternity.app.tar.gz
skip_cleanup: true
script: rsync -r --delete-after -v $TRAVIS_BUILD_DIR/dist/* [email protected]:/var/www/html/stage-identity.aepps.com/
on:
branch: stage
before_install:
- openssl aes-256-cbc -K $encrypted_0d22c88004c9_key -iv $encrypted_0d22c88004c9_iv
-in aepp-identity-deploy.enc -out aepp-identity-deploy -d
- eval "$(ssh-agent -s)"
- chmod 600 aepp-identity-deploy
- ssh-add aepp-identity-deploy
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
condition: $TRAVIS_OS_NAME = osx
tags: true
29 changes: 29 additions & 0 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM tamasbarta/docker-android-sdk:28.0.3

ENV NODEJS_VERSION=10.15.3 \
PATH=$PATH:/opt/node/bin

RUN apt-get update && \
apt-get install -y python \
build-essential \
libfontconfig \
curl \
gradle \
imagemagick &&\
curl -sL https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.gz | tar xz --strip-components=1 &&\
rm -rf /var/lib/apt/lists/*

ENV GRADLE_OPTS=${GRADLE_OPTS}\ -Dorg.gradle.daemon=false

RUN mkdir app
WORKDIR /app

COPY package*.json ./
RUN npm install && npx cordova telemetry off

# As cordova changes global modules when adding a platform, we have to build the apk already during the docker build process
COPY . .
RUN npm run build:cordova
RUN npx cordova prepare android
RUN npm run gen:cordova-resources
RUN npx cordova build android -- --gradleArg=--no-daemon
20 changes: 20 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pipeline {
agent {
dockerfile {
filename 'Dockerfile.ci'
args '-v /etc/group:/etc/group:ro ' +
'-v /etc/passwd:/etc/passwd:ro ' +
'-v /var/lib/jenkins:/var/lib/jenkins '

}
}

stages {
stage('Archive Artifacts') {
steps {
sh 'cp /app/platforms/android/app/build/outputs/apk/debug/app-debug.apk $WORKSPACE/android-debug.apk'
archiveArtifacts artifacts: 'android-debug.apk', fingerprint: true
}
}
}
}
76 changes: 20 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,50 @@
# Æternity identity

The identity provider is a relatively simple app, that allows apps, which are loaded
via an iframe to interact with the ethereum network by providing an web3 instance.
To make this happen only a couple of things need to be paid attention to; first of
all apps need to be run on localhost, <subdomain>.aepps.com or <subdomain>.aepps.dev
for security reasons. To get a web3 instance which talks to the identity aepp you
need to use the [@aeternity/id-manager-provider](https://www.npmjs.com/package/@aeternity/id-manager-provider/).

```javascript
import IdManagerProvider from '@aeternity/id-manager-provider'
// ...
function initWeb3() {
let web3;
let idManager = new IdManagerProvider()
idManager.checkIdManager().then( (idManagerPresent) => {
if (idManagerPresent ) {
web3 = new Web3(idManager.web3.currentProvider)
} else if (typeof window.web3 !== 'undefined') { // Metamask
web3 = new Web3(window.web3.currentProvider);
} else {
web3 = null;
}

if (web3) {
// Ready
} else {
// Not Ready
}

})
}
```

You also need to make sure that there are no synchronous calls to any of the web3
functions which issue API calls, e.g. instead of `web3.eth.accounts` use `web.eth.getAccounts(function (err, accounts) {...})`.
# Base æpp

## Build Setup

``` bash
```bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev
# serve with hot reload at http://localhost:8080/
npm run serve

# serve with hot reload at https://localhost:8080/
npm run serve -- --https

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report
npm run build -- --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e
npm run test:unit

# run all tests
npm test
```

## Contributing

Changes should be made in an extra fork or branch. Then create a pull request to the **stage** branch. The pull request will be reviewed and if the changes are accepted they are deployed to the [stage environment](https://stage-identity.aepps.com) by travis. If there are no conflicts in stage the stage branch will be merged into master. The master branch is deployed to the [live environment](http://stage-identity.aepps.com) by travis. Changes are never made directly into the master branch.
We use the [gitflow](https://danielkummer.github.io/git-flow-cheatsheet/) workflow [this is also helpful](https://gist.github.com/JamesMGreene/cdd0ac49f90c987e45ac).
* Development of features happens in branches made from **develop** called feature/<the-feature> like feature/show-token-balance.
* When development is finished a pull request to **develop** is created. At least one person has to review the PR and when everything is fine the PR gets merged.
* The develop branch gets deployed to the [stage environment](https://stage-identity.aepps.com) by travis.
* To make a new release create a release branch called release/vX.X.X, also bump the version number in package.json in this branch.
* Create a PR to master which then also has to be accepted.
* Create a tag for this version and push the tag.
* Also merge back the changes (like the version bump) into develop.
* The master branch is deployed to the [live environment](https://identity.aepps.com) by travis.

## Live vs. Stage

We have a stage and a live branch and environments where these branches will be deployed to.
We have a stage (develop) and a live (master) branch and environments where these branches will be deployed to.
* [stage environment](https://stage-identity.aepps.com)
* [live environment](http://stage-identity.aepps.com)
* [live environment](https://identity.aepps.com)

### stage
* Is used to see changes to the code in effect in a "real" environment without the fear of breaking the live environment.
* http and https are allowed
* The URL of dapps running in the identity manager is not checked
* Some of our æpps included in the identity manager point to the staging version of those æpps (e.g. [notary stage](https://stage-notary.aepps.com))

### live
* Is the live environment, code lives in the "master" branch
* https is enforced
* dapps must use https

### Developing with the identity manager

Since the accepted URLs are very restricted and https is enforced you can use the stage environment during development. You need to configure the [id-manager-provider](https://www.npmjs.com/package/@aeternity/id-manager-provider/) to either use the stage environment by changing the *idManagerHost* option during initialization or passing the *skipSecurity* option.
11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
presets: [
'@vue/app',
],
plugins: [
['@babel/plugin-transform-async-to-generator', {
module: 'bluebird',
method: 'coroutine',
}],
],
};
40 changes: 0 additions & 40 deletions build/build.js

This file was deleted.

Loading

0 comments on commit e80bf34

Please sign in to comment.