Skip to content

Commit f2f41a2

Browse files
committed
Tweak release script
1 parent 6fd4cde commit f2f41a2

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

Makefile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
BUILD_PATH=.build
2-
SWIFT_BUILD_FLAGS=--product periphery --configuration release --disable-sandbox --scratch-path ${BUILD_PATH}
3-
1+
SWIFT_BUILD_FLAGS=--product periphery --configuration release --disable-sandbox --scratch-path .build
42
EXECUTABLE_X86_64=$(shell swift build ${SWIFT_BUILD_FLAGS} --arch x86_64 --show-bin-path)/periphery
53
EXECUTABLE_ARM64=$(shell swift build ${SWIFT_BUILD_FLAGS} --arch arm64 --show-bin-path)/periphery
6-
EXECUTABLE=${BUILD_PATH}/periphery
74

85
clean:
96
@swift package clean
@@ -15,11 +12,9 @@ build_arm64:
1512
@swift build ${SWIFT_BUILD_FLAGS} --arch arm64
1613

1714
build_release: clean build_x86_64 build_arm64
18-
@lipo -create -output ${EXECUTABLE} ${EXECUTABLE_X86_64} ${EXECUTABLE_ARM64}
19-
@strip -rSTX ${EXECUTABLE}
20-
21-
show_bin_path:
22-
@echo ${EXECUTABLE}
15+
@mkdir -p .release
16+
@lipo -create -output .release/periphery ${EXECUTABLE_X86_64} ${EXECUTABLE_ARM64}
17+
@strip -rSTX .release/periphery
2318

2419
swiftformat:
2520
@./scripts/lint/swiftformat.sh

scripts/release

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ cat scripts/artifactbundle_info.json.template | sed s/__VERSION__/${version}/ >
4444
echo -e "\nUpdate CHANGELOG.md"
4545
confirm "Continue?"
4646

47-
bin_path=$(make show_bin_path)
48-
rm -rf "$bin_path"
4947
make build_release
50-
cp "$bin_path" .release/
48+
49+
if [ ! -f .release/periphery ]; then
50+
echo "ERROR: Missing release binary?"
51+
exit 1
52+
fi
53+
5154
cp LICENSE.md .release/
5255
cp scripts/release_notes.md.template .release/release_notes.md
5356

0 commit comments

Comments
 (0)