setup nuget server using baget
参考 腾讯云主机piggydb的架设 建立了nuget-server服务,其服务文件在/lib/systemd/system/nuget-server.service
[Unit] Description=zbjxb.cn:5555 nuget-server
[Service] ExecStart=/usr/bin/docker run --rm --name nuget-server -p 5555:80 --env-file /home/ubuntu/download/baget-folder/baget.env -v "/home/ubuntu/download/baget-folder/baget-data:/var/baget" loicsharma/baget:latest
[Install] WantedBy=multi-user.target
// 注册PSRepository Register-PSRepository -Name "BaGet" -SourceLocation "http://148.70.47.230:5555/v3/index.json" -PublishLocation "http://148.70.47.230:5555/api/v2/package" -InstallationPolicy "Trusted" // 注册完成后就可以Publish Module了 Publish-Module -Name PS-Module -Repository BaGet // 查询PSRepository Get-PSRepository // Find-Module #https://learn.microsoft.com/en-us/powershell/module/powershellget/find-module?view=powershellget-3.x // Install-Module #https://learn.microsoft.com/en-us/powershell/module/powershellget/install-module?view=powershellget-3.x // Get-Module -ListAvailable #列出本地可用的Module // Get-Module -Name module -List // Import-Module -Name module #然后就可以使用该module里的public对象了
函数与module
import-module -name .\UeTools.ps1