From 2c97495f5adf262a8d879334c13c26ed42b91cc4 Mon Sep 17 00:00:00 2001 From: Diogo Lemos Date: Tue, 15 Oct 2019 17:27:44 +0100 Subject: [PATCH] Add Makefile --- .circleci/config.yml | 14 +++++--------- Makefile | 20 ++++++++++++++++++++ README.md | 14 ++++++++++++++ 3 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 Makefile diff --git a/.circleci/config.yml b/.circleci/config.yml index fa2443b..0338672 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,8 +3,6 @@ jobs: build: docker: - image: circleci/python:3.7.4 - environment: - POETRY_VERSION: 1.0.0a5 steps: - checkout - run: @@ -14,18 +12,16 @@ jobs: - run: name: Setup command: | - sudo pip install poetry==${POETRY_VERSION} - sudo pip install pre-commit + make setup + mkdir -p /home/circleci/.config/pypoetry/ echo "[repositories]" > /home/circleci/.config/pypoetry/config.toml poetry config settings.virtualenvs.create false - pre-commit install-hooks - run: name: Lint - command: pre-commit run --all-files + command: make lint - run: name: Build - command: | - poetry build + command: make build - store_artifacts: - path: dist \ No newline at end of file + path: dist diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1c5d182 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +POETRY_VERSION := 1.0.0a5 + +setup: + pip install poetry==$(POETRY_VERSION) + pip install pre-commit + pre-commit install-hooks + +build: + poetry build + +install: build + poetry install + cmus-osx install --force + +lint: + pre-commit run --all-files + +release: lint build + poetry version + poetry publish diff --git a/README.md b/README.md index 10cff43..7ecd4b6 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,20 @@ export PYTHON_CONFIGURE_OPTS="--enable-framework" cmus-osx config ``` +## Development + +Prepare environment +``` +make setup +``` + +Make changes and install new version +``` +make install +``` + +Poetry will recognise when running from virtualenv. + ### Credits * [azadkuh](https://github.com/azadkuh): all versions up to and including v1.2.0 * [PhilipTrauner](https://github.com/PhilipTrauner): all following versions