Skip to content

Commit

Permalink
Deploy targets in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
frodre committed Oct 2, 2024
1 parent 8678477 commit 52b1b73
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
VERSION ?= $(shell git rev-parse --short HEAD)
IMAGE ?= fme
ENVIRONMENT_NAME ?= fme
DEPLOY_TARGET ?= pypi

build_docker_image:
docker build -f docker/Dockerfile -t $(IMAGE):$(VERSION) .
Expand All @@ -16,3 +17,13 @@ create_environment:

test:
pytest --durations 20 .

# For maintainer use only
# requires fme[deploy] to be installed
deploy_pypi:
rm -rf dist/*
python -m build
twine upload --repository $(DEPLOY_TARGET) dist/*

deploy_test_pypi: DEPLOY_TARGET = testpypi
deploy_test_pypi: deploy_pypi
2 changes: 2 additions & 0 deletions fme/deploy-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
twine
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Documentation = "https://ai2-climate-emulator.readthedocs.io/"
dependencies = { file = "fme/requirements.txt" }
optional-dependencies.dev = { file = "fme/dev-requirements.txt" }
optional-dependencies.docs = { file = "fme/docs/requirements.txt" }
optional-dependencies.deploy = { file = "fme/deploy-requirements.txt" }

[tool.setuptools.packages.find]
where = ["fme"]
Expand Down

0 comments on commit 52b1b73

Please sign in to comment.