Skip to content

Commit

Permalink
Merge pull request #167 from DataDog/nachoBonafonte/RUMM-343-automate…
Browse files Browse the repository at this point in the history
…-sdk-version-releases

RUMM-343 Automate sdk version releases.
You can now:
 `make bump` to set the agent version the library and podspec files
 `make ship' to lint and push the podspec files
  • Loading branch information
nachoBonafonte authored Jul 8, 2020
2 parents 35e9a9f + af4906e commit 64b5a82
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Datadog/Datadog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
9E68FB56244707FD0013A8AA /* ObjcExceptionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E68FB54244707FD0013A8AA /* ObjcExceptionHandler.h */; settings = {ATTRIBUTES = (Private, ); }; };
9EB47B92247443FA004F90BE /* URLSessionSwizzler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EB47B91247443FA004F90BE /* URLSessionSwizzler.swift */; };
9ED583A32498C222004CFF2A /* TracingAutoInstrumentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9ED583A22498C222004CFF2A /* TracingAutoInstrumentation.swift */; };
E1D5AEA724B4D45B007F194B /* Versioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1D5AEA624B4D45A007F194B /* Versioning.swift */; };
E132727B24B333C700952F8B /* TracingBenchmarkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E132727A24B333C700952F8B /* TracingBenchmarkTests.swift */; };
E132727D24B35B5F00952F8B /* TracingStorageBenchmarkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E132727C24B35B5F00952F8B /* TracingStorageBenchmarkTests.swift */; };
9EFD112C24B32D29003A1A2B /* URLFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EFD112B24B32D29003A1A2B /* URLFilter.swift */; };
Expand Down Expand Up @@ -457,6 +458,7 @@
9ED583A22498C222004CFF2A /* TracingAutoInstrumentation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingAutoInstrumentation.swift; sourceTree = "<group>"; };
9EF49F1624476FBD004F2CA0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9EF49F17244770AD004F2CA0 /* DatadogIntegrationTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DatadogIntegrationTests.xcconfig; sourceTree = "<group>"; };
E1D5AEA624B4D45A007F194B /* Versioning.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Versioning.swift; sourceTree = "<group>"; };
E132727A24B333C700952F8B /* TracingBenchmarkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingBenchmarkTests.swift; sourceTree = "<group>"; };
E132727C24B35B5F00952F8B /* TracingStorageBenchmarkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingStorageBenchmarkTests.swift; sourceTree = "<group>"; };
9EFD112B24B32D29003A1A2B /* URLFilter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLFilter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -563,6 +565,7 @@
61C5A88D24509A1F00DA608C /* Tracer.swift */,
61E917D02465423600E6C631 /* TracerConfiguration.swift */,
61133BB52423979B00786299 /* DatadogConfiguration.swift */,
E1D5AEA624B4D45A007F194B /* Versioning.swift */,
61133B9E2423979B00786299 /* Core */,
61133BBC2423979B00786299 /* Logging */,
61C5A87724509A0C00DA608C /* Tracing */,
Expand Down Expand Up @@ -1635,6 +1638,7 @@
61C5A88B24509A0C00DA608C /* SpanOutput.swift in Sources */,
61133BE42423979B00786299 /* LogEncoder.swift in Sources */,
61C5A88424509A0C00DA608C /* DDSpan.swift in Sources */,
E1D5AEA724B4D45B007F194B /* Versioning.swift in Sources */,
61133BD82423979B00786299 /* HTTPClient.swift in Sources */,
61133BDB2423979B00786299 /* DatadogConfiguration.swift in Sources */,
614E9EB3244719FA007EE3E1 /* BundleType.swift in Sources */,
Expand Down
27 changes: 27 additions & 0 deletions DatadogSDK.podspec.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Pod::Spec.new do |s|
s.name = "DatadogSDK"
s.module_name = "Datadog"
s.version = "__DATADOG_VERSION__"
s.summary = "Official Datadog Swift SDK for iOS."

s.homepage = "https://www.datadoghq.com"
s.social_media_url = "https://twitter.com/datadoghq"

s.license = { :type => "Apache", :file => 'LICENSE' }
s.authors = {
"Maciek Grzybowski" => "[email protected]",
"Mert Buran" => "[email protected]"
}

s.swift_version = '5.1'
s.ios.deployment_target = '11.0'

s.source = { :git => "https://github.com/DataDog/dd-sdk-ios.git", :tag => s.version.to_s }

s.source_files = ["Sources/Datadog/**/*.swift",
"Sources/_Datadog_Private/**/*.{h,m}",
"Datadog/TargetSupport/Datadog/Datadog.h"]
s.public_header_files = "Datadog/TargetSupport/Datadog/Datadog.h"
s.private_header_files = "Sources/_Datadog_Private/include/*.h"
s.module_map = "Sources/Datadog/Datadog.modulemap"
end
23 changes: 23 additions & 0 deletions DatadogSDKObjc.podspec.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Pod::Spec.new do |s|
s.name = "DatadogSDKObjc"
s.module_name = "DatadogObjc"
s.version = "__DATADOG_VERSION__"
s.summary = "Official Datadog Objective-C SDK for iOS."

s.homepage = "https://www.datadoghq.com"
s.social_media_url = "https://twitter.com/datadoghq"

s.license = { :type => "Apache", :file => 'LICENSE' }
s.authors = {
"Maciek Grzybowski" => "[email protected]",
"Mert Buran" => "[email protected]"
}

s.swift_version = '5.1'
s.ios.deployment_target = '11.0'

s.source = { :git => 'https://github.com/DataDog/dd-sdk-ios.git', :tag => s.version.to_s }

s.source_files = "Sources/DatadogObjc/**/*.swift"
s.dependency 'DatadogSDK'
end
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all: tools dependencies xcodeproj-httpservermock templates
.PHONY : examples tools
.PHONY : tools

tools:
@echo "⚙️ Installing tools..."
Expand Down Expand Up @@ -30,3 +30,18 @@ test-carthage:
# Tests if current branch ships a valid Cocoapods project.
test-cocoapods:
@cd dependency-manager-tests/cocoapods && $(MAKE)

bump:
@read -p "Enter version number: " version; \
echo "// GENERATED FILE: Do not edit directly\n\ninternal let sdkVersion = \"$$version\"" > Sources/Datadog/Versioning.swift; \
sed "s/__DATADOG_VERSION__/$$version/g" DatadogSDK.podspec.src > DatadogSDK.podspec; \
sed "s/__DATADOG_VERSION__/$$version/g" DatadogSDKObjc.podspec.src > DatadogSDKObjc.podspec; \
git add . ; \
git commit -m "Bumped version to $$version"; \
echo Bumped version to $$version

ship:
pod spec lint DatadogSDK.podspec
pod spec lint DatadogSDKObjc.podspec
pod trunk push DatadogSDK.podspec
pod trunk push DatadogSDKObjc.podspec
4 changes: 0 additions & 4 deletions Sources/Datadog/Datadog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

import Foundation

/// SDK version associated with logs.
/// Should be synced with SDK releases.
internal let sdkVersion = "1.3.0-beta2"

/// Datadog SDK configuration object.
public class Datadog {
/// Provides information about the app.
Expand Down
3 changes: 3 additions & 0 deletions Sources/Datadog/Versioning.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// GENERATED FILE: Do not edit directly

internal let sdkVersion = "1.3.0-beta2"
3 changes: 2 additions & 1 deletion tools/license/check-license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function files {
-not -name "OTFormat.swift" \
-not -name "OTTracer.swift" \
-not -name "OTReference.swift" \
-not -name "OTSpanContext.swift"
-not -name "OTSpanContext.swift" \
-not -name "Versioning.swift"
}

FILES_WITH_MISSING_LICENSE=""
Expand Down

0 comments on commit 64b5a82

Please sign in to comment.