Skip to content

Commit 86a5ac2

Browse files
ci(codesign): add strong naming
1 parent 3867f52 commit 86a5ac2

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ install:
1010
- nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages
1111
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner
1212
script:
13-
- xbuild /p:Configuration=Release ./OptimizelySDK.Travis.sln
13+
- xbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$TRAVIS_BUILD_DIR/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln
1414
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll
15+
- find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do sn -R $file ./keypair.snk; done
1516
after_success:
1617
- pip install --user awscli
1718
- find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do (AWS_ACCESS_KEY_ID=$OFTA_KEY AWS_SECRET_ACCESS_KEY=$OFTA_SECRET AWS_DEFAULT_REGION=$OFTA_REGION aws s3 cp $file s3://optly-fs-travisci-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/$(basename $file)-unsigned); done
@@ -44,8 +45,9 @@ jobs:
4445
install:
4546
- dotnet restore OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj
4647
script:
47-
- dotnet build OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj
48+
- dotnet build OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj -c dotnet.config
49+
- sn -R ./OptimizelySDK.NetStandard16/bin/dotnet.config/netstandard1.6/OptimizelySDK.NetStandard16.dll ./keypair.snk
4850
# TODO: no dotnet test yet for NetStandard16
4951
after_success:
5052
- pip install --user awscli
51-
- (AWS_ACCESS_KEY_ID=$OFTA_KEY AWS_SECRET_ACCESS_KEY=$OFTA_SECRET AWS_DEFAULT_REGION=$OFTA_REGION aws s3 cp ./OptimizelySDK.NetStandard16/bin/Debug/netstandard1.6/OptimizelySDK.NetStandard16.dll s3://optly-fs-travisci-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/OptimizelySDK.NetStandard16.dll-unsigned)
53+
- (AWS_ACCESS_KEY_ID=$OFTA_KEY AWS_SECRET_ACCESS_KEY=$OFTA_SECRET AWS_DEFAULT_REGION=$OFTA_REGION aws s3 cp ./OptimizelySDK.NetStandard16/bin/dotnet.config/netstandard1.6/OptimizelySDK.NetStandard16.dll s3://optly-fs-travisci-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/OptimizelySDK.NetStandard16.dll-unsigned)

dotnet.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"buildOptions": {
3+
"keyFile": "keypair.snk"
4+
}
5+
}

0 commit comments

Comments
 (0)