GitTools / GitVersion

From git log to SemVer in no time
https://gitversion.net/docs/
MIT License
2.82k stars 644 forks source link

[Improvement] Make pre-built binaries standalone #3587

Open fuero opened 1 year ago

fuero commented 1 year ago

Is your improvement request related to a problem? Please describe. I'd like to use GitVersion standalone without the .Net Framework present

Detailed Description

Provide another set of binaries that are built like this (example for Linux):

  dotnet publish \
    src/GitVersion.App/GitVersion.App.csproj \
    --runtime linux-x64 \
    --framework net6.0 \
    --sc \
    -o "${srcdir}/build" \
    /p:DebugType=None \
    /p:DebugSymbols=false \
    -p:PublishTrimmed=false \
    -p:PublishReadyToRun=true \
    -p:PublishSingleFile=true \
    -p:IncludeNativeLibrariesForSelfExtract=true

I'm building GitVersion this way in the AUR package I created: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gitversion

arturcic commented 1 year ago

Hey @fuero we dropped support for .net framework already, all the artifacts are build with the .net sdk only. You can see the way we currently build for the linux binaries we publish with the release: https://github.com/GitTools/GitVersion/blob/632597434d19319d281b697ae21743a3fe10c671/build/build/Tasks/Package/PackagePrepare.cs#L47.

I wonder if there is a way we can integrate the publishing of the AUR package into our release pipelines. Can you describe how a AUR package publishing happens? We can have something similar to how we build for homebrew

fuero commented 1 year ago

Sorry, I was mistaken. The binaries the homebrew package produces apparantly can't run without a .Net dependency, the binaries offered on Github are fine.

As for AUR - They're published by the author via git, see https://wiki.archlinux.org/title/Arch_User_Repository#Submitting_packages

arturcic commented 1 year ago

if I can see it correctly it's on a different repository - https://aur.archlinux.org/gitversion.git/ and there you specify how to build that. Question, is it possible to have for example the github repo instead (https://github.com/GitTools/GitVersion) and then we can add support for the scripts we need in order to be able to release new versions? Also I saw you're the author of the package, can we include the maintainers also there?

fuero commented 1 year ago

Here's an example of something similar: https://jamiemagee.co.uk/blog/maintaining-aur-packages-with-renovate/ That person keeps the packages they're managing in a Github Repo and selectively pushes updates to the AUR git repo via Github actions. If you want to do this, I'll happily sign over maintainership :-)

arturcic commented 1 year ago

To be honest I'd be happy to add support for that

fuero commented 1 year ago

Great - hit me up again once you're set up!

arturcic commented 1 year ago

Great - hit me up again once you're set up!

Deal

github-actions[bot] commented 11 months ago

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.