for 1 of projects using many dependencies in form of nuget packages. when change of them, need recreate package , deploy every time. have jenkins setup our task runner. wondering there way automate package creation , deployment nightly job example.
i have automated nuget package creation using jenkins : approach used : nuget package can created either nuspec file or project file. in our case use nuspec file automatic creation of nuget package. strategy followed find nuspec files in our project directory , pass nuspec file name command nuget pack <<your nuspec file name goes here>>
if approach can share command.
code :
cls @echo off e: cd << directory path of code >> setlocal enabledelayedexpansion rem automatic packaging when nuspec file found /d /r %%a in (*) ( cd %%a if exist *.nuspec ( echo *************************************************************************************************** echo located nuspec file in path : %%a /f %%b in ('dir /a /b^|findstr /i "nuspec"') set "res=%%b" & echo found nuspec file : !res! & echo **************** & echo packing using nuspec metadata & nuget pack !res! ) )
Comments
Post a Comment