From 1cfd47d7e054bcb97e9867c044de7250e656d38e Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Mon, 15 Oct 2018 18:29:11 -0600 Subject: [PATCH 01/26] =?UTF-8?q?=E2=AC=86=EF=B8=8F=EF=B8=8F=20danger=20(5?= =?UTF-8?q?.7.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6bb713..0aa3347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - 🧰 MasKit Framework #175 - 🛠 Xcode 10 & Swift 4.2 #173 - â™ģī¸ Use Carthage rather than CocoaPods to manage dependencies #169 +- âŦ†ī¸ danger (5.7.0) #176 ## [v1.4.2] - Sign-In Disabled - 2018-08-12 diff --git a/Gemfile.lock b/Gemfile.lock index 0a42bfa..b101e0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GEM colored2 (3.1.2) cork (0.3.0) colored2 (~> 3.1) - danger (5.6.5) + danger (5.7.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -23,7 +23,7 @@ GEM no_proxy_fix octokit (~> 4.7) terminal-table (~> 1) - faraday (0.15.2) + faraday (0.15.3) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) @@ -32,7 +32,7 @@ GEM multipart-post (2.0.0) nap (1.1.0) no_proxy_fix (0.1.2) - octokit (4.11.0) + octokit (4.13.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) public_suffix (3.0.3) @@ -54,4 +54,4 @@ DEPENDENCIES xcpretty BUNDLED WITH - 1.16.4 + 1.16.6 From 343c27b517b47a842279ebb4fb09d105425d6f9f Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Mon, 15 Oct 2018 18:49:02 -0600 Subject: [PATCH 02/26] =?UTF-8?q?=F0=9F=8D=BA=20Revert=20formula=20build?= =?UTF-8?q?=20to=20use=20project?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Homebrew/mas.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Homebrew/mas.rb b/Homebrew/mas.rb index 37b578b..0f70af2 100644 --- a/Homebrew/mas.rb +++ b/Homebrew/mas.rb @@ -17,8 +17,9 @@ class Mas < Formula def install - xcodebuild "-workspace", "mas-cli.xcworkspace", + xcodebuild "-project", "mas-cli.xcodeproj", "-scheme", "mas-cli Release", + "-configuration," "Release", "SYMROOT=#{buildpath.realpath}" bin.install buildpath/"build/mas" From f64b0714684222b63abfd94fd3b625a63e2eeab8 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Mon, 15 Oct 2018 22:17:07 -0600 Subject: [PATCH 03/26] =?UTF-8?q?=F0=9F=93=A6=20Build=20an=20installer=20p?= =?UTF-8?q?ackage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Homebrew/Components.plist | 29 ++++++++++++++++++++++ Homebrew/Distribution.plist | 21 ++++++++++++++++ mas-cli.xcodeproj/project.pbxproj | 6 ----- script/clean | 4 ++- script/package | 41 ++++++++++++++++++++++++++----- 5 files changed, 88 insertions(+), 13 deletions(-) create mode 100644 Homebrew/Components.plist create mode 100644 Homebrew/Distribution.plist diff --git a/Homebrew/Components.plist b/Homebrew/Components.plist new file mode 100644 index 0000000..885afc0 --- /dev/null +++ b/Homebrew/Components.plist @@ -0,0 +1,29 @@ + + + + + + BundleIsVersionChecked + + BundleOverwriteAction + upgrade + ChildBundles + + + BundleOverwriteAction + + RootRelativeBundlePath + Library/Frameworks/MasKit.framework/Versions/A/Frameworks/Commandant.framework + + + BundleOverwriteAction + + RootRelativeBundlePath + Library/Frameworks/MasKit.framework/Versions/A/Frameworks/Result.framework + + + RootRelativeBundlePath + Library/Frameworks/MasKit.framework + + + diff --git a/Homebrew/Distribution.plist b/Homebrew/Distribution.plist new file mode 100644 index 0000000..ec2d781 --- /dev/null +++ b/Homebrew/Distribution.plist @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + MasTemp.pkg + diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 035f1d6..628f14a 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -785,12 +785,10 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; COPY_PHASE_STRIP = NO; DEPLOYMENT_LOCATION = YES; - DSTROOT = "$(SRCROOT)"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INSTALL_PATH = /build; LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -825,13 +823,11 @@ FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = MasKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = at.phatbl.MasKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_INCLUDE_PATHS = "$(inherited) $(SRCROOT)/PrivateFrameworks/CommerceKit $(SRCROOT)/PrivateFrameworks/StoreFoundation"; SWIFT_VERSION = 4.2; @@ -864,12 +860,10 @@ FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = MasKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = at.phatbl.MasKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; SWIFT_INCLUDE_PATHS = "$(inherited) $(SRCROOT)/PrivateFrameworks/CommerceKit $(SRCROOT)/PrivateFrameworks/StoreFoundation"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.2; diff --git a/script/clean b/script/clean index b4d67ae..e532fb6 100755 --- a/script/clean +++ b/script/clean @@ -1,9 +1,11 @@ #!/bin/bash -e BUILD_DIR=build +INSTALL_DIR=/tmp/mas-cli.dst main() { - rm -rf $BUILD_DIR/ + rm -rf ${BUILD_DIR:?} + rm -rf ${INSTALL_DIR:?} } main diff --git a/script/package b/script/package index d09a465..09490bb 100755 --- a/script/package +++ b/script/package @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/bin/bash -ex + +xcodebuild install pushd build @@ -6,12 +8,39 @@ echo "==> 🗜ī¸ Compressing mas.xcarchive" zip -r mas.xcarchive.zip mas.xcarchive echo "==> ī¸đŸ—œī¸ Compressing binary and framework" -pushd mas.xcarchive/Products/build -zip -r mas-cli.zip mas MasKit.framework -mv mas-cli.zip ../../../ +pushd mas.xcarchive/Products +zip -r \ + mas-cli.zip \ + usr/local/bin/mas \ + Library/Frameworks/MasKit.framework +mv mas-cli.zip ../../ popd -echo -n "==> đŸ”ĸ SHA256: " -shasum -a 256 mas-cli.zip +echo "==> đŸ“Ļ Assemble an installer package" +IDENTIFIER=com.mphys.mas-cli +COMPONENTS_PLIST=../Homebrew/Components.plist +DISTRIBUTION_PLIST=../Homebrew/Distribution.plist +INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst +INTERNAL_PACKAGE=mas_temp.pkg +OUTPUT_PACKAGE=mas.pkg +VERSION_STRING=1.1.1 + +tree "$INSTALL_TEMPORARY_FOLDER" + +pkgbuild \ + --component-plist "$COMPONENTS_PLIST" \ + --identifier "$IDENTIFIER" \ + --install-location "/" \ + --root "$INSTALL_TEMPORARY_FOLDER" \ + --version "$VERSION_STRING" \ + "$INTERNAL_PACKAGE" + +productbuild \ + --distribution "$DISTRIBUTION_PLIST" \ + --package-path "$INTERNAL_PACKAGE" \ + "$OUTPUT_PACKAGE" + +echo -n "==> đŸ”ĸ SHA256 " +shasum -a 256 mas-cli.zip mas.xcarchive.zip mas.pkg popd From 1d1b15cb563f9211f2c6f240feabc7614616fc1a Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Mon, 15 Oct 2018 22:27:20 -0600 Subject: [PATCH 04/26] =?UTF-8?q?=F0=9F=9B=A3=EF=B8=8F=20Revise=20package?= =?UTF-8?q?=20paths?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Homebrew/Components.plist | 6 +++--- Homebrew/Distribution.plist | 2 +- mas-cli.xcodeproj/project.pbxproj | 3 +++ script/package | 10 ++++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Homebrew/Components.plist b/Homebrew/Components.plist index 885afc0..e2798c2 100644 --- a/Homebrew/Components.plist +++ b/Homebrew/Components.plist @@ -13,17 +13,17 @@ BundleOverwriteAction RootRelativeBundlePath - Library/Frameworks/MasKit.framework/Versions/A/Frameworks/Commandant.framework + Frameworks/MasKit.framework/Versions/A/Frameworks/Commandant.framework BundleOverwriteAction RootRelativeBundlePath - Library/Frameworks/MasKit.framework/Versions/A/Frameworks/Result.framework + Frameworks/MasKit.framework/Versions/A/Frameworks/Result.framework RootRelativeBundlePath - Library/Frameworks/MasKit.framework + Frameworks/MasKit.framework diff --git a/Homebrew/Distribution.plist b/Homebrew/Distribution.plist index ec2d781..2451c93 100644 --- a/Homebrew/Distribution.plist +++ b/Homebrew/Distribution.plist @@ -17,5 +17,5 @@ - MasTemp.pkg + mas_temp.pkg diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 628f14a..364719e 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -771,6 +771,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); + INSTALL_PATH = /bin; LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -789,6 +790,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); + INSTALL_PATH = /bin; LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -860,6 +862,7 @@ FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = MasKit/Info.plist; + INSTALL_PATH = /Frameworks; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = at.phatbl.MasKit; diff --git a/script/package b/script/package index 09490bb..508fa5c 100755 --- a/script/package +++ b/script/package @@ -1,6 +1,8 @@ #!/bin/bash -ex -xcodebuild install +set -o pipefail && \ + xcodebuild install \ + | bundle exec xcpretty --color pushd build @@ -11,8 +13,8 @@ echo "==> ī¸đŸ—œī¸ Compressing binary and framework" pushd mas.xcarchive/Products zip -r \ mas-cli.zip \ - usr/local/bin/mas \ - Library/Frameworks/MasKit.framework + bin/mas \ + Frameworks/MasKit.framework mv mas-cli.zip ../../ popd @@ -40,7 +42,7 @@ productbuild \ --package-path "$INTERNAL_PACKAGE" \ "$OUTPUT_PACKAGE" -echo -n "==> đŸ”ĸ SHA256 " +echo "==> đŸ”ĸ Files Hashes" shasum -a 256 mas-cli.zip mas.xcarchive.zip mas.pkg popd From 4c8fcce914696bd51bd23ec6eccf09732942aa8b Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 15:54:02 -0600 Subject: [PATCH 05/26] =?UTF-8?q?=F0=9F=90=9B=20Fix=20package=20using=20/u?= =?UTF-8?q?sr/local=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/package | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/package b/script/package index 508fa5c..ee2a79c 100755 --- a/script/package +++ b/script/package @@ -29,14 +29,19 @@ VERSION_STRING=1.1.1 tree "$INSTALL_TEMPORARY_FOLDER" +# Assemble pkg. Using /usr/local prefix to avoid the following errors with "/" +# - installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.) +# - GUI warning: This package is incompatible with this version of macOS and may fail to install. (may damage your system... ) pkgbuild \ --component-plist "$COMPONENTS_PLIST" \ --identifier "$IDENTIFIER" \ - --install-location "/" \ + --install-location "/usr/local" \ --root "$INSTALL_TEMPORARY_FOLDER" \ --version "$VERSION_STRING" \ "$INTERNAL_PACKAGE" +# Build 2nd pkg from 1st. Not sure why, but this is how Carthage does it. +# https://github.com/Carthage/Carthage/blob/master/Makefile#L87 productbuild \ --distribution "$DISTRIBUTION_PLIST" \ --package-path "$INTERNAL_PACKAGE" \ From b04cf3be333e8f0de16b25b7ca6d8956b3f6f85b Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 15:54:22 -0600 Subject: [PATCH 06/26] =?UTF-8?q?=E2=9C=A8=20Add=20install=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/install | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 script/install diff --git a/script/install b/script/install new file mode 100755 index 0000000..51823e2 --- /dev/null +++ b/script/install @@ -0,0 +1,9 @@ +#!/bin/bash -ex + +echo "==> 📲 Installing mas" + +sudo installer \ + -pkg build/mas.pkg \ + -target / + +pkginfo com.mphys.mas-cli From 08ba0d42cf93181dcd04a8d252cc06ab147e4cb6 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 15:59:42 -0600 Subject: [PATCH 07/26] =?UTF-8?q?=F0=9F=94=96=20Version=201.4.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/mas-cli-Info.plist | 2 +- CHANGELOG.md | 6 +++++- MasKit/Info.plist | 4 ++-- MasKitTests/Info.plist | 4 ++-- mas-cli.xcodeproj/project.pbxproj | 12 ++++++------ script/package | 3 ++- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/App/mas-cli-Info.plist b/App/mas-cli-Info.plist index 6a348b2..3b1ef73 100644 --- a/App/mas-cli-Info.plist +++ b/App/mas-cli-Info.plist @@ -11,6 +11,6 @@ CFBundleName mas-cli CFBundleShortVersionString - 1.4.2 + 1.4.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aa3347..d72dc76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [v1.4.3] - 2018-10-16 + - 🧰 MasKit Framework #175 - 🛠 Xcode 10 & Swift 4.2 #173 - â™ģī¸ Use Carthage rather than CocoaPods to manage dependencies #169 - âŦ†ī¸ danger (5.7.0) #176 -## [v1.4.2] - Sign-In Disabled - 2018-08-12 +## [v1.4.2] Sign-In Disabled - 2018-08-12 + +> Version 1.4.2 was never [released](https://github.com/Homebrew/homebrew-core/pull/31058) through Homebrew. - 🚏đŸ“Ĩ🙅đŸģ‍♀ī¸ Disabled `signin` command on macOS 10.13+ #162 - An error is immediately returned instead of crashing on newer macOS versions. diff --git a/MasKit/Info.plist b/MasKit/Info.plist index 7d8659f..5151ef3 100644 --- a/MasKit/Info.plist +++ b/MasKit/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.4.3 CFBundleVersion - $(CURRENT_PROJECT_VERSION) + 10403000 NSHumanReadableCopyright Copyright Š 2018 Andrew Naylor. All rights reserved. diff --git a/MasKitTests/Info.plist b/MasKitTests/Info.plist index 6c40a6c..a7b93cd 100644 --- a/MasKitTests/Info.plist +++ b/MasKitTests/Info.plist @@ -15,8 +15,8 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.0 + 1.4.3 CFBundleVersion - 1 + 10403000 diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 364719e..b26305a 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -666,7 +666,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CREATE_INFOPLIST_SECTION_IN_BINARY = YES; - CURRENT_PROJECT_VERSION = 10402000; + CURRENT_PROJECT_VERSION = 10403000; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -732,7 +732,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CREATE_INFOPLIST_SECTION_IN_BINARY = YES; - CURRENT_PROJECT_VERSION = 10402000; + CURRENT_PROJECT_VERSION = 10403000; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -813,10 +813,10 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 10403000; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 10403000; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -850,10 +850,10 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 10403000; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 10403000; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/script/package b/script/package index ee2a79c..7eb5dc5 100755 --- a/script/package +++ b/script/package @@ -25,7 +25,8 @@ DISTRIBUTION_PLIST=../Homebrew/Distribution.plist INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst INTERNAL_PACKAGE=mas_temp.pkg OUTPUT_PACKAGE=mas.pkg -VERSION_STRING=1.1.1 +# TODO: Make VERSION_STRING dynamic +VERSION_STRING=1.4.3 tree "$INSTALL_TEMPORARY_FOLDER" From 07435bea8fe55b414b9094eb78d78b78e2ed0dbd Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 17:30:12 -0600 Subject: [PATCH 08/26] =?UTF-8?q?=F0=9F=93=8C=20Embed=20Swift=20dylibs=20i?= =?UTF-8?q?n=20MasKit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mas-cli.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index b26305a..5a48538 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 90CB4071213F4E000044E445 /* Commandant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90CB406B213F4DDD0044E445 /* Commandant.framework */; }; ED031A7C1B5127C00097692E /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED031A7B1B5127C00097692E /* main.swift */; }; F83213892173D3E1008BA8A0 /* CKAccountStore.h in Headers */ = {isa = PBXBuildFile; fileRef = F8FB719B20F2EC4500F56FDC /* CKAccountStore.h */; }; F832138A2173D3E1008BA8A0 /* CKDownloadQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = F8FB719C20F2EC4500F56FDC /* CKDownloadQueue.h */; }; @@ -210,7 +209,6 @@ buildActionMask = 2147483647; files = ( F83213A82173F5A7008BA8A0 /* MasKit.framework in Frameworks */, - 90CB4071213F4E000044E445 /* Commandant.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -803,6 +801,7 @@ F8FB716320F2B41400F56FDC /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -840,6 +839,7 @@ F8FB716420F2B41400F56FDC /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; From b6569bdd07d20267f2c52076e29849980622748e Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 17:47:01 -0600 Subject: [PATCH 09/26] =?UTF-8?q?=F0=9F=8D=B1=20Remove=20dup=20MasKit=20fr?= =?UTF-8?q?om=20bin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mas-cli.xcodeproj/project.pbxproj | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 5a48538..8de6110 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -38,7 +38,6 @@ F83213A82173F5A7008BA8A0 /* MasKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8FB715220F2B41400F56FDC /* MasKit.framework */; }; F83213A92173F5D0008BA8A0 /* Commandant.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 90CB406B213F4DDD0044E445 /* Commandant.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; F83213AA2173F5D0008BA8A0 /* Result.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 90CB4069213F4DDD0044E445 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - F83213AB2173F697008BA8A0 /* MasKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = F8FB715220F2B41400F56FDC /* MasKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; F8FB715B20F2B41400F56FDC /* MasKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8FB715220F2B41400F56FDC /* MasKit.framework */; }; F8FB716020F2B41400F56FDC /* MasKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FB715F20F2B41400F56FDC /* MasKitTests.swift */; }; F8FB716220F2B41400F56FDC /* MasKit.h in Headers */ = {isa = PBXBuildFile; fileRef = F8FB715420F2B41400F56FDC /* MasKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -96,17 +95,6 @@ name = "Copy Debugging Symbols"; runOnlyForDeploymentPostprocessing = 0; }; - 90CB407E213F4E8A0044E445 /* Copy Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - F83213AB2173F697008BA8A0 /* MasKit.framework in Copy Frameworks */, - ); - name = "Copy Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; ED031A761B5127C00097692E /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -454,7 +442,6 @@ 90CB4073213F4E070044E445 /* Copy Debugging Symbols */, ED031A741B5127C00097692E /* Sources */, ED031A751B5127C00097692E /* Frameworks */, - 90CB407E213F4E8A0044E445 /* Copy Frameworks */, ED031A761B5127C00097692E /* CopyFiles */, E7460A391382D898934EFFBD /* Resources */, ); From 817bab29b5923d18fceeb3e8ae46f09a6780c4de Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 17:47:29 -0600 Subject: [PATCH 10/26] =?UTF-8?q?=F0=9F=94=8A=20Show=20package=20info=20af?= =?UTF-8?q?ter=20install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/install b/script/install index 51823e2..c92c5bc 100755 --- a/script/install +++ b/script/install @@ -1,9 +1,13 @@ #!/bin/bash -ex +IDENTIFIER=com.mphys.mas-cli + echo "==> 📲 Installing mas" sudo installer \ -pkg build/mas.pkg \ -target / -pkginfo com.mphys.mas-cli +pkgutil --pkg-info "$IDENTIFIER" + +pkgutil --files "$IDENTIFIER" From a9c38fbed1cec902a0aad67142b73a6dc6eeeb93 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 19:32:06 -0600 Subject: [PATCH 11/26] =?UTF-8?q?=F0=9F=97=9C=20Shrink=20binary=20by=20exc?= =?UTF-8?q?luding=20swift=20static=20libs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://medium.com/livefront/how-to-add-a-dynamic-swift-framework-to-a-command-line-tool-bab6426d6c31#fcec --- mas-cli.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 8de6110..817b67e 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -760,6 +760,8 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES; + SWIFT_FORCE_STATIC_LINK_STDLIB = NO; SWIFT_OBJC_BRIDGING_HEADER = "App/mas-cli-Bridging-Header.h"; SWIFT_VERSION = 4.2; }; @@ -779,6 +781,8 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES; + SWIFT_FORCE_STATIC_LINK_STDLIB = NO; SWIFT_OBJC_BRIDGING_HEADER = "App/mas-cli-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.2; From e591feb413a01ac4b219ef0ff3cf36c6ee58ea7f Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 21:29:33 -0600 Subject: [PATCH 12/26] =?UTF-8?q?=F0=9F=94=A7=20Remove=20gems=20from=20pac?= =?UTF-8?q?kage=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/build | 6 ------ script/package | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/script/build b/script/build index 4d718ca..acd9cdf 100755 --- a/script/build +++ b/script/build @@ -14,12 +14,6 @@ main() { --configuration "$CONFIG" archive - - # If this is a tagged build we are going to release -# TEMP: Generate archive on all builds -# if [[ ! -z $TRAVIS_TAG ]]; then - # archive -# fi } # OBJROOT - Intermediate Build Files Path diff --git a/script/package b/script/package index 7eb5dc5..6745251 100755 --- a/script/package +++ b/script/package @@ -1,8 +1,6 @@ #!/bin/bash -ex -set -o pipefail && \ - xcodebuild install \ - | bundle exec xcpretty --color +xcodebuild install pushd build From 3c52a7844cb9b770a5a509dca1872bd4bdc7e121 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 21:45:07 -0600 Subject: [PATCH 13/26] =?UTF-8?q?=F0=9F=8D=8C=20Split=20out=20archive=20sc?= =?UTF-8?q?ript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/archive | 20 ++++++++++++++++++++ script/package | 25 ++++++------------------- 2 files changed, 26 insertions(+), 19 deletions(-) create mode 100755 script/archive diff --git a/script/archive b/script/archive new file mode 100755 index 0000000..ded3614 --- /dev/null +++ b/script/archive @@ -0,0 +1,20 @@ +#!/bin/bash -ex + +pushd build + +echo "==> 🗜ī¸ Compressing mas.xcarchive" +zip -r mas.xcarchive.zip mas.xcarchive + +echo "==> ī¸đŸ—œī¸ Compressing binary and framework" +pushd mas.xcarchive/Products +zip -r \ + mas-cli.zip \ + bin/mas \ + Frameworks/MasKit.framework +mv mas-cli.zip ../../ +popd + +echo "==> đŸ”ĸ Files Hashes" +shasum -a 256 mas-cli.zip mas.xcarchive.zip + +popd diff --git a/script/package b/script/package index 6745251..5ea880d 100755 --- a/script/package +++ b/script/package @@ -1,30 +1,17 @@ #!/bin/bash -ex +# TODO: Make VERSION_STRING dynamic +VERSION_STRING=1.4.3 + xcodebuild install -pushd build - -echo "==> 🗜ī¸ Compressing mas.xcarchive" -zip -r mas.xcarchive.zip mas.xcarchive - -echo "==> ī¸đŸ—œī¸ Compressing binary and framework" -pushd mas.xcarchive/Products -zip -r \ - mas-cli.zip \ - bin/mas \ - Frameworks/MasKit.framework -mv mas-cli.zip ../../ -popd - echo "==> đŸ“Ļ Assemble an installer package" IDENTIFIER=com.mphys.mas-cli -COMPONENTS_PLIST=../Homebrew/Components.plist -DISTRIBUTION_PLIST=../Homebrew/Distribution.plist +COMPONENTS_PLIST=Homebrew/Components.plist +DISTRIBUTION_PLIST=Homebrew/Distribution.plist INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst INTERNAL_PACKAGE=mas_temp.pkg OUTPUT_PACKAGE=mas.pkg -# TODO: Make VERSION_STRING dynamic -VERSION_STRING=1.4.3 tree "$INSTALL_TEMPORARY_FOLDER" @@ -47,6 +34,6 @@ productbuild \ "$OUTPUT_PACKAGE" echo "==> đŸ”ĸ Files Hashes" -shasum -a 256 mas-cli.zip mas.xcarchive.zip mas.pkg +shasum -a 256 mas.pkg popd From 37be80c2ac699385de0253516592cc4e3a53dbe4 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 21:47:26 -0600 Subject: [PATCH 14/26] =?UTF-8?q?=F0=9F=94=87=20Remove=20tree=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/package | 4 ---- 1 file changed, 4 deletions(-) diff --git a/script/package b/script/package index 5ea880d..6881f8a 100755 --- a/script/package +++ b/script/package @@ -13,8 +13,6 @@ INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst INTERNAL_PACKAGE=mas_temp.pkg OUTPUT_PACKAGE=mas.pkg -tree "$INSTALL_TEMPORARY_FOLDER" - # Assemble pkg. Using /usr/local prefix to avoid the following errors with "/" # - installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.) # - GUI warning: This package is incompatible with this version of macOS and may fail to install. (may damage your system... ) @@ -35,5 +33,3 @@ productbuild \ echo "==> đŸ”ĸ Files Hashes" shasum -a 256 mas.pkg - -popd From 99bbbd66cfed7eaec7d442537a18bea13f81437a Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 16 Oct 2018 22:00:03 -0600 Subject: [PATCH 15/26] =?UTF-8?q?=F0=9F=9A=A7=F0=9F=8D=BA=20Revise=20formu?= =?UTF-8?q?la=20to=20run=20carthage=20and=20new=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Homebrew/mas.rb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Homebrew/mas.rb b/Homebrew/mas.rb index 0f70af2..08680ab 100644 --- a/Homebrew/mas.rb +++ b/Homebrew/mas.rb @@ -2,8 +2,9 @@ class Mas < Formula desc "Mac App Store command-line interface" homepage "https://github.com/mas-cli/mas" url "https://github.com/mas-cli/mas.git", - :tag => "v1.4.2", - :revision => "966872b32820c014a9004691f5da47f170702236", + :branch => "release-1.4.3", + # :tag => "v1.4.2", + # :revision => "966872b32820c014a9004691f5da47f170702236", :shallow => true head "https://github.com/mas-cli/mas.git", :shallow => true @@ -14,16 +15,24 @@ class Mas < Formula end depends_on :xcode => ["10.0", :build] + depends_on "carthage" => :build def install + # Prevent build failures from warnings + xcconfig = buildpath/"Overrides.xcconfig" + File.open(xcconfig, 'w') { |file| file.write("GCC_TREAT_WARNINGS_AS_ERRORS = NO") } + ENV["XCODE_XCCONFIG_FILE"] = xcconfig + + system "carthage", "bootstrap", "--platform", "macOS" xcodebuild "-project", "mas-cli.xcodeproj", "-scheme", "mas-cli Release", - "-configuration," "Release", + "-configuration",🛠ī¸ "Release", + "OBJROOT=#{buildpath.realpath}", "SYMROOT=#{buildpath.realpath}" - bin.install buildpath/"build/mas" - # TODO: Move MasKit.frameworks to prefix/Frameworks + system "script/package" + system "script/install" bash_completion.install "contrib/completion/mas-completion.bash" => "mas" end From 55aa25193b7c935051d38dac13efd833408b3ab4 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 15:23:22 -0600 Subject: [PATCH 16/26] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20package=5Finstall?= =?UTF-8?q?=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/{install => package_install} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename script/{install => package_install} (100%) diff --git a/script/install b/script/package_install similarity index 100% rename from script/install rename to script/package_install From d42010ba9a2fe48ae8db25149a615919b039cadc Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 15:43:02 -0600 Subject: [PATCH 17/26] =?UTF-8?q?=E2=9C=A8=20Add=20simple=20install=20scri?= =?UTF-8?q?pt=20for=20homebrew?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Homebrew/mas.rb | 1 - script/install | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 script/install diff --git a/Homebrew/mas.rb b/Homebrew/mas.rb index 08680ab..0b2c0a0 100644 --- a/Homebrew/mas.rb +++ b/Homebrew/mas.rb @@ -31,7 +31,6 @@ class Mas < Formula "OBJROOT=#{buildpath.realpath}", "SYMROOT=#{buildpath.realpath}" - system "script/package" system "script/install" bash_completion.install "contrib/completion/mas-completion.bash" => "mas" diff --git a/script/install b/script/install new file mode 100755 index 0000000..fbeaf19 --- /dev/null +++ b/script/install @@ -0,0 +1,20 @@ +#!/bin/bash -e + +PREFIX=/usr/local +INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst + +echo "==> 📲 Installing mas to $PREFIX" + +xcodebuild install + +pushd "$INSTALL_TEMPORARY_FOLDER" + +rsync --archive --delete \ + Frameworks/MasKit.framework \ + "$PREFIX/Frameworks/" + +cp -f \ + bin/mas \ + "$PREFIX/bin/" + +popd From a0d9b1a67c682038f5c3776f9e13201a7a29c3a2 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 15:47:08 -0600 Subject: [PATCH 18/26] =?UTF-8?q?=E2=9C=A8=20Add=20uninstall=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/uninstall | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 script/uninstall diff --git a/script/uninstall b/script/uninstall new file mode 100644 index 0000000..37dcc11 --- /dev/null +++ b/script/uninstall @@ -0,0 +1,8 @@ +#!/bin/bash -e + +PREFIX=/usr/local + +echo "==> đŸ”Ĩ Installing mas" + +rm -rf /usr/local/Frameworks/MasKit.framework/ +rm -f /usr/local/bin/mas From ee1e6f23ea07aaa9c1b5445a8aa13909584c704e Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 15:57:57 -0600 Subject: [PATCH 19/26] =?UTF-8?q?=F0=9F=9A=9A=20Move=20files=20instead=20o?= =?UTF-8?q?f=20copy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/install b/script/install index fbeaf19..2e2396c 100755 --- a/script/install +++ b/script/install @@ -9,11 +9,13 @@ xcodebuild install pushd "$INSTALL_TEMPORARY_FOLDER" -rsync --archive --delete \ +mkdir -p "$PREFIX/Frameworks/" + +mv -v \ Frameworks/MasKit.framework \ "$PREFIX/Frameworks/" -cp -f \ +mv -f \ bin/mas \ "$PREFIX/bin/" From 7180928859e6624175caeb90abbf8b258628e665 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 16:18:30 -0600 Subject: [PATCH 20/26] Allow override of prefix --- script/install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/install b/script/install index 2e2396c..3adb2c0 100755 --- a/script/install +++ b/script/install @@ -3,6 +3,10 @@ PREFIX=/usr/local INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst +if test -n "$1"; then + PREFIX="$1" +fi + echo "==> 📲 Installing mas to $PREFIX" xcodebuild install From 715bde70b35ca2eb1ec46c89bdca3bae89e61fa0 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 16:48:35 -0600 Subject: [PATCH 21/26] =?UTF-8?q?=C2=A9=EF=B8=8F=20Use=20ditto=20to=20copy?= =?UTF-8?q?=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Homebrew/mas.rb | 2 +- script/install | 19 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Homebrew/mas.rb b/Homebrew/mas.rb index 0b2c0a0..976f9fe 100644 --- a/Homebrew/mas.rb +++ b/Homebrew/mas.rb @@ -31,7 +31,7 @@ class Mas < Formula "OBJROOT=#{buildpath.realpath}", "SYMROOT=#{buildpath.realpath}" - system "script/install" + system "script/install", prefix bash_completion.install "contrib/completion/mas-completion.bash" => "mas" end diff --git a/script/install b/script/install index 3adb2c0..aea2abc 100755 --- a/script/install +++ b/script/install @@ -3,6 +3,7 @@ PREFIX=/usr/local INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst +# Override default prefix path with optional 1st arg if test -n "$1"; then PREFIX="$1" fi @@ -11,16 +12,10 @@ echo "==> 📲 Installing mas to $PREFIX" xcodebuild install -pushd "$INSTALL_TEMPORARY_FOLDER" +ditto -v \ + "$INSTALL_TEMPORARY_FOLDER/Frameworks" \ + "$PREFIX/Frameworks" -mkdir -p "$PREFIX/Frameworks/" - -mv -v \ - Frameworks/MasKit.framework \ - "$PREFIX/Frameworks/" - -mv -f \ - bin/mas \ - "$PREFIX/bin/" - -popd +ditto -v \ + "$INSTALL_TEMPORARY_FOLDER/bin" \ + "$PREFIX/bin" From 457e2ab5eee66d06fc6b981e38c24553146adbfd Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 17:18:55 -0600 Subject: [PATCH 22/26] =?UTF-8?q?=F0=9F=94=97=20Update=20dylib=20links=20o?= =?UTF-8?q?n=20install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mas-cli.xcodeproj/project.pbxproj | 4 ++-- script/install | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 817b67e..6d240b2 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -757,7 +757,7 @@ "$(PROJECT_DIR)/Carthage/Build/Mac", ); INSTALL_PATH = /bin; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /usr/local/Frameworks /usr/local/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES; @@ -778,7 +778,7 @@ "$(PROJECT_DIR)/Carthage/Build/Mac", ); INSTALL_PATH = /bin; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /usr/local/Frameworks /usr/local/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES; diff --git a/script/install b/script/install index aea2abc..91a32b2 100755 --- a/script/install +++ b/script/install @@ -2,6 +2,8 @@ PREFIX=/usr/local INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst +FRAMEWORK_NAME=MasKit.framework +BINARY_NAME=mas # Override default prefix path with optional 1st arg if test -n "$1"; then @@ -19,3 +21,17 @@ ditto -v \ ditto -v \ "$INSTALL_TEMPORARY_FOLDER/bin" \ "$PREFIX/bin" + +echo "==> 🔗 Update dylib load paths" + +install_name_tool \ + -rpath \ + "/usr/local/Frameworks" \ + "@executable_path/../Frameworks" \ + "$PREFIX/bin/$BINARY_NAME" + +install_name_tool \ + -rpath \ + "/usr/local/Frameworks/$FRAMEWORK_NAME/Versions/Current/Frameworks" \ + "@executable_path/../Frameworks/$FRAMEWORK_NAME/Versions/Current/Frameworks" \ + "$PREFIX/bin/$BINARY_NAME" From 540bb19a3f5d6cab0fd44048bdea5ecba62a05f8 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 17:26:01 -0600 Subject: [PATCH 23/26] =?UTF-8?q?=F0=9F=92=80=20Set=20execute=20perms=20on?= =?UTF-8?q?=20uninstall=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/uninstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 script/uninstall diff --git a/script/uninstall b/script/uninstall old mode 100644 new mode 100755 index 37dcc11..8e23dd0 --- a/script/uninstall +++ b/script/uninstall @@ -4,5 +4,5 @@ PREFIX=/usr/local echo "==> đŸ”Ĩ Installing mas" -rm -rf /usr/local/Frameworks/MasKit.framework/ +rm -rf /usr/local/Frameworks/MasKit.framework rm -f /usr/local/bin/mas From 7cc17e5d6568dd1b55b291adad75ff16e596d258 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 17:26:18 -0600 Subject: [PATCH 24/26] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d72dc76..f660ed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [v1.4.3] - 2018-10-16 - 🧰 MasKit Framework #175 +- đŸ“Ļ Added installer package #178 - 🛠 Xcode 10 & Swift 4.2 #173 - â™ģī¸ Use Carthage rather than CocoaPods to manage dependencies #169 - âŦ†ī¸ danger (5.7.0) #176 From ac86f84973299c753ca805d2df6ef44755228a9f Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 18:00:24 -0600 Subject: [PATCH 25/26] =?UTF-8?q?=F0=9F=94=A7=20Add=20.editorconfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c308ed0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false From 03a89ace49c7c23fcf4f900b7a81b8bd9ba28736 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 17 Oct 2018 18:07:10 -0600 Subject: [PATCH 26/26] =?UTF-8?q?=F0=9F=93=9D=20Final=20notes=20for=201.4.?= =?UTF-8?q?3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f660ed4..689ac32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,15 +7,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -## [v1.4.3] - 2018-10-16 + + +## [v1.4.3] đŸ“Ļ🏛ī¸ MasKit & Carthage - 2018-10-17 + +Big project restructure to fix issues building for Homebrew. +The `mas` binary now depends on the separate `MasKit.framework`. +Use the `mas.pkg` package to install manually. - 🧰 MasKit Framework #175 - đŸ“Ļ Added installer package #178 - 🛠 Xcode 10 & Swift 4.2 #173 -- â™ģī¸ Use Carthage rather than CocoaPods to manage dependencies #169 +- â™ģī¸ Use Carthage rather than CocoaPods to manage dependencies #169 + thanks @tonyarnold! - âŦ†ī¸ danger (5.7.0) #176 -## [v1.4.2] Sign-In Disabled - 2018-08-12 +## [v1.4.2] 🚏đŸ“Ĩ🙅đŸģ‍♀ī¸ Sign-In Disabled - 2018-08-12 > Version 1.4.2 was never [released](https://github.com/Homebrew/homebrew-core/pull/31058) through Homebrew. @@ -33,11 +40,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - 🛠 Xcode 9.3 #141 - 👷đŸģ‍♀ī¸âš ī¸ Re-enabled Danger #137 -## [v1.4.1] Stop Littering - 2018-02-18 +## [v1.4.1] đŸš¯ Stop Littering - 2018-02-18 - 🐛 Prevent `default.profraw` from getting created #135 -## [v1.4.0] It's Alive! 🧟‍♂ī¸ - 2018-02-16 +## [v1.4.0] 🧟‍♂ī¸ It's Alive! - 2018-02-16 ### ✨ Enhancements - ℹī¸ Info command #26, #55 @@ -115,7 +122,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [v1.0.0] - 2015-09-20 - Initial Release -[Unreleased]: https://github.com/mas-cli/mas/compare/v1.4.2...HEAD +[Unreleased]: https://github.com/mas-cli/mas/compare/v1.4.3...HEAD +[v1.4.3]: https://github.com/mas-cli/mas/compare/v1.4.2...v1.4.3 [v1.4.2]: https://github.com/mas-cli/mas/compare/v1.4.1...v1.4.2 [v1.4.1]: https://github.com/mas-cli/mas/compare/v1.4.0...v1.4.1 [v1.4.0]: https://github.com/mas-cli/mas/compare/v1.3.1...v1.4.0