Skip to content

Commit

Permalink
Merge branch 'release/0.1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
pine committed Jul 5, 2018
2 parents 4a4364f + 62521c4 commit 4fc2b6e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ brew install git-lfs
git lfs install
git lfs pull

# install retry
brew install gnu-getopt || true
sudo curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry
sudo chmod +x /usr/local/bin/retry

# install python
mkdir -p ~/local
git clone https://github.com/tagomoris/xbuild.git ~/local/xbuild
Expand Down
15 changes: 9 additions & 6 deletions .travis/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@

set -eux

PATH=/usr/local/opt/gnu-getopt/bin:$PATH

# 3.5
~/local/python-3.5/bin/python setup.py bdist_wheel install test
~/local/python-3.5/bin/python ./scripts/publish.py
which retry
retry -- ~/local/python-3.5/bin/python setup.py bdist_wheel install test
retry -- ~/local/python-3.5/bin/python ./scripts/publish.py
./scripts/clean.sh

# 3.6
~/local/python-3.6/bin/python setup.py bdist_wheel install test
~/local/python-3.6/bin/python ./scripts/publish.py
retry -- ~/local/python-3.6/bin/python setup.py bdist_wheel install test
retry -- ~/local/python-3.6/bin/python ./scripts/publish.py
./scripts/clean.sh

# 3.7
~/local/python-3.7/bin/python setup.py bdist_wheel install test
~/local/python-3.7/bin/python ./scripts/publish.py
retry -- ~/local/python-3.7/bin/python setup.py bdist_wheel install test
retry -- ~/local/python-3.7/bin/python ./scripts/publish.py
44 changes: 13 additions & 31 deletions scripts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os
import sys
import subprocess
from subprocess import CalledProcessError
from importlib import machinery
from pathlib import Path

Expand Down Expand Up @@ -36,31 +35,19 @@ def find_release_version():

def find_gemfary_packages():
subprocess.run(['fury', '-v'], stdout=subprocess.PIPE, check=True)
try:
process = subprocess.run(['fury', 'list',
'--as=' + GEMFURY_AS, '--api-token=' + GEMFURY_API_TOKEN],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)
except CalledProcessError as e:
print(e.output)
raise CalledProcessError(
returncode=e.returncode, cmd=[], output=e.output, stderr=e.stderr)
else:
packages = process.stdout.decode('utf-8')
return packages
process = subprocess.run(['fury', 'list',
'--as=' + GEMFURY_AS, '--api-token=' + GEMFURY_API_TOKEN],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)
packages = process.stdout.decode('utf-8')
return packages


def find_gemfary_versions():
try:
process = subprocess.run(['fury', 'versions', PACKAGE_NAME,
'--as=' + GEMFURY_AS, '--api-token=' + GEMFURY_API_TOKEN],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)
except CalledProcessError as e:
print(e.output)
raise CalledProcessError(
returncode=e.returncode, cmd=[], output=e.output, stderr=e.stderr)
else:
versions = process.stdout.decode('utf-8')
return versions
process = subprocess.run(['fury', 'versions', PACKAGE_NAME,
'--as=' + GEMFURY_AS, '--api-token=' + GEMFURY_API_TOKEN],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)
versions = process.stdout.decode('utf-8')
return versions


def find_wheel_path(version):
Expand All @@ -71,14 +58,9 @@ def find_wheel_path(version):


def push_to_gemfary(wheel_path):
try:
subprocess.run(['fury', 'push', wheel_path,
'--as=' + GEMFURY_AS, '--api-token=' + GEMFURY_API_TOKEN],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)
except CalledProcessError as e:
print(e.output)
raise CalledProcessError(
returncode=e.returncode, cmd=[], output=e.output, stderr=e.stderr)
subprocess.run(['fury', 'push', wheel_path,
'--as=' + GEMFURY_AS, '--api-token=' + GEMFURY_API_TOKEN],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)


def publish():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from setuptools import setup, Extension

VERSION = '0.1.6'
VERSION = '0.1.7'


extra_objects = [
Expand Down

0 comments on commit 4fc2b6e

Please sign in to comment.