Skip to content

Commit 0100cbf

Browse files
committed
Add Makefile
1 parent 6402d60 commit 0100cbf

3 files changed

Lines changed: 42 additions & 9 deletions

File tree

.circleci/config.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ jobs:
33
build:
44
docker:
55
- image: circleci/python:3.7.4
6-
environment:
7-
POETRY_VERSION: 1.0.0a5
86
steps:
97
- checkout
108
- run:
@@ -14,18 +12,16 @@ jobs:
1412
- run:
1513
name: Setup
1614
command: |
17-
sudo pip install poetry==${POETRY_VERSION}
18-
sudo pip install pre-commit
15+
make setup
16+
1917
mkdir -p /home/circleci/.config/pypoetry/
2018
echo "[repositories]" > /home/circleci/.config/pypoetry/config.toml
2119
poetry config settings.virtualenvs.create false
22-
pre-commit install-hooks
2320
- run:
2421
name: Lint
25-
command: pre-commit run --all-files
22+
command: make lint
2623
- run:
2724
name: Build
28-
command: |
29-
poetry build
25+
command: make build
3026
- store_artifacts:
31-
path: dist
27+
path: dist

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
POETRY_VERSION := 1.0.0a5
2+
3+
.PHONY: setup build install lint release
4+
DEFAULT: build
5+
6+
setup:
7+
pip install poetry==$(POETRY_VERSION)
8+
pip install pre-commit
9+
pre-commit install-hooks
10+
11+
build:
12+
poetry build
13+
14+
install: build
15+
poetry install
16+
cmus-osx install --force
17+
18+
lint:
19+
pre-commit run --all-files
20+
21+
release: lint build
22+
poetry version
23+
poetry publish

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ export PYTHON_CONFIGURE_OPTS="--enable-framework"
3939
cmus-osx config
4040
```
4141

42+
## Development
43+
44+
Prepare environment
45+
```
46+
make setup
47+
```
48+
49+
Make changes and install new version
50+
```
51+
make install
52+
```
53+
54+
Poetry will recognise when running from virtualenv.
55+
4256
### Credits
4357
* [azadkuh](https://github.com/azadkuh): all versions up to and including v1.2.0
4458
* [PhilipTrauner](https://github.com/PhilipTrauner): all following versions

0 commit comments

Comments
 (0)