mirror of
https://github.com/mas-cli/mas
synced 2024-11-25 04:50:24 +00:00
🔧 Update scripts
This commit is contained in:
parent
025e38cf83
commit
00414fd826
3 changed files with 4 additions and 28 deletions
|
@ -19,7 +19,7 @@ env:
|
||||||
- LANGUAGE=en_US.UTF-8
|
- LANGUAGE=en_US.UTF-8
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- bundle install
|
- script/bootstrap
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- script/build
|
- script/build
|
||||||
|
|
|
@ -2,33 +2,9 @@
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
bundle install
|
bundle install
|
||||||
bundle exec seed install
|
bundle exec pod install
|
||||||
|
|
||||||
script/sort
|
script/sort
|
||||||
|
|
||||||
echo "==> Removing CocoaSeed imports"
|
|
||||||
remove_seed_imports
|
|
||||||
}
|
|
||||||
|
|
||||||
remove_seed_imports() {
|
|
||||||
pushd Seeds/ > /dev/null
|
|
||||||
# Build a list of the seeded modules
|
|
||||||
MODULES=( )
|
|
||||||
for i in */; do
|
|
||||||
MODULES+=(${i%%/})
|
|
||||||
done
|
|
||||||
|
|
||||||
# Construct a pattern for module imports to remove
|
|
||||||
local pattern
|
|
||||||
pattern="/import ($(join "|" "${MODULES[@]}"))/d"
|
|
||||||
|
|
||||||
find . -name "*.swift" -type f -exec sed -E -i '' "${pattern}" {} \;
|
|
||||||
popd > /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
join() {
|
|
||||||
local IFS="$1"; shift
|
|
||||||
echo "$*"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
|
@ -12,7 +12,7 @@ main() {
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
set -o pipefail && \
|
set -o pipefail && \
|
||||||
xcodebuild -project "mas-cli.xcodeproj" \
|
xcodebuild -workspace "mas-cli.xcworkspace" \
|
||||||
-scheme "mas-cli Release" \
|
-scheme "mas-cli Release" \
|
||||||
-configuration Release \
|
-configuration Release \
|
||||||
clean build \
|
clean build \
|
||||||
|
@ -21,7 +21,7 @@ build() {
|
||||||
|
|
||||||
archive() {
|
archive() {
|
||||||
set -o pipefail && \
|
set -o pipefail && \
|
||||||
xcodebuild -project "mas-cli.xcodeproj" \
|
xcodebuild -workspace "mas-cli.xcworkspace" \
|
||||||
-scheme "mas-cli Release" \
|
-scheme "mas-cli Release" \
|
||||||
-archivePath mas.xcarchive \
|
-archivePath mas.xcarchive \
|
||||||
archive \
|
archive \
|
||||||
|
|
Loading…
Reference in a new issue