Skip to content

Commit

Permalink
build(deploy): add ember-cli-deploy-git
Browse files Browse the repository at this point in the history
ember-cli-deploy-git will allow me to easily deploy a build version of the demo app to gh-pages
  • Loading branch information
alexdiliberto committed Oct 9, 2017
1 parent c3811b1 commit b668c02
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
- `greenkeeper-lockfile` for Travis CI
- Adding back `useYarn` to ember-try to fix CI
- `ember-cli-deploy-git` to easily deploy the demo app

### Updated
- Ember CLI v2.15.1
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,29 +262,24 @@ cd ember-transformicons
yarn
```

## Server
## Serve Demo App

```sh
ember s
```

## Test Suite
## Test

```sh
yarn test # ember try:each
yarn mocha # cross-env DEBUG=ember-cli-addon-tests mocha
yarn test:all # ember try:each && mocha test/*-test.js
```

## Update Demo App
## Deploy

```sh
git checkout gh-pages
rm -rf assets/ && git add . && git commit -m 'Remove old assets'

git checkout master
ember github-pages:commit --message "Release v<release_num>"
git push origin gh-pages:gh-pages
ember deploy production
```

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
Expand Down
28 changes: 28 additions & 0 deletions config/deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* jshint node: true */

module.exports = function(deployTarget) {
var ENV = {
build: {}
// include other plugin configuration that applies to all deploy targets here
};

if (deployTarget === 'development') {
ENV.build.environment = 'development';
// configure other plugins for development deploy target here
}

if (deployTarget === 'staging') {
ENV.build.environment = 'production';
// configure other plugins for staging deploy target here
}

if (deployTarget === 'production') {
ENV.build.environment = 'production';
// configure other plugins for production deploy target here
}

// Note: if you need to build some configuration asynchronously, you can return
// a promise that resolves with the ENV object instead of returning the
// ENV object synchronously.
return ENV;
};
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
"ember-cli-content-security-policy": "1.0.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-dependency-lint": "1.0.2",
"ember-cli-deploy": "^1.0.1",
"ember-cli-deploy-build": "^1.1.0",
"ember-cli-deploy-git": "^1.3.0",
"ember-cli-eslint": "^4.2.0",
"ember-cli-github-pages": "0.1.2",
"ember-cli-htmlbars-inline-precompile": "^1.0.2",
Expand Down
74 changes: 69 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2011,10 +2011,22 @@ core-js@^2.4.0, core-js@^2.5.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"

[email protected]:
version "2.0.6"
resolved "https://registry.yarnpkg.com/core-object/-/core-object-2.0.6.tgz#60134b9c40ff69b27bc15e82db945e4df782961b"
dependencies:
chalk "^1.1.3"

core-object@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/core-object/-/core-object-1.1.0.tgz#86d63918733cf9da1a5aae729e62c0a88e66ad0a"

core-object@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/core-object/-/core-object-2.1.1.tgz#4b7a5f1edefcb1e6d0dcb58eab1b9f90bfc666a8"
dependencies:
chalk "^1.1.3"

core-object@^3.1.3:
version "3.1.5"
resolved "https://registry.yarnpkg.com/core-object/-/core-object-3.1.5.tgz#fa627b87502adc98045e44678e9a8ec3b9c0d2a9"
Expand Down Expand Up @@ -2082,7 +2094,7 @@ currently-unhandled@^0.4.1:
dependencies:
array-find-index "^1.0.1"

dag-map@^2.0.2:
dag-map@^2.0.1, dag-map@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68"

Expand Down Expand Up @@ -2253,6 +2265,10 @@ dot-prop@^4.1.0:
dependencies:
is-obj "^1.0.0"

dotenv@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-1.2.0.tgz#7cd73e16e07f057c8072147a5bc3a8677f0ab5c6"

ecc-jsbn@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
Expand Down Expand Up @@ -2310,7 +2326,7 @@ ember-cli-app-version@^3.1.0:
ember-cli-babel "^6.8.0"
git-repo-version "0.4.1"

ember-cli-babel@^5.1.3, ember-cli-babel@^5.1.7:
ember-cli-babel@^5.1.3, ember-cli-babel@^5.1.5, ember-cli-babel@^5.1.7:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-5.2.4.tgz#5ce4f46b08ed6f6d21e878619fb689719d6e8e13"
dependencies:
Expand Down Expand Up @@ -2371,6 +2387,50 @@ [email protected]:
chalk "^1.1.3"
semver "^4.3.6"

ember-cli-deploy-build@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ember-cli-deploy-build/-/ember-cli-deploy-build-1.1.0.tgz#44ef2e09301319a1fc5807e9ec30491a753e2483"
dependencies:
chalk "^1.0.0"
ember-cli-deploy-plugin "^0.2.1"
glob "^7.1.1"
rsvp "^3.5.0"

ember-cli-deploy-git@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ember-cli-deploy-git/-/ember-cli-deploy-git-1.3.0.tgz#a9c73f6d969f93c95e3aa1b0685063994aeff93b"
dependencies:
ember-cli-babel "^5.1.5"
ember-cli-deploy-plugin "^0.2.0"
fs-extra "^4.0.0"
ncp "^2.0.0"
rsvp "^3.1.0"

ember-cli-deploy-plugin@^0.2.0, ember-cli-deploy-plugin@^0.2.1:
version "0.2.9"
resolved "https://registry.yarnpkg.com/ember-cli-deploy-plugin/-/ember-cli-deploy-plugin-0.2.9.tgz#a3d395b8adad7ef68d8bacdd0b0f4a61bcf9e651"
dependencies:
chalk "^1.0.0"
core-object "2.0.6"
lodash.clonedeep "^4.5.0"

ember-cli-deploy-progress@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ember-cli-deploy-progress/-/ember-cli-deploy-progress-1.3.0.tgz#18663deed25b4d5397476332f25eed3c3fdf225a"

ember-cli-deploy@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ember-cli-deploy/-/ember-cli-deploy-1.0.1.tgz#6024c4fa0d8f8c09dfa57d251a7aca14e0ae2226"
dependencies:
chalk "^1.1.3"
core-object "^2.0.0"
dag-map "^2.0.1"
dotenv "^1.2.0"
ember-cli-deploy-progress "^1.3.0"
lodash "^4.0.0"
rsvp "^3.3.3"
silent-error "^1.0.0"

ember-cli-eslint@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/ember-cli-eslint/-/ember-cli-eslint-4.2.1.tgz#1718875632b3c10fa0da2f665d294c08f24b8ca3"
Expand Down Expand Up @@ -3417,7 +3477,7 @@ fs-extra@^3.0.0:
jsonfile "^3.0.0"
universalify "^0.1.0"

fs-extra@^4.0.2:
fs-extra@^4.0.0, fs-extra@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b"
dependencies:
Expand Down Expand Up @@ -3557,7 +3617,7 @@ [email protected]:
once "^1.3.0"
path-is-absolute "^1.0.0"

[email protected], glob@^7.0.0, glob@^7.0.3, glob@^7.0.4, glob@^7.0.5, glob@^7.1.2, glob@~7.1.1:
[email protected], glob@^7.0.0, glob@^7.0.3, glob@^7.0.4, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
Expand Down Expand Up @@ -4695,7 +4755,7 @@ lodash.bind@~2.3.0:
lodash._renative "~2.3.0"
lodash._slice "~2.3.0"

lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.4.1:
lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.4.1, lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"

Expand Down Expand Up @@ -5209,6 +5269,10 @@ natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"

ncp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"

[email protected]:
version "0.6.1"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
Expand Down

0 comments on commit b668c02

Please sign in to comment.