Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Dec 19, 2014
2 parents 5ea0796 + c2d1441 commit a09933e
Show file tree
Hide file tree
Showing 42 changed files with 793 additions and 567 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
*.user
*.sln.docstates

.nuget/
tools/FAKE/
build-log.xml
Nuget.key
TestResult.xml

# Build results
[Bb]in/
[Cc]lientbin/
Expand All @@ -16,6 +22,7 @@
bin
obj
[Ll]ib/
*.ide/
*_i.c
*_p.c
*.ilk
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Geert van Horrik
Copyright (c) 2014 CatenaLogic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion NextVersion.txt

This file was deleted.

64 changes: 46 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ GitLink

GitLink let's users step through your code hosted on GitHub! **Help make .NET open source projects more accessible by enabling this for your .NET projects, it's just a single additional step in your build**. See the list of [projects using GitLink](#projects-using-gitlink).

<a href="https://pledgie.com/campaigns/26957"><img alt="Click here to lend your support to: GitLink and make a donation at pledgie.com !" src="https://pledgie.com/campaigns/26957.png?skin_name=chrome" border="0" /></a>

--

**Important note**
Expand All @@ -28,8 +30,14 @@ When using GitLink, the user no longer has to specify symbol servers. He/she onl

![Enabling source server support](doc/images/visualstudio_enablesourceserversupport.png)

# Troubleshooting

**Note that Visual Studio 2012 needs to run elevated in order to download the source server files due to a bug in Visual Studio 2012.**

If the source stepping is not working, double check that Visual Studio has a valid symbol cache directory to store the source files being downloaded:

![Enabling source server support](doc/images/visualstudio_symbolslocation.png)

# Supported git providers

GitLink supports the following providers out of the box (will auto-detect based on the url):
Expand All @@ -51,7 +59,7 @@ Providers currently being worked on:

It is also possible to specify a custom url provider.

# Using GitLink as command line tool #
# Using GitLink as command line tool

Using GitLink via the command line is very simple:

Expand All @@ -60,44 +68,55 @@ Using GitLink via the command line is very simple:

Below are a few examples.

## Running for the default branch ##
## Running for the default branch

GitLink.exe c:\source\catel -u https://github.com/catel/catel

This will use the default branch (which is in most cases **master**). You can find out the default branch by checking what branch is loaded by default on the GitHub page.

## Running for a specific branch ##
## Running for a specific branch

GitLink.exe c:\source\catel -u https://github.com/catel/catel -b develop

This will use the develop branch.

## Running for a specific branch and configuration ##
## Running for a specific branch and configuration

GitLink.exe c:\source\catel -u https://github.com/catel/catel -b develop -c debug

This will use the develop branch and the debug configuration.

## Getting help ##
## Running for a specific solution only

Sometimes a repository contains more than 1 solution file. By default, all solutions will be processed. To only process a single solution file, use the *-f* option:

GitLink.exe c:\source\catel -u https://github.com/catel/catel -f Catel.sln

## Ignoring projects

When specific projects should be ignored, use the *-ignore* option. This option accepts a comma separated list of projects to ignore:

GitLink.exe c:\source\catel -u https://github.com/catel/catel -f Catel.sln -ignore Catel.Core.WP80,Catel.MVVM.WP80

## Getting help

When you need help about GitLink, use the following command line:

GitLink.exe -help

## Logging to a file ##
## Logging to a file

When you need to log the information to a file, use the following command line:

GitLink.exe c:\source\catel -u https://github.com/catel/catel -b develop -l GitLinkLog.log


# Using GitLink in code #
# Using GitLink in code

GitLink is built with 2 usages in mind: command line and code reference. Though most people will use the command line version, it is possible to reference the executable and use the logic in code.

The command line implementation uses the same available API.

## Creating a context ##
## Creating a context

To link files to a Git project, a context must be created. The command line version does this by using the *ArgumentParser* class. It is also possible to create a context from scratch as shown in the example below:

Expand All @@ -114,33 +133,33 @@ It is possible to create a context based on command line arguments:
var context = ArgumentParser.Parse(@"c:\source\catel -u https://github.com/catel/catel -b develop");
```

## Linking a context ##
## Linking a context

Once a context is created, the *Linker* class can be used to actually link the files:

Linker.Link(context);

# How to get GitLink #
# How to get GitLink

There are three general ways to get GitLink:.
There are three general ways to get GitLink:

## Get it from GitHub ##
## Get it from GitHub

The releases will be available as separate executable download on the [releases tab](https://github.com/CatenaLogic/GitLink/releases) of the project.

## Get it via Chocolatey ##
## Get it via Chocolatey

If you want to install the tool on your (build) computer, the package is available via <a href="https://chocolatey.org/" target="_blank">Chocolatey</a>. To install, use the following command:

choco install GitLink

## Get it via NuGet ##
## Get it via NuGet

If you want to reference the assembly to use it in code, the recommended way to get it is via <a href="http://www.nuget.org/" target="_blank">NuGet</a>.

**Note that getting GitLink via NuGet will add it as a reference to the project**

# How does it work #
# How does it work

The SrcSrv tool (Srcsrv.dll) enables a client to retrieve the exact version of the source files that were used to build an application. Because the source code for a module can change between versions and over the course of years, it is important to look at the source code as it existed when the version of the module in question was built.

Expand All @@ -149,18 +168,27 @@ For more information, see the <a href="http://msdn.microsoft.com/en-us/library/w
GitLink creates a source index file and updates the PDB file so it will retrieve the files from the Git host file handler.

<a name="projects-using-gitlink"></a>
# Projects using GitLink #
# Projects using GitLink

Below is a list of projects already using GitLink (alphabetically ordered).

- <a href="http://www.catelproject.com" target="_blank">Catel</a>
- <a href="http://www.expandframework.com/" target="_blank">eXpand</a>
- <a href="https://github.com/fluentribbon/Fluent.Ribbon" target="_blank">Fluent.Ribbon</a>
- <a href="https://github.com/CatenaLogic/GitLink" target="_blank">GitLink</a>
- <a href="https://github.com/orcomp/Orc.AutomaticSupport" target="_blank">Orc.AutomaticSupport</a>
- <a href="https://github.com/orcomp/Orc.Collections" target="_blank">Orc.Collections</a>
- <a href="https://github.com/orcomp/Orc.Controls" target="_blank">Orc.Controls</a>
- <a href="https://github.com/orcomp/Orc.CsvHelper" target="_blank">Orc.CsvHelper</a>
- <a href="https://github.com/orcomp/Orc.Feedback" target="_blank">Orc.Feedback</a>
- <a href="https://github.com/orcomp/Orc.FilterBuilder" target="_blank">Orc.FilterBuilder</a>
- <a href="https://github.com/orcomp/Orc.LicenseManager" target="_blank">Orc.LicenseManager</a>
- <a href="https://github.com/orcomp/Orc.ProjectManagement" target="_blank">Orc.ProjectManagement</a>
- <a href="https://github.com/orcomp/Orc.Sort" target="_blank">Orc.Sort</a>
- <a href="https://github.com/orcomp/Orc.Squirrel" target="_blank">Orc.Squirrel</a>
- <a href="https://github.com/orcomp/Orc.WorkspaceManagement" target="_blank">Orc.WorkspaceManagement</a>
- <a href="https://github.com/orcomp/Orchestra" target="_blank">Orchestra</a>
- <a href="https://github.com/oxyplot/oxyplot" target="_blank">OxyPlot</a>
- <a href="http://romanticweb.net" target="_blank">Romantic Web</a>
- <a href="https://github.com/xunit/xunit" target="_blank">xUnit.net</a>
- <a href="https://github.com/xunit/visualstudio.xunit" target="_blank">xUnit.net Visual Studio Runner</a>
Expand All @@ -170,6 +198,6 @@ Are you using GitLink in your projects? Let us know and we will add your project
*Note that you can also create a pull request on this document and add it yourself.*


# Icon #
# Icon

Link by Dominic Whittle from The Noun Project
2 changes: 1 addition & 1 deletion deployment/Chocolatey/template/GitLink/GitLink.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<language>en-US</language>
<projectUrl>https://github.com/CatenaLogic/GitLink/</projectUrl>
<licenseUrl>https://github.com/CatenaLogic/GitLink/blob/develop/LICENSE</licenseUrl>
<iconUrl>https://raw.githubusercontent.com/CatenaLogic/GitLink/develop/design/logo/logo_64.png</iconUrl>
<iconUrl>https://raw.githubusercontent.com/CatenaLogic/GitLink/develop/design/logo/logo_128.png</iconUrl>
</metadata>
</package>

This file was deleted.

This file was deleted.

65 changes: 1 addition & 64 deletions doc/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,4 @@ For more information about issues or new feature requests, please visit:

Project website: https://github.com/CatenaLogic/GitLink/

**********************************************************

==================
Version 1.4.0
==================

Release date:
=============
2014/xx/xx

Added/fixed:
============
(x) #8 Console stays red after an error occurs

**********************************************************


==================
Version 1.2.0/1.3.0
==================

Release date:
=============
2014/04/20

Added/fixed:
============
(*) #7 Show relative paths to make to file names easier to read
(x) #5 When an error occurs, the console application will no longer wait for a key input press to prevent
it from blocking a build

**********************************************************


==================
Version 1.1.0
==================

Release date:
=============
2014/04/19

Added/fixed:
============
(+) #1 Created Chocolatey package for easier deployment
(+) #2 Added support for VB projects
(+) #3 Created NuGet package for deployment when being referenced from code

**********************************************************


==================
Version 1.0.0
==================

Release date:
=============
2014/04/17

Added/fixed:
============
First initial release

**********************************************************
**********************************************************
Binary file added doc/images/visualstudio_symbolslocation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/repositories.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\src\GitLink.Test\packages.config" />
<repository path="..\src\GitLink.Tests\packages.config" />
<repository path="..\src\GitLink\packages.config" />
</repositories>
10 changes: 10 additions & 0 deletions scripts - Build - Debug.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off

IF NOT "%VS110COMNTOOLS%" == "" (call "%VS110COMNTOOLS%vsvars32.bat")
IF NOT "%VS120COMNTOOLS%" == "" (call "%VS120COMNTOOLS%vsvars32.bat")
IF NOT "%VS130COMNTOOLS%" == "" (call "%VS130COMNTOOLS%vsvars32.bat")
IF NOT "%VS140COMNTOOLS%" == "" (call "%VS140COMNTOOLS%vsvars32.bat")


for /F %%A in ('dir /b src\*.sln') do call devenv src\%%A /build "Debug"
pause
10 changes: 10 additions & 0 deletions scripts - Build - Release.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off

IF NOT "%VS110COMNTOOLS%" == "" (call "%VS110COMNTOOLS%vsvars32.bat")
IF NOT "%VS120COMNTOOLS%" == "" (call "%VS120COMNTOOLS%vsvars32.bat")
IF NOT "%VS130COMNTOOLS%" == "" (call "%VS130COMNTOOLS%vsvars32.bat")
IF NOT "%VS140COMNTOOLS%" == "" (call "%VS140COMNTOOLS%vsvars32.bat")


for /F %%A in ('dir /b src\*.sln') do call devenv src\%%A /build "Release"
pause
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// --------------------------------------------------------------------------------------------------------------------


namespace GitLink.Test
namespace GitLink.Tests
{
using Catel.Test;
using NUnit.Framework;
Expand Down Expand Up @@ -44,6 +44,14 @@ public void CorrectlyParsesHelp()
Assert.IsTrue(context.IsHelp);
}

[TestCase]
public void CorrectlyParsesSolutionFile()
{
var context = ArgumentParser.ParseArguments("solutionDirectory -u http://github.com/CatenaLogic/GitLink -f someSolution");

Assert.AreEqual("someSolution", context.SolutionFile);
}

[TestCase]
public void CorrectlyParsesUrlAndBranchName()
{
Expand All @@ -65,9 +73,40 @@ public void CorrectlyParsesUrlAndConfiguration()
}

[TestCase]
public void ThrowsExceptionForInvalidNumberOfArguments()
public void CorrectlyParsesUrlAndConfigurationAndPlatform()
{
var context = ArgumentParser.ParseArguments("solutionDirectory -u http://github.com/CatenaLogic/GitLink -c someConfiguration -p \"Any CPU\"");

Assert.AreEqual("solutionDirectory", context.SolutionDirectory);
Assert.AreEqual("http://github.com/CatenaLogic/GitLink", context.TargetUrl);
Assert.AreEqual("someConfiguration", context.ConfigurationName);
Assert.AreEqual("Any CPU", context.PlatformName);
}

[TestCase]
public void CorrectlyParsesUrlAndConfigurationWithDebug()
{
ExceptionTester.CallMethodAndExpectException<GitLinkException>(() => ArgumentParser.ParseArguments("solutionDirectory -l logFilePath extraArg"));
var context = ArgumentParser.ParseArguments("solutionDirectory -u http://github.com/CatenaLogic/GitLink -debug -c someConfiguration");

Assert.AreEqual("solutionDirectory", context.SolutionDirectory);
Assert.AreEqual("http://github.com/CatenaLogic/GitLink", context.TargetUrl);
Assert.AreEqual("someConfiguration", context.ConfigurationName);
Assert.IsTrue(context.IsDebug);
}

[TestCase]
public void CorrectlyParsesIgnoredProjects()
{
var context = ArgumentParser.ParseArguments("solutionDirectory -u http://github.com/CatenaLogic/GitLink -debug -c someConfiguration -ignore test1,test2");

Assert.AreEqual("solutionDirectory", context.SolutionDirectory);
Assert.AreEqual("http://github.com/CatenaLogic/GitLink", context.TargetUrl);
Assert.AreEqual("someConfiguration", context.ConfigurationName);
Assert.IsTrue(context.IsDebug);

Assert.AreEqual(2, context.IgnoredProjects.Count);
Assert.AreEqual("test1", context.IgnoredProjects[0]);
Assert.AreEqual("test2", context.IgnoredProjects[1]);
}

[TestCase]
Expand Down
Loading

0 comments on commit a09933e

Please sign in to comment.