Skip to content

renatogbp/git-versioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-versioning

.Net Core with GitVersion

Run commands to set Assmebly Version as environment variable so it can be used by CI/CD

	dotnet-gitversion > gitversion.json

extract the variable as the following

	
	sed -i '1d;26d;s/  //;s/"//g;s/,//;s/:/=/' gitversion.json
	export $(grep AssemblySemVer gitversion.json | xargs)

or you can use jq as

	cat gitversion.json
        apt update
        apt install -y jq
        export MajorMinorPatch=$(jq -r '.MajorMinorPatch' gitversion.json)
        export BuildMetaData=$(jq -r '.BuildMetaData' gitversion.json)
        export PreReleaseTag=$(jq -r '.PreReleaseTag' gitversion.json)

About

.Net Core with GitVersion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages