-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (61 loc) · 3.51 KB
/
Makefile
File metadata and controls
72 lines (61 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!make
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# ____ _ #
# / __ \____ ___ ____ ____ _____ (_) ® #
# / / / / __ \/ _ \/ __ \/ __ `/ __ \/ / #
# / /_/ / /_/ / __/ / / / /_/ / /_/ / / #
# \____/ .___/\___/_/ /_/\__,_/ .___/_/ #
# /_/ /_/ #
# #
# The Largest Certified API Marketplace #
# Accelerate Digital Transformation • Simplify Processes • Lead Industry #
# #
# ═══════════════════════════════════════════════════════════════════════ #
# #
# Project: openapi-python-sdk #
# Author: Michael Cuffaro (@maiku1008) #
# Copyright: (c) 2025 Openapi®. All rights reserved. #
# License: MIT #
# Maintainer: Francesco Bianco #
# Contact: https://openapi.com/ #
# Repository: https://github.com/openapi-it/openapi-python-sdk/ #
# Documentation: https://console.openapi.com/ #
# #
# ═══════════════════════════════════════════════════════════════════════ #
# #
# "Truth lies at the source of the stream." #
# — English Proverb #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## =========
## Variables
## =========
export PATH := $(HOME)/.local/bin:$(PATH)
VERSION := $(shell grep '^version' pyproject.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
## ====================
## Development Commands
## ====================
dev-push:
@git config credential.helper 'cache --timeout=3600'
@git add .
@git commit -m "$$(read -p 'Commit message: ' msg; echo $$msg)" || true
@git push
## ================
## Release Commands
## ================
.PHONY: setup build publish release
setup:
@poetry --version > /dev/null 2>&1 || \
(echo "Installing Poetry..." && curl -sSL https://install.python-poetry.org | python3 -)
build: setup
@echo "Building version $(VERSION)..."
@poetry build
publish: build
@echo "Publishing version $(VERSION) to PyPI..."
@poetry publish
release: publish
@echo "Tagging release $(VERSION)..."
@git tag -fa "$(VERSION)" -m "Release $(VERSION)"
@git push origin --tags -f
@echo "Released $(VERSION) successfully."