vsdep

package module
v0.0.0-...-1d71295 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

Vsdep

Find out which Visual Studio projects needs to build and which tests needs to run by checking differences between a git commit id and HEAD.

Vsdep parses all the solutions (.sln) and projects (.csproj) in a folder and creates dependency graph, then uses that graph for finding dependencies.

Install

go github.com/atakanozceviz/vsdep/vsdep

How to use

$ vsdep -h
Run vsdep with a commit ID in VS project's root.

vsdep [commit]

Some examples:
vsdep HEAD^
vsdep fd32f09
vsdep HEAD^^ -w ../

Commit ID can be path to project folder with leading ID:
vsdep ../otherProject/HEAD^^ -w ../

Usage:
  vsdep [flags]

Flags:
      --config string     config file (default is $HOME/.vsdep.yaml)
  -h, --help              help for vsdep
  -w, --walkpath string   the path to start the search for .sln files (default ".")
Example output:
$ vsdep HEAD^^
{
  "solutions": {
    "MyProjectName.sln": "templates/mvc/MyProjectName.sln",
    "Identity.sln": "modules/identity/Identity.sln",
    "Blogging.sln": "modules/blogging/Blogging.sln"
  },
  "tests": {
    "MyProjectName.Application.Tests": "templates/mvc/test/MyProjectName.Application.Tests/MyProjectName.Application.Tests.csproj",
    "MyProjectName.Web.Tests": "templates/mvc/test/MyProjectName.Web.Tests/MyProjectName.Web.Tests.csproj",
    "Identity.Application.Tests": "modules/identity/test/Identity.Application.Tests/Identity.Application.Tests.csproj"
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrint

func PrettyPrint(v interface{}) (err error)

PrettyPrint json to standard output.

Types

type Result

type Result struct {
	Solutions map[string]string `json:"solutions,omitempty"`
	Tests     map[string]string `json:"tests,omitempty"`
}

Result stores information about which solutions needs to build and which tests needs to run.

func FindOut

func FindOut(lastcommit string, walkpath ...string) (*Result, error)

FindOut which Visual Studio projects needs to build and which tests needs to run by checking differences between a git commit id and HEAD.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL