Skip to content

Commit c91b451

Browse files
author
ks6088ts
committed
add commands for Azure Functions
1 parent 04310ae commit c91b451

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

Makefile

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,27 @@ docs-serve: ## serve documentation
104104
.PHONY: ci-test-docs
105105
ci-test-docs: docs ## run CI test for documentation
106106

107+
# ---
108+
# Azure Functions
109+
# ---
110+
111+
.PHONY: functions-start
112+
functions-start: ## start Azure Functions
113+
uv run func start
114+
115+
.PHONY: functions-publish
116+
functions-publish: ## publish Azure Functions
117+
uv export --format requirements-txt --no-dev --no-hashes --output-file requirements.txt
118+
@if [[ "$$OSTYPE" == "darwin"* ]]; then \
119+
sed -i '' '/^-e \.$$/d' requirements.txt; \
120+
elif [[ "$$OSTYPE" == "linux"* ]]; then \
121+
sed -i '/^-e \.$$/d' requirements.txt; \
122+
else \
123+
echo "Removing '-e .' from requirements.txt is not supported on this OS. Please remove it manually." >&2; \
124+
exit 1; \
125+
fi
126+
uv run func azure functionapp publish $(FUNCTIONS_APP_NAME)
127+
107128
# ---
108129
# Project
109130
# ---
@@ -121,10 +142,6 @@ dev: ## run FastAPI server in development mode
121142
--port 8000 \
122143
--reload
123144

124-
.PHONY: azure-functions
125-
azure-functions: ## run Azure Functions server
126-
uv run func start
127-
128145
.PHONY: mcp-insppector
129146
mcp-inspector: ## run MCP Inspector server
130147
npx @modelcontextprotocol/inspector

0 commit comments

Comments
 (0)