-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
33 lines (28 loc) · 1.03 KB
/
Makefile
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
name ?= codecovcli
# Semantic versioning format https://semver.org/
tag_regex := ^v([0-9]{1,}\.){2}[0-9]{1,}([-_]\w+)?$
lint.install:
echo "Installing ruff..."
pip install -Iv ruff
# The preferred method (for now) w.r.t. fixable rules is to manually update the makefile
# with --fix and re-run 'make lint.' Since ruff is constantly adding rules this is a slight
# amount of "needed" friction imo.
lint.run:
ruff check --ignore F401 --exclude languages --exclude samples
ruff format --exclude languages --exclude samples
lint.check:
echo "Linting..."
ruff check --ignore F401 --exclude languages --exclude samples
echo "Formatting..."
ruff format --check --exclude languages --exclude samples
lint:
make lint.install
make lint.run
tag.release:
ifeq ($(shell echo ${version} | egrep "${tag_regex}"),)
@echo "Version '${version}' is not a valid git tag.\nUsage: make tag.release version=v0.0.0"
else
@echo "Tagging new release ${version}"
git tag -a ${version} -m "Autogenerated release tag for codecov-cli"
git push origin ${version}
endif