Merge pull request #166 from mas-cli/homebrew-release-1.4.2

🍺 Homebrew formula update for 1.4.2
This commit is contained in:
Ben Chatelain 2018-08-17 21:41:40 -06:00 committed by GitHub
commit ffe4c1a597
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 125 additions and 16 deletions

1
.gitignore vendored
View file

@ -31,4 +31,5 @@ Pods/
Temporary Items Temporary Items
bin/ bin/
build/ build/
releases/
xcuserdata xcuserdata

View file

@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [v1.4.2] - 2018-08-12 ## [v1.4.2] - Sign-In Disabled - 2018-08-12
- 🚏📥🙅🏻‍♀️ Disabled `signin` command on macOS 10.13+ #162 - 🚏📥🙅🏻‍♀️ Disabled `signin` command on macOS 10.13+ #162
- An error is immediately returned instead of crashing on newer macOS versions. - An error is immediately returned instead of crashing on newer macOS versions.
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- 🐛 Fixed `account` command #165 - 🐛 Fixed `account` command #165
- ✨ Added price to `search` command when `--price` flag specified #62, #148 - ✨ Added price to `search` command when `--price` flag specified #62, #148
- 🎨 `search` output is now formatted in columns #148 - 🎨 `search` output is now formatted in columns #148
- 📺 Added simple bash completion #157
- CocoaSeeds #155 - CocoaSeeds #155
- ➕🍫 CocoaPods (1.5.3) #155 - ➕🍫 CocoaPods (1.5.3) #155
- 🛠 Xcode 9.4 #153 - 🛠 Xcode 9.4 #153

View file

@ -0,0 +1,24 @@
{
"mas": {
"formula": {
"pkg_version": "1.4.2",
"path": "Library/Taps/homebrew/homebrew-core/Formula/mas.rb"
},
"bottle": {
"root_url": "https://homebrew.bintray.com/bottles",
"prefix": "/usr/local",
"cellar": "any_skip_relocation",
"rebuild": 0,
"tags": {
"high_sierra": {
"filename": "mas-1.4.2.high_sierra.bottle.tar.gz",
"sha256": "caaea8c47a2507a9fcd2d070f5b74822d9ce2903aa39fd7adafaab0bea9a7f8e"
}
}
},
"bintray": {
"package": "mas",
"repository": "bottles"
}
}
}

48
Homebrew/mas-tap.rb Normal file
View file

@ -0,0 +1,48 @@
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.2.tar.gz"
sha256 "f9a751ff84e6dcbaedd4b2ca95b3ca623c739fd3af0b6ca950c321f2ce840bfe"
head "https://github.com/mas-cli/mas.git"
bottle do
root_url "https://dl.bintray.com/phatblat/mas-bottles"
cellar :any_skip_relocation
sha256 "a99d0d7baecf45a00787365a2a078ae94068a0c63012e87f92282efb120e586e" => :el_capitan
sha256 "a99d0d7baecf45a00787365a2a078ae94068a0c63012e87f92282efb120e586e" => :high_sierra
sha256 "a99d0d7baecf45a00787365a2a078ae94068a0c63012e87f92282efb120e586e" => :mojave
sha256 "a99d0d7baecf45a00787365a2a078ae94068a0c63012e87f92282efb120e586e" => :sierra
sha256 "a99d0d7baecf45a00787365a2a078ae94068a0c63012e87f92282efb120e586e" => :yosemite
end
depends_on :xcode => ["9.3", :build]
resource "cocoapods" do
url "https://dl.bintray.com/phatblat/mas-bottles/master.tar.gz"
sha256 "fd8f1b06a2a0276c9005241b45cc19393b7c39cfc91d08da92a307ea2416e966"
end
def install
# 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",
"SYMROOT=#{buildpath.realpath}"
bin.install buildpath/"build/mas"
bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
end
test do
assert_equal version.to_s, shell_output("#{bin}/mas version").chomp
end
end

View file

@ -1,8 +1,8 @@
class Mas < Formula class Mas < Formula
desc "Mac App Store command-line interface" desc "Mac App Store command-line interface"
homepage "https://github.com/mas-cli/mas" homepage "https://github.com/mas-cli/mas"
url "https://github.com/mas-cli/mas/archive/v1.4.1.tar.gz" url "https://github.com/mas-cli/mas/archive/v1.4.2.tar.gz"
sha256 "4fd91c13b46d403b52dbee3891adb3cd6571e07ad20cf58de0100c9f695e6c24" sha256 "f9a751ff84e6dcbaedd4b2ca95b3ca623c739fd3af0b6ca950c321f2ce840bfe"
head "https://github.com/mas-cli/mas.git" head "https://github.com/mas-cli/mas.git"
bottle do bottle do
@ -11,14 +11,29 @@ class Mas < Formula
sha256 "af5be6aa9902d9cfc2aa69dbf313441a7c201463d516face721f900ceae9556b" => :sierra sha256 "af5be6aa9902d9cfc2aa69dbf313441a7c201463d516face721f900ceae9556b" => :sierra
end 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"
sha256 "fd8f1b06a2a0276c9005241b45cc19393b7c39cfc91d08da92a307ea2416e966"
end
def install 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", "-scheme", "mas-cli Release",
"-configuration", "Release", "SYMROOT=#{buildpath.realpath}"
"SYMROOT=build"
bin.install "build/mas" bin.install buildpath/"build/mas"
bash_completion.install "contrib/completion/mas-completion.bash" => "mas" bash_completion.install "contrib/completion/mas-completion.bash" => "mas"
end end

