-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Publish releases on Swift Package Registry #778
base: main
Are you sure you want to change the base?
Changes from all commits
2de56c8
cfeb008
83e0169
29d0da4
54aa1a1
1bd2494
b798caa
0df6f1a
c2a402f
b808822
50bbef6
7bc666a
9ccb675
9b57567
ac77566
003caee
d964f35
624cfab
9c7bdef
af54db3
fb1734e
071dcad
cc6a74a
5779dc2
19c1607
135fa12
9132d17
eed4a9c
95d863f
d38d652
3dd321d
ddf9f87
ca25799
153b3ae
0ce8c1e
e64b466
33e919d
12a23fc
6011f2f
f84d616
c3934e1
4113fd7
4612378
09232ff
72e679b
50be2cb
4dc6ad6
68ff8f1
dab764e
5566971
742be97
51ac2eb
9445ef1
842e81f
a99ea64
dcba3db
92bf38d
368dd01
422483d
bc2fce8
286fcd4
9836a02
3adabb3
3df14aa
afda51c
1ab8da0
1c3f632
ea1f2ce
a48450b
c80ea8f
cf80239
afa6e08
78e992a
7f212ef
6fc977e
1992932
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ class SwiftDependency( | |
"", | ||
"", | ||
"", | ||
SwiftDependency.DistributionMethod.GIT, | ||
DistributionMethod.GIT, | ||
) | ||
val XCTest = SwiftDependency( | ||
"XCTest", | ||
|
@@ -49,213 +49,36 @@ class SwiftDependency( | |
"", | ||
DistributionMethod.GIT, | ||
) | ||
val CRT = SwiftDependency( | ||
"AwsCommonRuntimeKit", | ||
null, | ||
"0.31.0", | ||
"https://github.com/awslabs/aws-crt-swift", | ||
"", | ||
"aws-crt-swift", | ||
DistributionMethod.GIT, | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The CRT SwiftDependency above is no longer used, and is deleted. |
||
val CLIENT_RUNTIME = SwiftDependency( | ||
"ClientRuntime", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY = SwiftDependency( | ||
"Smithy", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_IDENTITY_API = SwiftDependency( | ||
"SmithyIdentityAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_IDENTITY = SwiftDependency( | ||
"SmithyIdentity", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_RETRIES_API = SwiftDependency( | ||
"SmithyRetriesAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_RETRIES = SwiftDependency( | ||
"SmithyRetries", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_HTTP_API = SwiftDependency( | ||
"SmithyHTTPAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_HTTP_AUTH_API = SwiftDependency( | ||
"SmithyHTTPAuthAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_HTTP_AUTH = SwiftDependency( | ||
"SmithyHTTPAuth", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_CHECKSUMS_API = SwiftDependency( | ||
"SmithyChecksumsAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_CHECKSUMS = SwiftDependency( | ||
"SmithyChecksums", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_STREAMS = SwiftDependency( | ||
"SmithyStreams", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_EVENT_STREAMS_API = SwiftDependency( | ||
"SmithyEventStreamsAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_EVENT_STREAMS_AUTH_API = SwiftDependency( | ||
"SmithyEventStreamsAuthAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_EVENT_STREAMS = SwiftDependency( | ||
"SmithyEventStreams", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_TEST_UTIL = SwiftDependency( | ||
"SmithyTestUtil", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_READ_WRITE = SwiftDependency( | ||
"SmithyReadWrite", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_TIMESTAMPS = SwiftDependency( | ||
"SmithyTimestamps", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_XML = SwiftDependency( | ||
"SmithyXML", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_JSON = SwiftDependency( | ||
"SmithyJSON", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_FORM_URL = SwiftDependency( | ||
"SmithyFormURL", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val SMITHY_WAITERS_API = SwiftDependency( | ||
"SmithyWaitersAPI", | ||
"main", | ||
"0.0.1", | ||
"aws-sdk-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.SPR, | ||
) | ||
val CLIENT_RUNTIME = smithySwiftTargetNamed("ClientRuntime") | ||
val SMITHY = smithySwiftTargetNamed("Smithy") | ||
val SMITHY_IDENTITY = smithySwiftTargetNamed("SmithyIdentity") | ||
val SMITHY_RETRIES_API = smithySwiftTargetNamed("SmithyRetriesAPI") | ||
val SMITHY_RETRIES = smithySwiftTargetNamed("SmithyRetries") | ||
val SMITHY_HTTP_API = smithySwiftTargetNamed("SmithyHTTPAPI") | ||
val SMITHY_HTTP_AUTH_API = smithySwiftTargetNamed("SmithyHTTPAuthAPI") | ||
val SMITHY_HTTP_AUTH = smithySwiftTargetNamed("SmithyHTTPAuth") | ||
val SMITHY_STREAMS = smithySwiftTargetNamed("SmithyStreams") | ||
val SMITHY_EVENT_STREAMS_API = smithySwiftTargetNamed("SmithyEventStreamsAPI") | ||
val SMITHY_EVENT_STREAMS = smithySwiftTargetNamed("SmithyEventStreams") | ||
val SMITHY_TEST_UTIL = smithySwiftTargetNamed("SmithyTestUtil") | ||
val SMITHY_READ_WRITE = smithySwiftTargetNamed("SmithyReadWrite") | ||
val SMITHY_TIMESTAMPS = smithySwiftTargetNamed("SmithyTimestamps") | ||
val SMITHY_XML = smithySwiftTargetNamed("SmithyXML") | ||
val SMITHY_JSON = smithySwiftTargetNamed("SmithyJSON") | ||
val SMITHY_FORM_URL = smithySwiftTargetNamed("SmithyFormURL") | ||
val SMITHY_WAITERS_API = smithySwiftTargetNamed("SmithyWaitersAPI") | ||
|
||
private fun smithySwiftTargetNamed(name: String): SwiftDependency { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This helper function makes the SwiftDependency declarations above a lot less repetitive. Also, ignore the version numbers on Swift dependencies for now. A future PR will automatically set them from a configuration file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of these smithy-swift SwiftDependencies were also changed so that smithy-swift is a Git dependency, not installed from registry. |
||
return SwiftDependency( | ||
name, | ||
"main", | ||
"0.54.0", | ||
"https://github.com/awslabs/smithy-swift", | ||
"../../../smithy-swift", | ||
"smithy-swift", | ||
DistributionMethod.GIT, | ||
) | ||
} | ||
} | ||
|
||
override fun getDependencies(): List<SymbolDependency> { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ open class HttpProtocolServiceClient( | |
ClientRuntimeTypes.Core.Client, | ||
) { | ||
writer.write("public static let clientName = \$S", serviceSymbol.name) | ||
writer.write("public static let version = \$S", ctx.settings.moduleVersion) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The client gains this version property, which is used over in the accompanying AWS SDK PR to set the client version in the user agent. |
||
writer.write("let client: \$N", ClientRuntimeTypes.Http.SdkHttpClient) | ||
writer.write("let config: \$L", serviceConfig.typeName) | ||
writer.write("let serviceName = \$S", serviceName) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ import software.amazon.smithy.swift.codegen.SwiftDeclaration | |
import software.amazon.smithy.swift.codegen.SwiftDependency | ||
|
||
object SmithyTestUtilTypes { | ||
val TestInitializer = runtimeSymbol("TestInitializer") | ||
val TestBaseError = runtimeSymbol("TestBaseError") | ||
val TestInitializer = runtimeSymbol("TestInitializer", SwiftDeclaration.ENUM) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forgot to include a declaration type on this symbol in my previous PR |
||
val TestBaseError = runtimeSymbol("TestBaseError", SwiftDeclaration.STRUCT) | ||
val dummyIdentityResolver = runtimeSymbol("dummyIdentityResolver", SwiftDeclaration.FUNC) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SmithyTestUtil now needs this dependency on CRT (this was an oversight in the earlier TestInitializer PR.)