diff --git a/Makefile b/Makefile index 5f6366acd..540da7571 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,6 @@ -BUILD_PATH=.build -SWIFT_BUILD_FLAGS=--product periphery --configuration release --disable-sandbox --scratch-path ${BUILD_PATH} - +SWIFT_BUILD_FLAGS=--product periphery --configuration release --disable-sandbox --scratch-path .build EXECUTABLE_X86_64=$(shell swift build ${SWIFT_BUILD_FLAGS} --arch x86_64 --show-bin-path)/periphery EXECUTABLE_ARM64=$(shell swift build ${SWIFT_BUILD_FLAGS} --arch arm64 --show-bin-path)/periphery -EXECUTABLE=${BUILD_PATH}/periphery clean: @swift package clean @@ -15,11 +12,9 @@ build_arm64: @swift build ${SWIFT_BUILD_FLAGS} --arch arm64 build_release: clean build_x86_64 build_arm64 - @lipo -create -output ${EXECUTABLE} ${EXECUTABLE_X86_64} ${EXECUTABLE_ARM64} - @strip -rSTX ${EXECUTABLE} - -show_bin_path: - @echo ${EXECUTABLE} + @mkdir -p .release + @lipo -create -output .release/periphery ${EXECUTABLE_X86_64} ${EXECUTABLE_ARM64} + @strip -rSTX .release/periphery swiftformat: @./scripts/lint/swiftformat.sh diff --git a/scripts/release b/scripts/release index 4fc5f5469..27bac0eaf 100755 --- a/scripts/release +++ b/scripts/release @@ -44,10 +44,13 @@ cat scripts/artifactbundle_info.json.template | sed s/__VERSION__/${version}/ > echo -e "\nUpdate CHANGELOG.md" confirm "Continue?" -bin_path=$(make show_bin_path) -rm -rf "$bin_path" make build_release -cp "$bin_path" .release/ + +if [ ! -f .release/periphery ]; then + echo "ERROR: Missing release binary?" + exit 1 +fi + cp LICENSE.md .release/ cp scripts/release_notes.md.template .release/release_notes.md