-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
25 lines (20 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
MAKEFLAGS += --silent
FOLDER=$(shell cd Binaries/PrefireBinary.artifactbundle/; ls -d */|head -n 1)
CUR_VERSION=$(shell echo $(FOLDER) | cut -d "-" -f 2)
build:
set -o pipefail && xcodebuild -scheme Prefire -destination 'generic/platform=iOS'
binary:
(cd PrefireExecutable; swift build -c release --arch arm64 --arch x86_64)
rm -rf Binaries/PrefireBinary.artifactbundle/prefire-${CUR_VERSION}-macos/bin/*
cp PrefireExecutable/.build/apple/products/release/prefire Binaries/PrefireBinary.artifactbundle/prefire-${CUR_VERSION}-macos/bin
test:
cd PrefireExecutable; swift test
update:
@[ "${version}" ] || ( echo "You have to pass version. For example: \"version=1.0.0\""; exit 1 )
echo "New version: $(version)"
echo "Old version: $(CUR_VERSION)"
mv Binaries/PrefireBinary.artifactbundle/prefire-$(CUR_VERSION)-macos/ Binaries/PrefireBinary.artifactbundle/prefire-$(version)-macos/
cd Binaries/PrefireBinary.artifactbundle; sed -i '' -e '6 s/.*/ "version": "$(version)",/g' info.json
cd Binaries/PrefireBinary.artifactbundle; sed -i '' -e '9 s/.*/ "path": "prefire-$(version)-macos\/bin\/prefire",/g' info.json
cd Binaries/PrefireBinary.artifactbundle; sed -i '' -e '9 s/.*/ "path": "prefire-$(version)-macos\/bin\/prefire",/g' info.json
cd PrefireExecutable/Sources/prefire/Commands/Version/; sed -i '' -e '8 s/.*/ static var value: String = "$(version)"/g' Version.swift