Skip to content

Commit

Permalink
refactor: improve Makefile cross-platform support and remove redundan…
Browse files Browse the repository at this point in the history
…t target
  • Loading branch information
mohsen1 committed Jan 19, 2025
1 parent c729f28 commit d067ce1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ build-artifacts:
@echo "Building for $(CURRENT_PLATFORM)..."
cargo build --release
mkdir -p "yek-$(CURRENT_PLATFORM)"
cp "target/release/yek" "yek-$(CURRENT_PLATFORM)/"
if [ "$(OS)" = "Windows_NT" ]; then \
cp "target/release/yek.exe" "yek-$(CURRENT_PLATFORM)/"; \
else \
cp "target/release/yek" "yek-$(CURRENT_PLATFORM)/"; \
fi
tar -czf "yek-$(CURRENT_PLATFORM).tar.gz" "yek-$(CURRENT_PLATFORM)"
rm -rf "yek-$(CURRENT_PLATFORM)"

Expand All @@ -37,9 +41,6 @@ release: test lint
major: ;

update-formula:
sed -i '' -e "s/version .*/version '$(version)'/" $(FORMULA_PATH)

build-release:
cargo build --release
sed -i.bak "s/version .*/version '$(version)'/" $(FORMULA_PATH) && rm -f $(FORMULA_PATH).bak


0 comments on commit d067ce1

Please sign in to comment.