Merge branch 'automate-versioning'

This commit is contained in:
Davide De Rosa 2018-09-24 10:28:50 +02:00
commit ee017c0c6c
9 changed files with 32 additions and 12 deletions

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "TunnelKit"
s.version = "1.1.0"
s.version = File.read("ci/VERSION")
s.summary = "Non-official OpenVPN client for Apple platforms."
s.homepage = "https://github.com/keeshux/tunnelkit"

View File

@ -1102,7 +1102,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 169;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@ -1166,7 +1166,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 169;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@ -1199,7 +1199,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_CURRENT_VERSION = 169;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "$(SRCROOT)/TunnelKit-iOS/Info.plist";
@ -1222,7 +1222,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_CURRENT_VERSION = 169;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "$(SRCROOT)/TunnelKit-iOS/Info.plist";
@ -1245,7 +1245,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_CURRENT_VERSION = 169;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "$(SRCROOT)/TunnelKit-macOS/Info.plist";
@ -1268,7 +1268,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_CURRENT_VERSION = 169;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "$(SRCROOT)/TunnelKit-macOS/Info.plist";

View File

@ -40,7 +40,20 @@ import __TunnelKitNative
struct CoreConfiguration {
static let identifier = "com.algoritmico.TunnelKit"
static let version = "1.1.0-dev"
static let version: String = {
let bundle = Bundle(for: SessionProxy.self)
guard let info = bundle.infoDictionary else {
return ""
}
// guard let version = info["CFBundleShortVersionString"] as? String else {
// return ""
// }
// guard let build = info["CFBundleVersion"] as? String else {
// return version
// }
// return "\(version) (\(build))"
return info["CFBundleShortVersionString"] as? String ?? ""
}()
// MARK: Session

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>

1
ci/VERSION Normal file
View File

@ -0,0 +1 @@
1.1.0

6
ci/set_version.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
PWD=`dirname $0`
VERSION=`cat $PWD/VERSION`
BUILD=`git rev-list HEAD --count`
agvtool new-marketing-version $VERSION
agvtool new-version $BUILD