ctaggart / SourceLink

Source Code On Demand
MIT License
356 stars 55 forks source link

Ability to convert to non-HTTPS urls for bitbucket server #356

Closed MeikTranel closed 6 years ago

MeikTranel commented 6 years ago

Currently the Bitbucket Server urlconverter forces HTTPS, which is definitely not bad at all, but because reasons i currently don't have the ability to use HTTPS on a private repository.

Would it be possible to enable a configuration allowing me to switch to HTTP?

ctaggart commented 6 years ago

You can just set the SourceLinkUrl. That would probably be easiest.

MeikTranel commented 6 years ago

Using MSBuild?

Like this?

<Project>
  <PropertyGroup>
    <DebugType>portable</DebugType>
    <SourceLinkCreate>true</SourceLinkCreate>
    <SourceLinkUrl>http://bitbucket.contoso.loc/projects/testProj/repos/testRepo/raw/*?at={commit}</SourceLinkUrl>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="NuGet.Build.Tasks.Pack" Version="4.6.2" PrivateAssets="all"/>
    <PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="all"/>
    <PackageReference Include="SourceLink.Copy.PdbFiles" Version="2.8.3" PrivateAssets="All" />
  </ItemGroup>
</Project>
MeikTranel commented 6 years ago

Well this worked. Thanks