Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier linux build guide #1882

Closed
xposure opened this issue Nov 4, 2019 · 3 comments
Closed

Easier linux build guide #1882

xposure opened this issue Nov 4, 2019 · 3 comments
Labels

Comments

@xposure
Copy link

xposure commented Nov 4, 2019

If you remove this from GitVersionExe.csproj

    <PropertyGroup Condition=" '$(PackAsTool)' != 'true'">
        <TargetFrameworks>net472;$(TargetFrameworks);</TargetFrameworks>
    </PropertyGroup>

    <PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
        <ToolCommandName>dotnet-gitversion</ToolCommandName>
        <PackageId>GitVersion.Tool</PackageId>
        <PackageDescription>Derives SemVer information from a repository following GitFlow or GitHubFlow. This is the .NET Core Global Tool allowing usage of GitVersion from command line.</PackageDescription>
    </PropertyGroup>

    <ItemGroup Condition="'$(TargetFramework)'=='net472'">
        <PackageReference Include="JetBrains.Annotations" Version="$(PackageVersion_JetBrainsAnnotations)"></PackageReference>
        <PackageReference Include="LibGit2Sharp.NativeBinaries" Version="$(PackageVersion_LibGit2Sharp_NativeBinaries)" />
    </ItemGroup>

You can then simply go to src/GitVersionExe folder and run dotnet publish -c Release -r linux-x64 --framework netcoreapp3.0 /p:PublishSingleFile=true which will produce a single executable in bin/Release/netcoreapp3.0/ubuntu-x64/publish/ that you can then easily use.

The documentation at https://gitversion.readthedocs.io/en/latest/usage/command-line/ lead me down a long winding path of curse words and head aches and in the end it still didn't work. So I decided to just check out the code and see if I could simply build it from source and in a matter of minutes it worked...

This is of course after following these steps to get dotnet core sdk3:
https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-current

This issue is closed and notes about eventually being able to just use .net core #1229 that issue then relates to this PR #1269 which is now merged.

@stale
Copy link

stale bot commented Feb 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 2, 2020
@stale stale bot closed this as completed Mar 3, 2020
@asbjornu
Copy link
Member

asbjornu commented Mar 3, 2020

I'm sorry this was closed without a reply. If you have suggestions for how the documentation around this can be improved, we would warmly welcome a pull request.

@asbjornu asbjornu reopened this Mar 3, 2020
@stale stale bot removed the stale label Mar 3, 2020
@stale
Copy link

stale bot commented Jun 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 1, 2020
@stale stale bot closed this as completed Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants