mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
commit
11a0e3e14e
17 changed files with 235 additions and 69 deletions
13
.editorconfig
Normal file
13
.editorconfig
Normal file
|
@ -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
|
|
@ -11,6 +11,6 @@
|
|||
<key>CFBundleName</key>
|
||||
<string>mas-cli</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.2</string>
|
||||
<string>1.4.3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
28
CHANGELOG.md
28
CHANGELOG.md
|
@ -7,11 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- 🧰 MasKit Framework #175
|
||||
- 🛠 Xcode 10 & Swift 4.2 #173
|
||||
- ♻️ Use Carthage rather than CocoaPods to manage dependencies #169
|
||||
|
||||
## [v1.4.2] - Sign-In Disabled - 2018-08-12
|
||||
|
||||
## [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
|
||||
thanks @tonyarnold!
|
||||
- ⬆️ danger (5.7.0) #176
|
||||
|
||||
## [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.
|
||||
|
@ -27,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
|
||||
|
@ -109,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
|
||||
|
|
|
@ -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
|
||||
|
|
29
Homebrew/Components.plist
Normal file
29
Homebrew/Components.plist
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>BundleIsVersionChecked</key>
|
||||
<false/>
|
||||
<key>BundleOverwriteAction</key>
|
||||
<string>upgrade</string>
|
||||
<key>ChildBundles</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BundleOverwriteAction</key>
|
||||
<string></string>
|
||||
<key>RootRelativeBundlePath</key>
|
||||
<string>Frameworks/MasKit.framework/Versions/A/Frameworks/Commandant.framework</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BundleOverwriteAction</key>
|
||||
<string></string>
|
||||
<key>RootRelativeBundlePath</key>
|
||||
<string>Frameworks/MasKit.framework/Versions/A/Frameworks/Result.framework</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>RootRelativeBundlePath</key>
|
||||
<string>Frameworks/MasKit.framework</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
21
Homebrew/Distribution.plist
Normal file
21
Homebrew/Distribution.plist
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<installer-gui-script minSpecVersion="2">
|
||||
<pkg-ref id="com.mphys.mas-cli"/>
|
||||
<domains enable_localSystem="true" enable_anywhere="true" enable_currentUserHome="false" />
|
||||
<options customize="never" require-scripts="false"/>
|
||||
<volume-check>
|
||||
<allowed-os-versions>
|
||||
<os-version min="10.10"/>
|
||||
</allowed-os-versions>
|
||||
</volume-check>
|
||||
<choices-outline>
|
||||
<line choice="default">
|
||||
<line choice="com.mphys.mas-cli"/>
|
||||
</line>
|
||||
</choices-outline>
|
||||
<choice id="default"/>
|
||||
<choice id="com.mphys.mas-cli" visible="false">
|
||||
<pkg-ref id="com.mphys.mas-cli"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.mphys.mas-cli" version="1.0.0" onConclusion="none">mas_temp.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
|
@ -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,15 +15,23 @@ 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
|
||||
|
||||
xcodebuild "-workspace", "mas-cli.xcworkspace",
|
||||
system "carthage", "bootstrap", "--platform", "macOS"
|
||||
|
||||
xcodebuild "-project", "mas-cli.xcodeproj",
|
||||
"-scheme", "mas-cli Release",
|
||||
"-configuration",🛠️ "Release",
|
||||
"OBJROOT=#{buildpath.realpath}",
|
||||
"SYMROOT=#{buildpath.realpath}"
|
||||
|
||||
bin.install buildpath/"build/mas"
|
||||
# TODO: Move MasKit.frameworks to prefix/Frameworks
|
||||
system "script/install", prefix
|
||||
|
||||
bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
|
||||
end
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>1.4.3</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<string>10403000</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2018 Andrew Naylor. All rights reserved.</string>
|
||||
</dict>
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>1.4.3</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>10403000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -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 */; };
|
||||
|
@ -39,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, ); }; };
|
||||
|
@ -97,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;
|
||||
|
@ -210,7 +197,6 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F83213A82173F5A7008BA8A0 /* MasKit.framework in Frameworks */,
|
||||
90CB4071213F4E000044E445 /* Commandant.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -456,7 +442,6 @@
|
|||
90CB4073213F4E070044E445 /* Copy Debugging Symbols */,
|
||||
ED031A741B5127C00097692E /* Sources */,
|
||||
ED031A751B5127C00097692E /* Frameworks */,
|
||||
90CB407E213F4E8A0044E445 /* Copy Frameworks */,
|
||||
ED031A761B5127C00097692E /* CopyFiles */,
|
||||
E7460A391382D898934EFFBD /* Resources */,
|
||||
);
|
||||
|
@ -666,7 +651,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 +717,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;
|
||||
|
@ -771,9 +756,12 @@
|
|||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
||||
);
|
||||
LD_RUNPATH_SEARCH_PATHS = "@executable_path/. @executable_path/MasKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/MasKit.framework/Versions/Current/Frameworks $(inherited)";
|
||||
INSTALL_PATH = /bin;
|
||||
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;
|
||||
SWIFT_FORCE_STATIC_LINK_STDLIB = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "App/mas-cli-Bridging-Header.h";
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
|
@ -785,15 +773,16 @@
|
|||
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)";
|
||||
INSTALL_PATH = /bin;
|
||||
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;
|
||||
SWIFT_FORCE_STATIC_LINK_STDLIB = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "App/mas-cli-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 4.2;
|
||||
|
@ -803,6 +792,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";
|
||||
|
@ -813,10 +803,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)",
|
||||
|
@ -825,13 +815,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;
|
||||
|
@ -842,6 +830,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";
|
||||
|
@ -852,10 +841,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)",
|
||||
|
@ -864,12 +853,11 @@
|
|||
FRAMEWORK_VERSION = A;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = MasKit/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
INSTALL_PATH = /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;
|
||||
|
|
20
script/archive
Executable file
20
script/archive
Executable file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
37
script/install
Executable file
37
script/install
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
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
|
||||
PREFIX="$1"
|
||||
fi
|
||||
|
||||
echo "==> 📲 Installing mas to $PREFIX"
|
||||
|
||||
xcodebuild install
|
||||
|
||||
ditto -v \
|
||||
"$INSTALL_TEMPORARY_FOLDER/Frameworks" \
|
||||
"$PREFIX/Frameworks"
|
||||
|
||||
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"
|
|
@ -1,17 +1,35 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/bash -ex
|
||||
|
||||
pushd build
|
||||
# TODO: Make VERSION_STRING dynamic
|
||||
VERSION_STRING=1.4.3
|
||||
|
||||
echo "==> 🗜️ Compressing mas.xcarchive"
|
||||
zip -r mas.xcarchive.zip mas.xcarchive
|
||||
xcodebuild install
|
||||
|
||||
echo "==> ️🗜️ Compressing binary and framework"
|
||||
pushd mas.xcarchive/Products/build
|
||||
zip -r mas-cli.zip mas 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
|
||||
INSTALL_TEMPORARY_FOLDER=/tmp/mas-cli.dst
|
||||
INTERNAL_PACKAGE=mas_temp.pkg
|
||||
OUTPUT_PACKAGE=mas.pkg
|
||||
|
||||
echo -n "==> 🔢 SHA256: "
|
||||
shasum -a 256 mas-cli.zip
|
||||
# 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 "/usr/local" \
|
||||
--root "$INSTALL_TEMPORARY_FOLDER" \
|
||||
--version "$VERSION_STRING" \
|
||||
"$INTERNAL_PACKAGE"
|
||||
|
||||
popd
|
||||
# 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" \
|
||||
"$OUTPUT_PACKAGE"
|
||||
|
||||
echo "==> 🔢 Files Hashes"
|
||||
shasum -a 256 mas.pkg
|
||||
|
|
13
script/package_install
Executable file
13
script/package_install
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
IDENTIFIER=com.mphys.mas-cli
|
||||
|
||||
echo "==> 📲 Installing mas"
|
||||
|
||||
sudo installer \
|
||||
-pkg build/mas.pkg \
|
||||
-target /
|
||||
|
||||
pkgutil --pkg-info "$IDENTIFIER"
|
||||
|
||||
pkgutil --files "$IDENTIFIER"
|
8
script/uninstall
Executable file
8
script/uninstall
Executable file
|
@ -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
|
Loading…
Reference in a new issue