Declarative and easy git 'submodules without the pain of submodules.'
To install for linux or OS X systems, please run curl https://s3-us-west-2.amazonaws.com/mdlr-dist/v1/install.sh | bash
For docker-ized installs or systems where you are in the root shell, please run curl https://s3-us-west-2.amazonaws.com/mdlr-dist/v1/install-root.sh | bash
Download the .exe
binary for your platform:
From there, you can put the .exe
file where you like and run it from the command line/powershell.
If you have any issues, with the Windows install/functionality, please report them here.
Please run the install script for your platform above to get the latest updates. For windows users, replace the .exe
binary
cd project/directory/ # Enter the project directory
mdlr init
mdlr add --name depname --path deps/mydep --url https://github/org/mydep.git
mdlr import -f # Reset the module forcefully (wipe changes, if any) and then import it at the version in the mdlr.yml file. This is the recommended command
mdlr list # List the modules
mdlr status # Get the status overview
mdlr update -f # Reset the module forcefully (wipe changes, if any) and then update it and write the new update to the mdlr.yml file
vim mdlr.yml # View/edit the mdlr.yml file
In the project directory, run mdlr init
In the project directory, run mdlr import -f
In the project directory, run mdlr update -f
(that's like doing git pull in each module)
Go into the submodule directory, make modifications, and commit them.
Then go back to the project root repository, git status
, then git add .
and commit that change. It will commit the latest commit from the submodule.
If there are modified files in the submodule that are not committed, then it's impossible to commit it in the project root repository.
help
: get a help overviewinit
: generate a mdlr.yml file in the directorylist
: list the current modulesadd
: add a module to the mdlr.yml fileremove
: remove a moduleimport
: import a moduleupdate
: update a modulestatus
: get the status for the mdlr.yml or invidual modules
- Ubuntu 16.04 (Server or Desktop) operating system -- other similar systems and OS X might work, but aren't guaranteed to...
- GoLang 1.9.^ installed
- GoLang dependency manager installed (Install guide)
go get github.com/exlinc/mdlr
cd $GOPATH/src/github.com/exlinc/mdlr
dep ensure -v # Set to verbose to track the progress as this might take a while...
go build # Optionally, use go run main.go instead of the build+run flow and your code will compile every time you run with the latest changes
./mdlr # Runs the latest output of go build
ORgo run main.go # Compiles a temp binary from the latest changes and runs it all in one command
- Run
go install
which (if your$GOPATH/bin
is in your$PATH
) will create a globally-accessibletools-mdlr
binary that you can use to easily test a 'dev' version of your code anywhere on your dev system withtools-mdlr
./xplatform-build.sh
- See the output binaries in the
./build
directory!
The S3 upload is done by the maintainer (EXL Inc.) for new releases to the bucket used in the install scripts.
Contributions are welcome and appreciated in the form of issues and pull requests in this repo!