update
This commit is contained in:
16
Makefile
16
Makefile
@@ -6,8 +6,11 @@ BUILD_DIR := build
|
||||
SPEC_FILE := flow.spec
|
||||
BINARY := $(DIST_DIR)/flow
|
||||
INSTALL_DIR ?= $(HOME)/.local/bin
|
||||
VERSION := $(shell sed -n 's/^__version__ = "\(.*\)"/\1/p' src/flow/__init__.py)
|
||||
RELEASE_ROOT := $(BUILD_DIR)/flow-$(VERSION)-python
|
||||
RELEASE_ARCHIVE := $(DIST_DIR)/flow-$(VERSION)-python.tar.gz
|
||||
|
||||
.PHONY: help deps test test-e2e check package build binary install install-local check-binary clean distclean
|
||||
.PHONY: help deps test test-e2e check package release-package build binary install install-local check-binary clean distclean
|
||||
|
||||
help:
|
||||
@printf "Targets:\n"
|
||||
@@ -16,6 +19,7 @@ help:
|
||||
@printf " make test-e2e Run Docker/Podman e2e tests (FLOW_RUN_E2E=1)\n"
|
||||
@printf " make check Run unit tests and CLI smoke check\n"
|
||||
@printf " make package Build wheel and sdist into dist/\n"
|
||||
@printf " make release-package Build installable Python release tarball\n"
|
||||
@printf " make build Build standalone binary at dist/flow\n"
|
||||
@printf " make install Build and install binary to ~/.local/bin/flow\n"
|
||||
@printf " make check-binary Run dist/flow --help\n"
|
||||
@@ -38,6 +42,16 @@ check: test
|
||||
package: deps
|
||||
$(UV) build
|
||||
|
||||
release-package: deps
|
||||
rm -rf "$(RELEASE_ROOT)" "$(RELEASE_ARCHIVE)" "$(RELEASE_ARCHIVE).sha256"
|
||||
mkdir -p "$(RELEASE_ROOT)/wheelhouse"
|
||||
$(UV) build
|
||||
cp dist/flow-$(VERSION)-py3-none-any.whl "$(RELEASE_ROOT)/wheelhouse/"
|
||||
cp packaging/install.sh "$(RELEASE_ROOT)/install.sh"
|
||||
chmod 755 "$(RELEASE_ROOT)/install.sh"
|
||||
tar -czf "$(RELEASE_ARCHIVE)" -C "$(BUILD_DIR)" "flow-$(VERSION)-python"
|
||||
if command -v sha256sum >/dev/null 2>&1; then sha256sum "$(RELEASE_ARCHIVE)" > "$(RELEASE_ARCHIVE).sha256"; else shasum -a 256 "$(RELEASE_ARCHIVE)" > "$(RELEASE_ARCHIVE).sha256"; fi
|
||||
|
||||
build binary: deps
|
||||
$(UV) run pyinstaller --noconfirm --clean --onefile --name flow --paths "$(SRC_DIR)" "$(ENTRYPOINT)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user