-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4,863 changed files
with
1,248,879 additions
and
4 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "www/bower_components" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Language: JavaScript | ||
BasedOnStyle: Google | ||
ColumnLimit: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.idea | ||
.vscode | ||
*.DS_Store | ||
/build | ||
info.txt | ||
/node_modules | ||
/platforms | ||
/plugins | ||
/www/bower_components | ||
/www/babel-polyfill.min.js | ||
/www/cordova.js | ||
/www/cordova_main.js | ||
/third_party/Potatso/Pods | ||
/Carthage | ||
xcuserdata/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Copyright 2018 The Outline Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
language: node_js | ||
|
||
node_js: | ||
- "8" | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- $HOME/.cache/bower | ||
- $HOME/.cache/electron | ||
- $HOME/.cache/electron-builder | ||
|
||
before_install: | ||
# Cache credentials for the JigsawCode/outline-apple-credentials repo. | ||
- echo -e "machine github.com\n login $APPLE_CREDENTIALS_CI_USER_TOKEN" >> ~/.netrc | ||
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Travis-CI-supports-yarn | ||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2 | ||
- export PATH="$HOME/.yarn/bin:$PATH" | ||
|
||
stages: | ||
- build | ||
- test | ||
- name: tag | ||
if: type = cron | ||
- name: package | ||
if: tag =~ ^daily | ||
- name: android | ||
if: tag =~ ^android | ||
- name: ios | ||
if: tag =~ ^ios | ||
|
||
# Stages with the same name define multiple jobs which run in parallel. | ||
# To make it more apparent in the Travis UI exactly what each job is | ||
# doing, we add a descriptive environment variable. | ||
jobs: | ||
include: | ||
- stage: build | ||
script: yarn gulp build --platform=browser | ||
|
||
- stage: test | ||
script: yarn do scripts/test | ||
|
||
- stage: tag | ||
script: | ||
- RELEASE_NAME=daily-$(date -I) | ||
- curl --data '{"tag_name":"'$RELEASE_NAME'","name":"'$RELEASE_NAME'","prerelease":true}' https://api.github.com/repos/Jigsaw-Code/outline-client/releases?access_token=$CI_USER_TOKEN | ||
|
||
- stage: package | ||
env: | ||
- DESC=android | ||
sudo: required | ||
services: docker | ||
script: ./tools/build/build.sh yarn gulp build --platform=android | ||
|
||
# https://www.electron.build/multi-platform-build | ||
- stage: package | ||
env: | ||
- DESC=windows | ||
sudo: required | ||
services: docker | ||
script: | ||
- docker pull electronuserland/builder:wine | ||
- docker run --rm | ||
-v ${PWD}:/project | ||
-v ~/.cache/electron:/root/.cache/electron | ||
-v ~/.cache/electron-builder:/root/.cache/electron-builder | ||
electronuserland/builder:wine | ||
/bin/bash -c "apt update && apt install -y rsync && yarn do electron/package" || travis_terminate $? | ||
|
||
- stage: package | ||
language: objective-c | ||
osx_image: xcode9.2 | ||
env: | ||
- DESC=macos | ||
script: | ||
# This stage does not produce a binary because we cannot sign or provision the application on CI yet. | ||
- yarn && yarn gulp build --platform=osx | ||
|
||
- stage: package | ||
language: objective-c | ||
osx_image: xcode9.2 | ||
env: | ||
- DESC=ios | ||
script: | ||
- yarn && yarn do apple/scripts/ios_package_remote | ||
|
||
- stage: android | ||
sudo: required | ||
services: docker | ||
script: | ||
- openssl aes-256-cbc -K $encrypted_417c04da3130_key -iv $encrypted_417c04da3130_iv -in keystore.p12.enc -out keystore.p12 -d | ||
- ./tools/build/build.sh yarn gulp build --platform=android --release --KEYSTORE=keystore.p12 --KEYALIAS=$keyalias --STOREPASS=$storepass --KEYPASS=$keypass | ||
|
||
- stage: ios | ||
language: objective-c | ||
osx_image: xcode9.2 | ||
script: | ||
- yarn && yarn do apple/scripts/ios_release_remote | ||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: "N31aV0u4l1133UBS/ZVmfvLor6Arfd98hljAYwTQ/MOXmMh6rwpm/ghJBF5G/Ws6c9xQw4GWrVXIrNsg4V3seZwHvJVT+ZcMnoDIg0VvFo1Rzi60S6GOAopc5HhHfDu18AehcvfXB9UnrrTRuKd0q3dJcvd7kIPMuw1TXLpN4I8PuQh1E+TECpF0hjCxmPW25LQOKRbVzxnCwgNnfu3IKdySY5OqKEZaDP4+KuuSrysuJxvjYFAn1g0hOEaxEgA0metNl3LmKDd3aPQbTf5caLqkSp4scnRRttvkz6itq9U+KPlLZegLpI8hdB7AMVBaVDt9zNdOTGmGharvfhg5p7lHMC2p/lDgW74NGyjfD9To3lR+9EOKt9NSBfDr+v6X0tDiqFivJHLFaeSz0aeSxpN/cemi1NNjpIMYWoM88V4+98/6w+Ez96XRe9uNKSF0GAFdfb3aKIcU5GdSqULsKpFMgGjIYGAF8Xowixqb9FjkeRA8VJBfvvcVTMmfsi99s8EMSa2dTiXDtUx0G7ADlHCUY2fUdxzN3vDmxXbyskqcrCx/N/66exbT3Ky4sZmUP25HrA/3IwNwYxOvFoq6DpppV/3p1KGxj8sHQPOzGyr6ZEBy7obxXw+Sn6u6+ZgG82foWovvxvYuo6EBih4+0bwtnO48a33uvj43oz8BsR0=" | ||
file_glob: true | ||
file: | ||
- platforms/android/build/outputs/apk/*.apk | ||
- platforms/ios/Outline.ipa | ||
- build/windows/dist/*.exe | ||
skip_cleanup: true | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# How to Contribute | ||
|
||
We'd love to accept your patches and contributions to this project. There are | ||
just a few small guidelines you need to follow. | ||
|
||
## Contributor License Agreement | ||
|
||
Contributions to this project must be accompanied by a Contributor License | ||
Agreement. You (or your employer) retain the copyright to your contribution, | ||
this simply gives us permission to use and redistribute your contributions as | ||
part of the project. Head over to <https://cla.developers.google.com/> to see | ||
your current agreements on file or to sign a new one. | ||
|
||
You generally only need to submit a CLA once, so if you've already submitted one | ||
(even if it was for a different project), you probably don't need to do it | ||
again. | ||
|
||
## Code reviews | ||
|
||
All submissions, including submissions by project members, require review. We | ||
use GitHub pull requests for this purpose. Consult | ||
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more | ||
information on using pull requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,108 @@ | ||
# outline-client | ||
Multi-platform Outline client | ||
[](https://travis-ci.com/Jigsaw-Code/outline-client) | ||
|
||
# Requirements for all builds | ||
|
||
All builds require [yarn](https://yarnpkg.com/en/docs/install), in addition to other per-platform requirements. After cloning this repo, you should run "yarn" to install all dependencies. | ||
|
||
# Building the web app | ||
|
||
Outline clients shares the same web app across all platforms. This code is located in the www directory. If you are making changes to the shared web app and do not need to test platform-specific functionality, you can test in a desktop browser by running: | ||
|
||
yarn gulp build --platform=browser --watch | ||
|
||
This command will automatically rebuild after any typescript file in the www directory changes, however it will need to be re-run to pick up other file changes. | ||
|
||
Browser platform development will use fake servers to test successful and unsuccessful connections. | ||
|
||
UI components are located in www/ui_components. The app logic is located in www/app. | ||
|
||
# Building the Android app | ||
|
||
Additional requirements for Android: | ||
|
||
* Android Studio | ||
* Android SDK 23 | ||
|
||
To build for android, run: | ||
|
||
yarn gulp build --platform=android | ||
|
||
To rebuild after modifying platform dependent files, run: | ||
|
||
yarn cordova platform rm android && yarn gulp build --platform=android | ||
|
||
If this gives you unexpected Cordova errors, run: | ||
|
||
yarn run clean && yarn && yarn gulp build --platform=android | ||
|
||
Cordova will generate a new Android project in the platforms/android directory. Install the built apk by platforms/android/build/outputs/apk/android-armv7-debug.apk | ||
|
||
To learn more about developing for Android, see docs/android-development.md | ||
|
||
## Building for Android with Docker | ||
|
||
A Docker image with all pre-requisites for Android builds is included. To build: | ||
|
||
* Install dependencies with `./tools/build/build.sh yarn` | ||
* Then build with `./tools/build/build.sh yarn gulp build --platform=android` | ||
|
||
# Apple (macOS and iOS) | ||
|
||
Additional requirements for Apple: | ||
|
||
* An Apple Developer Account. You will need to be invited to join the "Jigsaw Operations LLC" team | ||
* XCode 9+ ([download](https://developer.apple.com/xcode/)) | ||
* XCode command line tools | ||
|
||
To build for macOS (OS X), run: | ||
|
||
yarn run clean && yarn && yarn gulp build --platform=osx | ||
|
||
To build for iOS, run: | ||
|
||
yarn run clean && yarn && yarn gulp build --platform=ios | ||
|
||
To learn more about developing for Android, see docs/apple-development.md | ||
|
||
# Windows | ||
|
||
To build for Windows, run: | ||
|
||
yarn do electron/build | ||
|
||
Unlike the Android and Apple clients, the Windows build uses the Electron framework, rather than Cordova. | ||
|
||
# Localization | ||
|
||
### Prerequisites | ||
|
||
- [Transifex CLI](https://docs.transifex.com/client/installing-the-client) (`tx`), to work with translations. | ||
- Access to the [outline-client](https://www.transifex.com/outline/outline-client/dashboard) Transifex project. Ask a team member if you don't have access. | ||
|
||
### Setup | ||
|
||
Next, you need to set up your Transifex credentials to access the project remotely. Follow [these instructions](https://docs.transifex.com/client/client-configuration#~/-transifexrc) to configure `~/.transifexrc`. | ||
|
||
Transifex CLI supports authentication via username/password or [API token](https://docs.transifex.com/api/introduction#authentication). Note that if you change your credentials or delete the API token, you will have to update `~/.transifexrc`. | ||
|
||
Learn about the details of Transifex tool in the [Introduction to the Client](https://docs.transifex.com/client/introduction). | ||
|
||
### Message Files and Transifex Configuration | ||
|
||
The [.tx/config](.tx/config) file is used to map message files in our repo to resources in Transifex. See [Configuration Files](https://docs.transifex.com/client/client-configuration#-tx/config) for more information on the config format. | ||
|
||
The message files use the [JSON Format](https://docs.transifex.com/formats/json) and are named `www/messages/<lang>.json`. | ||
|
||
### Add new messages or translations | ||
|
||
When you add new messages or new translations, you need to push them to Transifex for the messages to be translated or the translations to be updated. | ||
|
||
To push new messages and translations to Transifex: | ||
|
||
tx push -s -t | ||
|
||
### Retrieve translations | ||
|
||
To get translations from Transifex: | ||
|
||
tx pull |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2018 The Outline Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
source 'https://rubygems.org' | ||
|
||
gem 'fastlane', '~>2.84.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2018 The Outline Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apple_id "[email protected]" # Apple developer account email address | ||
itc_team_id "118880544" # iTunes Connect Team ID | ||
team_id "QT8Z3Q9V3A" # Developer Portal Team ID | ||
|
||
for_platform :ios do | ||
app_identifier "org.outline.ios.client" | ||
end | ||
|
||
for_platform :osx do | ||
app_identifier "org.outline.macos.client" | ||
end |
Oops, something went wrong.