Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/staging' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
mokeyish committed Jan 21, 2018
2 parents 35197fb + bc8735e commit 1ccf42d
Show file tree
Hide file tree
Showing 141 changed files with 3,966 additions and 1,747 deletions.
32 changes: 22 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ environment:
cache:
- '%APPDATA%\npm-cache'
- '%USERPROFILE%\.electron'

skip_non_tags: true
artifacts:
- path: 'out\make\**\*'
name: altairAll

- path: 'out\altair-win32-x64\altair.exe'
name: altairWin

- path: 'out\make\**/*.exe'
name: altairExe

Expand All @@ -21,33 +24,42 @@ artifacts:
install:
- ps: Install-Product node $env:nodejs_version $env:platform
- set PATH=%APPDATA%\npm;%PATH%
- npm install
# - npm install
- yarn

before_test:
- npm install -g @angular/cli
- npm install -g karma
- npm install -g electron-forge
- npm install
- yarn global add @angular/cli
- yarn global add karma
- yarn global add electron-forge
- yarn
# - npm install -g @angular/cli
# - npm install -g karma
# - npm install -g electron-forge
# - npm install
- ng build

test_script:
- node --version
- npm --version
- npm run test-build
# - npm --version
# - npm run test-build
- yarn --version
- yarn test-build

build: off # We do not intend to build using MS Build

# Run build in after_test to generate artifacts
after_test:
- ps: (Get-Content .\dist\index.html) | ForEach-Object { $_ -replace '<base href="/">', '<base href="./">' } | Set-Content .\dist\index.html
- npm run make
# - npm run make
- yarn dist-electron
# - npm run dist-electron

deploy:
description: ''
provider: GitHub
auth_token:
secure: UAWP+sQRK/cwf+zm45J2nJdQ50HWFHL14jnjWN/bc2nqZbU9RDq1yiLF+mM7RaSo
artifact: altairAll
artifact: altairAll, altairWin
draft: false
prerelease: false
on:
Expand Down
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sudo: required
dist: trusty
language: node_js
cache: yarn
os:
- linux
- osx
Expand Down Expand Up @@ -30,14 +31,16 @@ before_script:
script:
- ng lint
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then karma start karma.conf.js --single-run; fi
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then ng e2e; fi
before_deploy:
- npm run build-electron
- if [ ! -z "$TRAVIS_TAG" ]; then npm run build-electron; fi
deploy:
- provider: releases
api_key:
secure: Raef82s/PIkWThnr5vxHsxZX7FI6LKB3dbUkHzEs/S88hhibQCLuUIrvtbPwEJ/nxj0tpnD93elRQWpYsFRa38omv11g0o5eSUy7WwEHEum6g6se1fH3DqhBJsnIJFtfNXwdysMuvzWeJQ4P4j37jSg3wuCs9oJn0I+GrtS/wrE8EyxGKjtd68lVZo5rNCllUiHeizl8oIcRTUREKexxpsLEapBqgxmkFDn7lbgLDgt4/VwtaCZVN6bAnjknJS9DMynOJS0S1uyl6Gqd1paHVvEPrJv/UpeGKsp+OyoU7qbt/0ZXqXd1Yyym5jp0NAdb2IVNUAiyAAMUjy0qYDIZJMLAOhoO/GlJjvr+Sun81Fgv3fTDPzdUkHLUOVAFqsAmqhkupdZ3PnbiPExk3M3vTIEYI6v2CdxEglZyuZ1GNZ1551CT2hddHuoGue3JGaeq/V8n7QGZUGdplw9NHr7YOkuGpbbxGDjJM/RQXXEdAj1YXTSe225NNEOjoY5AuaVnIW76pfzhjEZtAHCpiYDfqECjtQ9dNuV5K58qElfPmDlBjYv1/G46OiEb/wpFiXtNZel+pvYaV7EK0RNA5IYSUn/S5v2MHEd8XVS90KV2L+CFv++9M46le3Nx6Qr4Lbu7VeY3va7JA/FCN+6HWpoupCg4N98rNOgfjay6FO/d56c=
file_glob: true
file: out/make/*
file:
- out/make/*
skip_cleanup: true
on:
tags: true
Expand Down
4 changes: 4 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

...

### Checks

- [ ] Ran `npm run test-build`

### Changes proposed in this pull request:

-
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ Before running the tests make sure you are serving the app via `ng serve`.

To get more help on working with the project, check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

## Deploying

- Make sure your local repo is up to date `git pull`
- Run tests locally `ng test --single-run && ng lint && ng e2e`
- Build extensions locally `yarn build-ext`
- Verify that extensions (chrome and firefox) are working properly
- Verify chrome extension https://developer.chrome.com/extensions/getstarted#unpacked
- Verify firefox extension `./bin/run_ext_firefox.sh`
- Update extension version `./bin/update_version.sh <version_number e.g. 1.6.1>`
- Create commit, push and update local repo `git add --all && git commit -am "Upgraded to v<version_number>" && git pull && git push`
- Create release tag for the new version `git tag v<version_number>`
- Push new tag `git push --tags`
- Create release notes (Using https://www.npmjs.com/package/release) `release`
- Wait till all the CI builds are completed, and the binaries have been published in [Github release](https://help.github.com/articles/creating-releases/)
- Merge the staging branch to master
- Upload updated browser extensions
- C'est fini.

In the case of an error while deploying, delete the release tags locally and remotely using `git tag --delete <tag> && git push --delete origin <tag>`

## Contributing

1. Fork it!
Expand Down
3 changes: 2 additions & 1 deletion bin/package_electron_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ npm run build
./electron/fix-base-path.sh

# Make the electron apps
npm run make
# npm run make
npm run dist-electron

# Package the electron app
# ./node_modules/electron-packager/cli.js . Altair --out=electron-builds --overwrite --icon=electron/logo.icns
Expand Down
9 changes: 9 additions & 0 deletions chrome-ext-files/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@
curTabId = null;
}
});

// Open the update page after every new update
chrome.runtime.onInstalled.addListener(function (details) {
if (details.reason === 'update') {
chrome.tabs.create({ url: "https://altair.sirmuel.design/updated" }, function (tab) {
console.log("New tab launched with https://altair.sirmuel.design/updated");
});
}
});
})();
2 changes: 1 addition & 1 deletion chrome-ext-files/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Altair GraphQL Client",
"short_name": "Altair",
"description": "The only graphQL client you'll ever need.",
"version": "1.5.1",
"version": "1.6.1",
"icons": {
"16": "assets/img/altair_logo_128.png",
"48": "assets/img/altair_logo_128.png",
Expand Down

0 comments on commit 1ccf42d

Please sign in to comment.