Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

ci: Use craft for publishing new releases #1346

Merged
merged 3 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 9 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
minVersion: '0.7.0'
changelogPolicy: simple
github:
owner: getsentry
repo: raven-python
targets:
- name: pypi
- name: github
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ matrix:
- pip install tox
script: tox -e flake8

- name: Distribution packages
python: "3.6"
install: false
script: make travis-upload-dist

sudo: false
addons:
apt:
Expand Down
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,23 @@ setup-git:
git config branch.autosetuprebase always
cd .git/hooks && ln -sf ../../hooks/* ./

publish:
clean:
rm -rf dist build

publish: clean
python setup.py sdist bdist_wheel upload

dist: clean
python setup.py sdist bdist_wheel

install-zeus-cli:
npm install -g @zeus-ci/cli

travis-upload-dist: dist install-zeus-cli
zeus upload -t "application/zip+wheel" dist/* \
|| [[ ! "$(TRAVIS_BRANCH)" =~ ^release/ ]]

update-ca:
curl -sSL https://mkcert.org/generate/ -o raven/data/cacert.pem

.PHONY: bootstrap test lint coverage setup-git publish update-ca
.PHONY: bootstrap test lint coverage setup-git publish update-ca dist clean install-zeus-cli travis-upload-dist
20 changes: 20 additions & 0 deletions scripts/bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -eux

SCRIPT_DIR="$( dirname "$0" )"
cd $SCRIPT_DIR/..

OLD_VERSION="${1}"
NEW_VERSION="${2}"

echo "Current version: $OLD_VERSION"
echo "Bumping version: $NEW_VERSION"

function replace() {
! grep "$2" $3
perl -i -pe "s/$1/$2/g" $3
grep "$2" $3 # verify that replacement was successful
}

replace "current_version = [0-9.]+" "current_version = $NEW_VERSION" ./.bumpversion.cfg
replace "VERSION = '[0-9.]+'" "VERSION = '$NEW_VERSION'" ./raven/__init__.py