Skip to content

Instantly share code, notes, and snippets.

@jerviscui
Created January 17, 2022 09:09
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 jerviscui/0ef7b55cf45a3d4b5623940f00a31fb2 to your computer and use it in GitHub Desktop.
Save jerviscui/0ef7b55cf45a3d4b5623940f00a31fb2 to your computer and use it in GitHub Desktop.
Pack and publish NuGet package.
@set curdir=%cd%
:: echo %curdir%
:: build
@echo 1. build
@cd %curdir%\src
dotnet clean >nul
dotnet build --configuration Release >nul
:: pack
@echo.
@echo 2. pack
@cd %curdir%\nupkgs
@del /s /q /f *.nupkg >nul 2>nul
@cd %curdir%\src
@cd ./Ft.Parking.Hardware.Camera.Ybsy
dotnet pack -c Release -o %curdir%\nupkgs >nul
@cd ../
@cd ./Ft.Parking.Hardware.Indicator.Absen
dotnet pack -c Release -o %curdir%\nupkgs >nul
@cd ../
@cd ./Ft.Parking.Hardware.SelfPayment.Ybsy
dotnet pack -c Release -o %curdir%\nupkgs >nul
:: publish
@echo.
@echo 3. publish
@cd %curdir%\nupkgs
@for %%i in (*.nupkg) do @(
:: echo %%i
dotnet nuget push %%i --skip-duplicate -s https://repo.fangte.com/ --no-service-endpoint
)
@pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment