Skip to content

Instantly share code, notes, and snippets.

@atifaziz
Created January 22, 2020 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atifaziz/82d6b4fb4037b7e37a0d916309a48725 to your computer and use it in GitHub Desktop.
Save atifaziz/82d6b4fb4037b7e37a0d916309a48725 to your computer and use it in GitHub Desktop.
Windows batch for local/private NuGet packaging of projects
@echo off
setlocal
for /f "usebackq" %%f in (`PowerShell -C "([datetimeoffset](git ls -1 --pretty=%%cI)).ToUniversalTime().ToString('yyyyMMdd''T''HHmm')"`) do set COMMIT_TIMESTAMP=%%f
if not %ERRORLEVEL%==0 exit /b %ERRORLEVEL%
call "%~dp0pack.cmd" priv-%COMMIT_TIMESTAMP%
exit /b %ERRORLEVEL%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment