Marko Kosunen, [email protected], 12.12.2018
All modules version controlled with this method can be used effortlessly and recursively as git submodules inside similar modules
The mehod of use is always the same
./init_submodules.sh
(if any)- Publish locally the submodules you want to use. (embedded to init_submodules.sh)
./configure && make
In build.sbt, the version of the current module is of from
"module--SNAPHOT"
It is created with line:
version := scala.sys.process.Process("git rev-parse --short HEAD").!!.mkString.replaceAll("\\s", "")+"-SNAPSHOT"
Dependencies to similar submodules are defined with the
function gitSubmoduleHashSnapshotVersion
and with the dependency definitions
libraryDependencies += "edu.berkeley.cs" %% "modulename" % gitSubmoduleHashSnapshotVersion("modulename")
This dependency is satisfied only if there is a locallly published (sbt publishLocal) submodule with the submodule hash of the current git submodule.
OBS1: every time the submodule is updated, it must be published locally. See init_submodules.sh for reference. Make it recursive if needed.
OBS2: If the submodules are edited and committed, the changes are visible at the top level ONLY if ALL the hierarchy levels of submodules from bottom module to top are git-added, git-committed and git-pushed. This is the normal operation of submodules.
Lorem ipsum...