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/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Apr 19, 2014
2 parents e959537 + de2f7f9 commit a361981
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 8 deletions.
51 changes: 48 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GitHubLink let's users step through your code hosted on GitHub! **This makes sym

![Stepping through external source code](doc/images/GitHubLink_example.gif)

The idea is based on the [SourceLink project](https://github.com/ctaggart/SourceLink "SourceLink project"). However it requires FAKE and no everyone likes to write code in F#. GitHubLink is available as console application and can be references as assembly as well to be used in other .NET assemblies.
The idea is based on the [SourceLink project](https://github.com/ctaggart/SourceLink "SourceLink project"). However it requires FAKE and not everyone likes to write code in F#. GitHubLink is available as console application and can be references as assembly as well to be used in other .NET assemblies.

The advantage of GitHubLink is that it is fully customized for GitHub. It also works with GitHub urls so it **does not require a local git repository to work**. This makes it perfectly usable in continuous integration servers such as [Continua CI](http://www.finalbuilder.com/Continua-CI "Continua CI").

Expand All @@ -17,9 +17,9 @@ When using GitHubLink, the user no longer has to specify symbol servers. He/she

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

# Using GitHubLink #
# Using GitHubLink as command line tool #

Using GitHubLink is very simple:
Using GitHubLink via the command line is very simple:

1. Build the software (in release mode with pdb files enabled)
2. Run the console application with the right command line parameters
Expand Down Expand Up @@ -57,6 +57,51 @@ When you need to log the information to a file, use the following command line:
GitHubLink.exe c:\source\catel -u https://github.com/catel/catel -b develop -l GitHubLinkLog.log


# Using GitHubLink in code #

GitHubLink 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 ##

To link files to a GitHub 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:

var context = new GitHubLink.Context();
context.SolutionDirectory = @"c:\source\catel";
context.TargetUrl = "https://github.com/catel/catel";
context.TargetBranch = "develop";

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 ##

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

Linker.Link(context);

# How to get GitHubLink #

There are three general ways to get GitHubLink:.

## Get it from GitHub ##

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

## Get it via Chocolatey ##

If you want to install the tool on your (build) computer, the package is available via [Chocolatey](https://chocolatey.org/). To install, use the following command:

cinst GitHubLink

## Get it via NuGet ##

If you want to reference the assembly to use it in code, the recommended way to get it is via [NuGet](http://www.nuget.org/).

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

# 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 Down
24 changes: 24 additions & 0 deletions deployment/Chocolatey/template/GitHubLink.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>githublink</id>
<version>[VERSION]</version>
<title>GitHubLink</title>
<authors>GeertvanHorrik</authors>

<description>
GitHubLink let's users step through your code hosted on GitHub! This makes symbol servers obsolete which saves you both time
with uploading source files with symbols and the user no longer has to specify custom symbol servers (such as symbolsource.org).
</description>

<summary>
</summary>

<tags>source symbol symbols server sourcelink github stepping debugging</tags>

<language>en-US</language>
<projectUrl>https://github.com/GeertvanHorrik/GitHubLink/</projectUrl>
<licenseUrl>https://github.com/GeertvanHorrik/GitHubLink/blob/develop/LICENSE</licenseUrl>
<iconUrl>https://raw.githubusercontent.com/GeertvanHorrik/GitHubLink/develop/design/logo/logo_64.png</iconUrl>
</metadata>
</package>
2 changes: 2 additions & 0 deletions deployment/Chocolatey/template/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Generate-BinFile "ghl" "$packageFolder\Tools\GitHubLink.exe"
Write-ChocolateySuccess "GitHubLink"
3 changes: 3 additions & 0 deletions deployment/Chocolatey/template/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Remove-BinFile "ghl" "$packageFolder\Tools\GitHubLink.exe"
Remove-BinFile "GitHubLink" "$packageFolder\Tools\GitHubLink.exe"
Write-ChocolateySuccess "GitHubLink"
Binary file not shown.
2 changes: 1 addition & 1 deletion deployment/NuGet/template/GitHubLink.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>GitHubLink</id>
<id>githublink</id>
<version>[VERSION]</version>
<title>GitHubLink</title>
<authors>GeertvanHorrik</authors>
Expand Down
27 changes: 25 additions & 2 deletions doc/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Project website: https://github.com/GeertvanHorrik/GitHubLink
**********************************************************

==================
Version 1.0.0
Version 1.1.0
==================

Release date:
Expand All @@ -22,7 +22,30 @@ Release date:

Added/fixed:
============
xxx
xx

Roadmap:
========
See https://github.com/GeertvanHorrik/GitHubLink

Known issues:
=============
See https://github.com/GeertvanHorrik/GitHubLink

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


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

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

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

Roadmap:
========
Expand Down
2 changes: 1 addition & 1 deletion src/GitHubLink/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Context()

public string SolutionDirectory { get; set; }
public string ConfigurationName { get; set; }
public string TempDirectory { get; set; }
public string TempDirectory { get; private set; }

public string TargetUrl { get; set; }
public string TargetBranch { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion src/GitHubLink/Linker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public static int Link(Context context)
var gitPreparer = new GitPreparer(context);
gitPreparer.Prepare();

var projectFiles = Directory.GetFiles(context.SolutionDirectory, "*.csproj", SearchOption.AllDirectories);
var projectFiles = new List<string>();
projectFiles.AddRange(Directory.GetFiles(context.SolutionDirectory, "*.csproj", SearchOption.AllDirectories));
projectFiles.AddRange(Directory.GetFiles(context.SolutionDirectory, "*.vbproj", SearchOption.AllDirectories));

int projectCount = projectFiles.Count();
var failedProjects = new List<string>();
Expand Down

0 comments on commit a361981

Please sign in to comment.