View file

@ -6,15 +6,35 @@ A simple command line interface for the Mac App Store. Designed for scripting an
[![Build Status](https://travis-ci.com/mas-cli/mas.svg?branch=master)](https://travis-ci.com/mas-cli/mas) [![Build Status](https://travis-ci.com/mas-cli/mas.svg?branch=master)](https://travis-ci.com/mas-cli/mas)
## Install ## 📲 Install
### 🍺 Homebrew
[Homebrew](http://brew.sh) is the preferred way to install: [Homebrew](http://brew.sh) is the preferred way to install:
brew install mas brew install mas
### ☎️ Older macOS Versions
macOS 10.13 (High Sierra) is required to install mas from the core Homebrew formula.
We provide a [custom Homebrew tap](https://github.com/mas-cli/homebrew-tap) with pre-built bottles
for all macOS versions since 10.9.
#### 😴 TL;DR
Just run these commands:
```
$ brew tap mas-cli/tap
$ brew tap-pin mas-cli/tap
$ brew install mas
```
### 🐙 GitHub Releases
Alternatively, binaries are available in the [GitHub Releases](https://github.com/mas-cli/mas/releases) Alternatively, binaries are available in the [GitHub Releases](https://github.com/mas-cli/mas/releases)
## Usage ## 🤳🏻 Usage
Each application in the Mac App Store has a product identifier which is also Each application in the Mac App Store has a product identifier which is also
used for mas-cli commands. Using `mas list` will show all installed used for mas-cli commands. Using `mas list` will show all installed
@ -80,7 +100,7 @@ Updates can be performed selectively by providing the app identifier(s) to
==> Downloading Xcode ==> Downloading Xcode
==> Installed Xcode ==> Installed Xcode
### Signin ### 🚏📥 Sign-in
To sign into the Mac App Store for the first time run `mas signin`. To sign into the Mac App Store for the first time run `mas signin`.
@ -104,19 +124,19 @@ You can also embed your password in the command.
Use `mas signout` to sign out from the Mac App Store. Use `mas signout` to sign out from the Mac App Store.
## Homebrew integration ## 🍺 Homebrew integration
`mas` is integrated with [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle). If `mas` is installed, and you run `brew bundle dump`, `mas` is integrated with [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle). If `mas` is installed, and you run `brew bundle dump`,
then your Mac App Store apps will be included in the Brewfile created. See the [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle) then your Mac App Store apps will be included in the Brewfile created. See the [homebrew-bundle](https://github.com/Homebrew/homebrew-bundle)
docs for more details. docs for more details.
## When something doesn't work ## 💥 When something doesn't work
If you see the error "This redownload is not available for this Apple ID either because it was bought by a different user of the item was refunded or cancelled.", it's probably because you haven't installed the app through the App Store yet. See [#46](https://github.com/mas-cli/mas/issues/46#issuecomment-248581233). If you see the error "This redownload is not available for this Apple ID either because it was bought by a different user of the item was refunded or cancelled.", it's probably because you haven't installed the app through the App Store yet. See [#46](https://github.com/mas-cli/mas/issues/46#issuecomment-248581233).
If `mas` doesn't work for you as expected (e.g. you can't update/download apps), run `mas reset` and try again. If the issue persists, please [file a bug](https://github.com/mas-cli/mas/issues/new)! All your feedback is much appreciated ✨ If `mas` doesn't work for you as expected (e.g. you can't update/download apps), run `mas reset` and try again. If the issue persists, please [file a bug](https://github.com/mas-cli/mas/issues/new)! All your feedback is much appreciated ✨
## Using `tmux` ## 📺 Using `tmux`
`mas` operates via the same system services as the Mac App Store. These exist as `mas` operates via the same system services as the Mac App Store. These exist as
separate processes with communication through XPC. As a result of this, `mas` separate processes with communication through XPC. As a result of this, `mas`
@ -132,7 +152,7 @@ $ brew install reattach-to-user-namespace
$ reattach-to-user-namespace mas install $ reattach-to-user-namespace mas install
``` ```
## Build from source ## Build from source
You can now build from Xcode by opening `mas-cli.xcodeproj`, or from the Terminal: You can now build from Xcode by opening `mas-cli.xcodeproj`, or from the Terminal:
@ -154,7 +174,7 @@ The tests in this project are a work-in-progress. Since Xcode does not officiall
We may move the app code into a framework target to make it easier to test. We may move the app code into a framework target to make it easier to test.
## License ## 📄 License
mas-cli was created by [@argon](https://github.com/argon). mas-cli was created by [@argon](https://github.com/argon).
Code is under the [MIT license](LICENSE). Code is under the [MIT license](LICENSE).