Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update release process support #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ WORKDIR /usr/src/app

RUN apk --update add git

COPY requirements.txt /usr/src/app/
COPY dev_requirements.txt /usr/src/app/
RUN pip install --upgrade pip && \
pip install -r requirements.txt
pip install -r dev_requirements.txt

COPY . /usr/src/app

Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ all: image
citest:
docker run \
--rm \
--env COVERAGE_FILE=/tmp/coverage.txt \
--env CIRCLECI \
--env CIRCLE_BRANCH \
--env CIRCLE_SHA1 \
--env CODECLIMATE_REPO_TOKEN \
--entrypoint=/bin/sh \
$(IMAGE_NAME) -c 'python setup.py test && codeclimate-test-reporter'
--volume /tmp:/tmp \
$(IMAGE_NAME) -c 'python setup.py test'

image:
docker build --tag $(IMAGE_NAME) .
Expand All @@ -32,7 +34,7 @@ release: image
--rm \
--volume ~/.pypirc:/home/app/.pypirc \
--entrypoint=/bin/sh \
$(IMAGE_NAME) -c 'bin/release'
$(IMAGE_NAME) -c 'bin/release' && bin/post-release

test-release: image
docker run \
Expand Down
9 changes: 9 additions & 0 deletions bin/post-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
#
# Usage: bin/post-release
#
###
set -e

git tag -f v$(cat reporter/VERSION)
git push origin --tags
2 changes: 1 addition & 1 deletion bin/prep-release
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ else
echo "hub not installed? Please open the PR manually" >&2
fi

echo "After merging the version-bump PR, run bin/release"
echo "After merging the version-bump PR, run: make release"
6 changes: 2 additions & 4 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
# Usage: bin/release
#
###
set -e

python setup.py build
python setup.py register -r pyp
python setup.py register -r pypi
python setup.py sdist upload -r pypi

git tag v$(cat reporter/VERSION)
git push origin --tags
6 changes: 2 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ machine:

dependencies:
override:
- pip install codeclimate-test-reporter
- make image

test:
override:
- make citest

notify:
webhooks:
- url: https://cc-slack-proxy.herokuapp.com/circle
- codeclimate-test-reporter --file /tmp/coverage.txt
2 changes: 1 addition & 1 deletion requirements.txt → dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests
coverage==4.0.3
coverage>=4.0
pytest-cov
pytest
HTTPretty
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ def run(self):
],
},
package_data={"reporter": ["VERSION"]},
install_requires=["coverage>=4.0", "requests"],
)