summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Ovchinnikov <anton@tonyo.info>2019-01-15 12:03:33 +0100
committerGitHub <noreply@github.com>2019-01-15 12:03:33 +0100
commitd891c20f0f930153f508e9d698d9de42e910face (patch)
tree7b552ec0ffea81855a3e0e0d2c5dd76e279d7b9c
parent174c2838e8a024bac4761eb2b33d25ac6629a0a6 (diff)
downloadraven-d891c20f0f930153f508e9d698d9de42e910face.tar.gz
ci: Use craft for publishing new releases (#1346)
* ci: Use craft for publishing new releases * fix: Update .craft.yml * fix: Remove probot conf files
-rw-r--r--.craft.yml9
-rw-r--r--.github/release.yml3
-rw-r--r--.travis.yml5
-rw-r--r--Makefile16
-rwxr-xr-xscripts/bump-version.sh20
5 files changed, 48 insertions, 5 deletions
diff --git a/.craft.yml b/.craft.yml
new file mode 100644
index 0000000..c5193f0
--- /dev/null
+++ b/.craft.yml
@@ -0,0 +1,9 @@
+---
+minVersion: '0.7.0'
+changelogPolicy: simple
+github:
+ owner: getsentry
+ repo: raven-python
+targets:
+ - name: pypi
+ - name: github
diff --git a/.github/release.yml b/.github/release.yml
deleted file mode 100644
index 9fe7023..0000000
--- a/.github/release.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-targets:
- - github
- - pypi
diff --git a/.travis.yml b/.travis.yml
index ebcca66..b50b3df 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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:
diff --git a/Makefile b/Makefile
index 5d40fed..186cc05 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh
new file mode 100755
index 0000000..5e6e19c
--- /dev/null
+++ b/scripts/bump-version.sh
@@ -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