mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
commit
e76577bdf5
6 changed files with 212 additions and 7 deletions
|
@ -9,8 +9,30 @@ charset = utf-8
|
|||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[script/*]
|
||||
indent_size = 2
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
# Use 2 spaces for Ruby files
|
||||
[{Podfile,Rakefile,*.{rb,podspec}}]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
max_line_length = 80
|
||||
|
||||
# Use tabs for property lists
|
||||
[*.plist]
|
||||
indent_style = tab
|
||||
|
||||
# JSON files contain newlines inconsistently
|
||||
[*.json]
|
||||
insert_final_newline = ignore
|
||||
|
||||
# Makefiles always use tabs for indentation
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
# Trailing spaces have meaning in Markdown
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[{script/*,*.rb,*.yml}]
|
||||
indent_size = 2
|
||||
|
|
1
.swift-version
Normal file
1
.swift-version
Normal file
|
@ -0,0 +1 @@
|
|||
5.2.4
|
1
Brewfile
1
Brewfile
|
@ -1,2 +1,3 @@
|
|||
brew "make"
|
||||
brew "mint"
|
||||
brew "shellcheck"
|
||||
|
|
|
@ -38,18 +38,39 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"make": {
|
||||
"version": "4.3",
|
||||
"bottle": {
|
||||
"cellar": "/usr/local/Cellar",
|
||||
"prefix": "/usr/local",
|
||||
"files": {
|
||||
"catalina": {
|
||||
"url": "https://homebrew.bintray.com/bottles/make-4.3.catalina.bottle.tar.gz",
|
||||
"sha256": "b2cbb6b854495469de4d065825c94540ad3053a1ff7c1832f4eb7781ee6b8231"
|
||||
},
|
||||
"mojave": {
|
||||
"url": "https://homebrew.bintray.com/bottles/make-4.3.mojave.bottle.tar.gz",
|
||||
"sha256": "50ac9c7185e08349c35531d8ee30e755713aec340229cab2008ba1a2ceac15c9"
|
||||
},
|
||||
"high_sierra": {
|
||||
"url": "https://homebrew.bintray.com/bottles/make-4.3.high_sierra.bottle.tar.gz",
|
||||
"sha256": "e7f49884dbeaae3e7ccc9dc3a58fec587c2a594f50314dbc33cde44c6f807f53"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"macos": {
|
||||
"catalina": {
|
||||
"HOMEBREW_VERSION": "2.2.17-98-ge6dda52",
|
||||
"HOMEBREW_VERSION": "2.2.17-137-g43ae03d",
|
||||
"HOMEBREW_PREFIX": "/usr/local",
|
||||
"Homebrew/homebrew-core": "ec60e3fbd262d27494278a6917509adf7c5ecab4",
|
||||
"CLT": "11.5.0.0.1.1588476445",
|
||||
"Homebrew/homebrew-core": "b17953d661faaf339a1e4978277f7bfaac67ca93",
|
||||
"CLT": "1103.0.32.62",
|
||||
"Xcode": "11.5",
|
||||
"macOS": "10.15.4"
|
||||
"macOS": "10.15.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- ✨ `Makefile` #277
|
||||
|
||||
## [v1.7.0] 🛍 Purchase Command - 2020-05-24
|
||||
|
||||
- ✨ New `purchase` command for purchasing free apps #264 (resolves #2, #145)
|
||||
|
|
158
Makefile
Normal file
158
Makefile
Normal file
|
@ -0,0 +1,158 @@
|
|||
#
|
||||
# Makefile
|
||||
# mas
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
CMD_NAME = mas
|
||||
SHELL = /bin/sh
|
||||
|
||||
# trunk
|
||||
# SWIFT_VERSION = swift-DEVELOPMENT-SNAPSHOT-2020-04-23-a
|
||||
|
||||
# Swift 5.3
|
||||
# SWIFT_VERSION = swift-5.3-DEVELOPMENT-SNAPSHOT-2020-04-21-a
|
||||
|
||||
SWIFT_VERSION = 5.2.4
|
||||
|
||||
# set EXECUTABLE_DIRECTORY according to your specific environment
|
||||
# run swift build and see where the output executable is created
|
||||
|
||||
# OS specific differences
|
||||
UNAME = ${shell uname}
|
||||
|
||||
ifeq ($(UNAME), Darwin)
|
||||
SWIFTC_FLAGS =
|
||||
LINKER_FLAGS = -Xlinker -L/usr/local/lib
|
||||
PLATFORM = x86_64-apple-macosx
|
||||
EXECUTABLE_DIRECTORY = ./.build/${PLATFORM}/debug
|
||||
TEST_BUNDLE = ${CMD_NAME}PackageTests.xctest
|
||||
TEST_RESOURCES_DIRECTORY = ./.build/${PLATFORM}/debug/${TEST_BUNDLE}/Contents/Resources
|
||||
endif
|
||||
|
||||
RUN_RESOURCES_DIRECTORY = ${EXECUTABLE_DIRECTORY}
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Targets
|
||||
#
|
||||
|
||||
.PHONY: version
|
||||
version:
|
||||
xcodebuild -version
|
||||
swift --version
|
||||
# swift package tools-version
|
||||
|
||||
.PHONY: init
|
||||
init:
|
||||
- swiftenv install $(SWIFT_VERSION)
|
||||
swiftenv local $(SWIFT_VERSION)
|
||||
|
||||
.PHONY: bootstrap
|
||||
bootstrap:
|
||||
script/bootstrap
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
script/clean
|
||||
xcodebuild clean
|
||||
# swift package clean
|
||||
# swift package reset
|
||||
|
||||
.PHONY: distclean
|
||||
distclean:
|
||||
rm -rf Packages
|
||||
# swift package clean
|
||||
|
||||
.PHONY: updateHeaders
|
||||
updateHeaders:
|
||||
script/update_headers
|
||||
|
||||
.PHONY: build
|
||||
build: #copyRunResources
|
||||
script/build
|
||||
# swift build $(SWIFTC_FLAGS) $(LINKER_FLAGS)
|
||||
|
||||
.PHONY: test
|
||||
test: build #copyTestResources
|
||||
script/test
|
||||
# swift test --enable-test-discovery
|
||||
|
||||
.PHONY: copyRunResources
|
||||
copyRunResources:
|
||||
mkdir -p ${RUN_RESOURCES_DIRECTORY}
|
||||
cp -r Resources/* ${RUN_RESOURCES_DIRECTORY}
|
||||
|
||||
.PHONY: copyTestResources
|
||||
copyTestResources:
|
||||
mkdir -p ${TEST_RESOURCES_DIRECTORY}
|
||||
cp -r Resources/* ${TEST_RESOURCES_DIRECTORY}
|
||||
|
||||
# make run ARGS="asdf"
|
||||
.PHONY: run
|
||||
run: build
|
||||
${EXECUTABLE_DIRECTORY}/${CMD_NAME} $(ARGS)
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
script/install
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
script/uninstall
|
||||
|
||||
.PHONY: sort
|
||||
sort:
|
||||
script/sort
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
script/lint
|
||||
|
||||
.PHONY: danger
|
||||
danger:
|
||||
script/danger
|
||||
|
||||
.PHONY: archive
|
||||
archive:
|
||||
script/archive
|
||||
|
||||
.PHONY: bottle
|
||||
bottle:
|
||||
script/bottle
|
||||
|
||||
.PHONY: package
|
||||
package:
|
||||
script/package
|
||||
|
||||
.PHONY: packageInstall
|
||||
packageInstall:
|
||||
script/package_install
|
||||
|
||||
.PHONY: release
|
||||
release:
|
||||
script/release
|
||||
|
||||
# .PHONY: describe
|
||||
# describe:
|
||||
# swift package describe
|
||||
|
||||
# .PHONY: resolve
|
||||
# resolve:
|
||||
# swift package resolve
|
||||
|
||||
# .PHONY: dependencies
|
||||
# dependencies: resolve
|
||||
# swift package show-dependencies
|
||||
|
||||
# .PHONY: update
|
||||
# update: resolve
|
||||
# swift package update
|
||||
|
||||
# .PHONY: xcproj
|
||||
# xcproj:
|
||||
# swift package generate-xcodeproj
|
Loading…
Reference in a new issue