Following these instructions will allow you to create multiple totally isolated bigsky environments.
Each environment will have its own: local git repo, local maven repo, python virtual environment and Intellij project.
After initial setup no special commands will have to be run to switch configurations. The only thing you need to remember is to type workon <virtual env name>
to activate the isolated enviroment.
A few of drawbacks to this approach are:
- Extra disk space use for each environment - additional space used for separate python virtualenv and maven local repo
- You have to remember to do
pip install ...
in each environment - Initial environment creation can take a bit of extra time since the local maven repo and virtual env have to be initialized
- Modify ~/.m2/settings.xml to parametize the maven local repo location.
<localRepository>${env.MAVEN_LOCAL_REPO}</localRepository>
- Modify ~/.bash_profile to set default MAVEN_LOCAL_REPO
export MAVEN_LOCAL_REPO=$HOME/.m2/repository
- Add virtualenv hooks for postactivate and predeactivate. This will make maven use a different local repository for each virtual environment whose project directory contains a pom.xml
- edit $WORKON_HOME/postactivate:
if [ -e $PWD/pom.xml ]; then
export MAVEN_LOCAL_REPO=$PWD.project/maven-local-repo
fi
- edit $WORKON_HOME/predeactivate:
export MAVEN_LOCAL_REPO=$HOME/.m2/repository
- Clone any number of bigsky repos and create a separate virtual environment for each clone using a command similar to this:
cd <BIGSKY-CLONE-DIR> && mkvirtualenv <ENV-NAME> -a $PWD
- Do the following in each bigsky clone to ensure everything is working
mkdir datastore
cp settingslocal.py.dev settingslocal.py
cp build-user.propertes.mac build-user.properties
- edit build-user.properties to update the path to the support directory
git submodule update --init
pip install -U setuptools
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install -r requirements_dev.txt
tools/build/mvn/flex.sh
-
Add your new bigsky clones to SourceTree and update their configuration to add any necessary remotes (ex. upstream, codebuilders)
-
Create an IntelliJ project for each clone using maven integration
- update maven settings in the project to override the maven home directory and local repository
- add any desired run configurations (ex. flex debug, python debug)
-
Repeat steps 4 - 7 for any future bigsky clones you would like to use