Revel models are defined under the models
package; so in order to import them one must use the full repo path relative to the %GOPATH/src folder which in this case project/app/models
thus results in
import PROJECTNAME/app/models
so far, so good i'f you'r using your app name as the folder name of your local dev machine and have dev+prod environments only.
Heroku's docs recommends using multiple apps for different environment (i.e. for staging). with the same repository with distinct origins;
This is where problem starts, now, since the staging enviromnent resides on alternative appname(let's say PROJECTNAME_STAGING
), it's sources are stored under PROJECTNAME_STAGING
but the actual code still import PROJECTNAME/app/models
instead of import PROJECTNAME_STAGING/app/models
; so compile fails, etc.
Is there any possibility to manage multiple environments with a single local repo and multiple origins with revel's heroku buildpack? or a feature is needed in the buildpack that is yet to be implemented?
In addition, there is this possible issue with the .godir
file that is required to be versioned and contain the git path to the app, so what about the multi-environment duality regarding this file?