Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mas 1.4.2 #31058

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions Formula/mas.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Mas < Formula
desc "Mac App Store command-line interface"
homepage "https://github.com/mas-cli/mas"
url "https://github.com/mas-cli/mas/archive/v1.4.1.tar.gz"
sha256 "4fd91c13b46d403b52dbee3891adb3cd6571e07ad20cf58de0100c9f695e6c24"
url "https://github.com/mas-cli/mas/archive/v1.4.2.tar.gz"
sha256 "f9a751ff84e6dcbaedd4b2ca95b3ca623c739fd3af0b6ca950c321f2ce840bfe"
head "https://github.com/mas-cli/mas.git"

bottle do
Expand All @@ -11,14 +11,31 @@ class Mas < Formula
sha256 "af5be6aa9902d9cfc2aa69dbf313441a7c201463d516face721f900ceae9556b" => :sierra
end

depends_on :xcode => ["9.0", :build]
depends_on :xcode => ["9.3", :build]

resource "cocoapods" do
url "https://dl.bintray.com/phatblat/mas-bottles/master.tar.gz"
Copy link
Member

@fxcoudert fxcoudert Sep 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think downloading an unversioned, non-official copy of the repo is acceptable in the Homebrew way of handling dependencies.

What are the alternatives? We have a cocoapods formula which we could depend on, couldn't we?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a cocoapods formula which we could depend on, couldn't we?

The cocoapods formula installs the command, not the repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. I think the only option is thus to wait for mas-cli/mas#169 to be merged, which moves away from cocoapods and will allow a build compatible with Homebrew's rules.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this suggestion #31058 (comment) using the official repo ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shallow clone approach seems like the only one workable.

sha256 "fd8f1b06a2a0276c9005241b45cc19393b7c39cfc91d08da92a307ea2416e966"
end

def install
xcodebuild "-project", "mas-cli.xcodeproj",
# Pre-install a shallow copy of the CocoaPods master repo
(buildpath/".brew_home/.cocoapods/repos/master").install resource("cocoapods")

# Install bundler, then use it to install gems used by project
ENV["GEM_HOME"] = buildpath/"gem_home"
system "gem", "install", "bundler"
ENV.prepend_path "PATH", buildpath/"gem_home/bin"
system "bundle", "install"
system "bundle", "exec", "pod", "install"

xcodebuild "-workspace", "mas-cli.xcworkspace",
"-scheme", "mas-cli Release",
"-configuration", "Release",
"SYMROOT=build"
bin.install "build/mas"
"SYMROOT=#{buildpath.realpath}"

bin.install buildpath/"build/mas"

bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
end

test do
Expand Down