From 55aeb9256c95c18f2515fe7284efec90e4536e86 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 24 Sep 2020 11:13:09 +0300 Subject: [PATCH 1/5] CI testing with swift 5.3 --- .travis.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.travis.yml b/.travis.yml index 79e81c0d..ceb11cb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,20 @@ jobs: - ./utils.py prepare-workspace macos script: - ./utils.py ci script-macos + - stage: test + language: swift + os: osx + osx_image: xcode12 # Swift 5.3 + env: + - HOMEBREW_NO_INSTALL_CLEANUP=1 + before_install: + - brew update + install: + - ./utils.py ci install-macos + before_script: + - ./utils.py prepare-workspace macos + script: + - ./utils.py ci script-macos - stage: test language: generic os: linux @@ -87,6 +101,16 @@ jobs: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: - ./utils.py ci script-linux + - stage: test + language: generic + os: linux + dist: xenial + env: + - SWIFT_VERSION=5.3 + install: + - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" + script: + - ./utils.py ci script-linux - stage: deploy if: tag IS present language: generic From 2c46351a4463d8822a9ed48c2c7ebde8d96bf1ca Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 24 Sep 2020 12:57:33 +0300 Subject: [PATCH 2/5] Fix building issue with swift 5.3 on linux --- Sources/ZIP/ByteReader+Zip.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/ZIP/ByteReader+Zip.swift b/Sources/ZIP/ByteReader+Zip.swift index 6047dd01..e2fc61ef 100644 --- a/Sources/ZIP/ByteReader+Zip.swift +++ b/Sources/ZIP/ByteReader+Zip.swift @@ -33,7 +33,11 @@ extension ByteReader { fileprivate extension String { #if os(Linux) - static let cp437Encoding: CFStringEncoding = UInt32(truncatingIfNeeded: UInt(kCFStringEncodingDOSLatinUS)) + #if compiler(>=5.3) + static let cp437Encoding: CFStringEncoding = CFStringEncoding(CFStringEncodings.dosLatinUS.rawValue) + #else + static let cp437Encoding: CFStringEncoding = UInt32(truncatingIfNeeded: UInt(kCFStringEncodingDOSLatinUS)) + #endif static let cp437Available: Bool = CFStringIsEncodingAvailable(cp437Encoding) #else static let cp437Encoding = CFStringEncoding(CFStringEncodings.dosLatinUS.rawValue) From 77b5f74252c15def2747d870a51aa6d56b79f3d9 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 24 Sep 2020 22:46:00 +0300 Subject: [PATCH 3/5] Add CI workaround for carthage being broken with Xcode 12 --- .travis.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ceb11cb4..2b3e6ddd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,7 +58,14 @@ jobs: install: - ./utils.py ci install-macos before_script: - - ./utils.py prepare-workspace macos + # - ./utils.py prepare-workspace macos + # TODO: Remove lines below when Carthage gets a workaround for problems with Xcode 12 + - xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) + - trap 'rm -f "$xcconfig"' INT TERM HUP EXIT + - echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig + - echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig + - export XCODE_XCCONFIG_FILE="$xcconfig" + - carthage bootstrap script: - ./utils.py ci script-macos - stage: test From ec4013fe9247de436479b9746c98f06e97574cae Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 24 Sep 2020 22:46:17 +0300 Subject: [PATCH 4/5] Use Xcode 11.4 for deploy stage in CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2b3e6ddd..dc9596a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -122,7 +122,7 @@ jobs: if: tag IS present language: generic os: osx - osx_image: xcode11.3 + osx_image: xcode11.4 env: - HOMEBREW_NO_INSTALL_CLEANUP=1 env: From cc68f9eb915ff8aa9b916797ea0f09c0bd8d30f8 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 24 Sep 2020 23:10:49 +0300 Subject: [PATCH 5/5] Prepare for 4.5.6 release --- .jazzy.yaml | 4 ++-- CHANGELOG.md | 4 ++++ SWCompression.podspec | 2 +- SWCompression.xcodeproj/SWCompression.plist | 4 ++-- SWCompression.xcodeproj/TestSWCompression.plist | 4 ++-- SWCompression.xcodeproj/project.pbxproj | 8 ++++---- Sources/swcomp/main.swift | 2 +- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.jazzy.yaml b/.jazzy.yaml index 21d85342..0b6549cb 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -3,11 +3,11 @@ sourcekitten_sourcefile: docs.json clean: true author: Timofey Solomko module: SWCompression -module_version: 4.5.5 +module_version: 4.5.6 copyright: '© 2020 Timofey Solomko' readme: README.md github_url: https://github.com/tsolomko/SWCompression -github_file_prefix: https://github.com/tsolomko/SWCompression/tree/4.5.5 +github_file_prefix: https://github.com/tsolomko/SWCompression/tree/4.5.6 theme: fullwidth custom_categories: diff --git a/CHANGELOG.md b/CHANGELOG.md index 176170f2..fae75d4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.5.6 + +- Fixed a compiling issue on Linux with Swift 5.3. + ## 4.5.5 - Fixed a crash which was sometimes happening when encountering non well-formed Extended Timestamp in ZIP files. diff --git a/SWCompression.podspec b/SWCompression.podspec index 582f64cd..35489e51 100644 --- a/SWCompression.podspec +++ b/SWCompression.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "SWCompression" - s.version = "4.5.5" + s.version = "4.5.6" s.summary = "A framework with functions for working with compression, archives and containers." s.description = "A framework with (de)compression algorithms and functions for processing various archives and containers." diff --git a/SWCompression.xcodeproj/SWCompression.plist b/SWCompression.xcodeproj/SWCompression.plist index d7de5a11..518b2856 100644 --- a/SWCompression.xcodeproj/SWCompression.plist +++ b/SWCompression.xcodeproj/SWCompression.plist @@ -15,9 +15,9 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.5.5 + 4.5.6 CFBundleVersion - 72 + 73 NSHumanReadableCopyright Copyright © 2020 Timofey Solomko. All rights reserved. diff --git a/SWCompression.xcodeproj/TestSWCompression.plist b/SWCompression.xcodeproj/TestSWCompression.plist index 3b2d716f..46874253 100644 --- a/SWCompression.xcodeproj/TestSWCompression.plist +++ b/SWCompression.xcodeproj/TestSWCompression.plist @@ -15,8 +15,8 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 4.5.5 + 4.5.6 CFBundleVersion - 72 + 73 diff --git a/SWCompression.xcodeproj/project.pbxproj b/SWCompression.xcodeproj/project.pbxproj index 409272b6..83eb2cfa 100644 --- a/SWCompression.xcodeproj/project.pbxproj +++ b/SWCompression.xcodeproj/project.pbxproj @@ -1240,7 +1240,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 72; + CURRENT_PROJECT_VERSION = 73; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -1299,7 +1299,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 72; + CURRENT_PROJECT_VERSION = 73; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; "FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = "\"$(SRCROOT)/Carthage/Build/tvOS\""; @@ -1339,7 +1339,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 72; + DYLIB_CURRENT_VERSION = 73; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -1366,7 +1366,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 72; + DYLIB_CURRENT_VERSION = 73; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/Sources/swcomp/main.swift b/Sources/swcomp/main.swift index 89ee03e2..ee44f834 100644 --- a/Sources/swcomp/main.swift +++ b/Sources/swcomp/main.swift @@ -7,7 +7,7 @@ import Foundation import SWCompression import SwiftCLI -let cli = CLI(name: "swcomp", version: "4.5.5", +let cli = CLI(name: "swcomp", version: "4.5.6", description: """ swcomp - small command-line client for SWCompression framework. Serves as an example of SWCompression usage.