免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年8月3日 星期一

heroku how to set the current active app ?

[Q] heroku how to set the current active app ?
[Q] heroku how to select the target app?
[Q] heroku how to switch from one app to another ?


* if already in the local folder with git corresponding to the remote heroku app,
then the current folder is just the active app

* if not ,
heroku clone the app from remote heroku
$ heroku git:clone -a app_name
$ cd app_name




//=== https://devcenter.heroku.com/articles/git
local git , push to remote heroku server

heroku create command creates a new application on Heroku – along with a git remote




//=== pull or clone from heroku
To clone the source of an existing application from Heroku using Git,
$ heroku git:clone -a app_name

$ heroku git: clone -a app_name
! `git:` is not a heroku command.
! Perhaps you meant `auth` or `list`.
! See `heroku help` for a list of available commands.

--> cannot have space between "git:" and "clone"
--> $ heroku git:clone -a app_name



//===
https://devcenter.heroku.com/articles/using-the-cli
$ heroku login
$ heroku apps
$ heroku apps:info

to specify an explicit app name as follows:
$ heroku apps:info --app app_name



$ heroku apps --help

to delete an app
$ heroku apps:destroy --app app_name




//=== http://stackoverflow.com/questions/12169228/heroku-toolbelt-specify-app

$ heroku login

$ heroku logs
$ heroku logs -a app_name
$ hreoku logs --app app_name



//=== https://devcenter.heroku.com/articles/renaming-apps

Renaming app and Updating git remote alias

* if you are using the CLI to rename an app from inside the Git checkout directory, your remote will be updated automatically.
$ heroku apps:rename newname

* If you rename from the website or have other checkouts, such as those belonging to other developers, these will need to be updated manually.
$ heroku apps:rename newname --app oldname
$ git remote rm heroku
$ heroku git:remote -a newname



//=== https://devcenter.heroku.com/articles/cedar-14-migration
Create Cedar-14 app
$ heroku create --remote heroku14 --stack cedar-14 app14

$ git push heroku14 master


Upgrade the production app to Cedar-14
Once you have verified that your source code works correctly on the Cedar-14 staging app, you are ready to update the production app from Cedar to Cedar-14.

$ heroku stack:set cedar-14
$ git commit --allow-empty -m "Upgrading to Cedar-14"
$ git push heroku master



沒有留言:

張貼留言