我正在尝试找出仅在以下情况下部署nuget软件包的方法
如果您检查脚本部分。它的构建和运行我的测试。如果我有以下一行,它将运行我的部署脚本。
./deploy/deploy.sh $TestPassingVar
但是我一直在阅读deployment
上的文档我一直在尝试添加部署部分。但是它总是返回错误。
Installing deploy dependencies
Successfully installed dpl-script-1.9.7
1 gem installed
!!! Script support is experimental !!!
dpl.2
Preparing deploy
dpl.3
Deploying application
Deploy start.
/home/travis/build/LindaLawton/google-analytics-dotnet-sdk
helloTest
./deploy/deploy.sh: 8: ./deploy/deploy.sh: nuget: not found
Script failed with status 127
failed to deploy
language: csharp
mono: none
dotnet: 2.1
dist: trusty
# Add build var for release.
env:
BUILD_CONFIGURATION=Release
NUPKG_DIR=$(pwd)/NuPkgs/Generated
# Install the .NET Core 2.0 runtime as that's what we build and test against
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main'
key_url: 'https://packages.microsoft.com/keys/microsoft.asc'
packages:
- dotnet-sharedframework-microsoft.netcore.app-1.0.8
- dotnet-sharedframework-microsoft.netcore.app-1.1.5
script:
- dotnet build -c $BUILD_CONFIGURATION src/Google.Analytics.SDK.Core
- dotnet build -c $BUILD_CONFIGURATION tests/Google.Analytics.SDK.Tests
- dotnet test -c $BUILD_CONFIGURATION tests/Google.Analytics.SDK.Tests
- dotnet pack src/Google.Analytics.SDK.Core --configuration $BUILD_CONFIGURATION --no-restore --no-build --output $NUPKG_DIR
- ls -la $NUPKG_DIR/*.nupkg
- ls -la ./deploy
- chmod +x ./deploy/deploy.sh
- ./deploy/deploy.sh $TestPassingVar
deploy:
skip_cleanup: true
provider: script
script: ./deploy/deploy.sh $TestPassingVar
on:
branch: master
这也不起作用。
script: bash ./deploy/deploy.sh $TestPassingVar