skbkontur/cement

Name: cement

Owner: Kontur

Description: C# dependency management tool

Created: 2017-03-28 13:20:14.0

Updated: 2018-03-28 10:51:57.0

Pushed: 2018-03-23 10:39:09.0

Homepage:

Size: 3630

Language: C#

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Cement Build status

Get started

Install
Windows
  1. You should have git and Visual Studio or MSBuild Tools installed
  2. Download zip from https://github.com/skbkontur/cement/releases/latest
  3. Unzip and run dotnet\install.cmd
  4. Restart terminal
  5. Command cm shows you available commands in any directory
  6. If you have installed Visual Studio 2017 in custom folder run set VS150COMNTOOLS=D:\Program Files\Microsoft Visual Studio\2017\Professional\Common7\Tools\ (with your custom foler path) in cmd.
macOS
  1. You should have git and mono (5 or above) installed
  2. Download zip from https://github.com/skbkontur/cement/releases/latest
  3. Unzip and run ./install.sh from the dotnet directory
  4. Either add ~/bin/ to your PATH variable or run alias cm='mono ~/bin/dotnet/cm.exe'
  5. Run cm to see the list of commands
Linux

Here is a Dockerfile example of how to get Ubuntu image with cement installed

 ubuntu
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | tee /etc/apt/sources.list.d/mono-official.list
apt-get update
apt-get install -y mono-devel git wget
cd ~
git clone https://github.com/skbkontur/cement.git ~/cement
wget -O ~/cement/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mkdir ~/bin
cd ~/cement && mono nuget.exe restore -OutputDir packages/ && msbuild /p:Configuration=Release
mono ~/bin/dotnet/cm.exe reinstall
Work with cement

Use cm help to view all cement commands. Use cm %command_name% /? or cm help %command_name% to view command description.

All module descriptions are stored in a special git repo.

In the beginning your cement will use sample modules from https://github.com/KungA/cement-sample-modules/blob/master/modules

Command cm ls shows modules A, B, C, D.

Get modules

Let some commands run to get and build module A, which uses modules B, C, D.

cm init

All modules should be downloaded into one 'cement tracked' directory.

cm get A

Download module A with deps B, C, D.

cd A

Go to module directory.

cm build-deps

Build dependencies for current module in the right order.

cm build

Build current module. You can use it now.

Update dependencies
cm update-deps

Get latest versions of dependencies from git

cm build-deps

Need to build new version of modules, which were changed.

cm build

And current module.

Creating modules
  1. Specify git repo witch will contain all module descriptions like https://github.com/KungA/cement-sample-modules

  2. Add empty modules file to it and push

  3. Fill it into %userprofile%\.cement\settings file instead of git@github.com:KungA/cement-sample-modules.git

  4. Create repositories for your modules like

    https://github.com/KungA/cement-sample-A

    https://github.com/KungA/cement-sample-B

    https://github.com/KungA/cement-sample-C

    https://github.com/KungA/cement-sample-D

  5. Run cm module add A git@github.com:KungA/cement-sample-A.git to add your modules to cement

  6. Fill module.yaml file, describing cement modules (see appropriate documentation)

All commands description

here

Module.yaml format

here


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.