Skip to content

Commit

Permalink
Merge pull request #190 from snipsco/release/0.3.2
Browse files Browse the repository at this point in the history
Release/0.3.2
  • Loading branch information
ClemDoum authored Apr 28, 2017
2 parents 901b8e6 + c7ae4d3 commit 53c2b25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ def branchName = "${env.BRANCH_NAME}"
def packagePath = "snips_nlu"
def VENV = ". venv/bin/activate"


def version(path) {
readFile("${path}/__version__").split("\n")[0]
}
Expand All @@ -15,8 +16,8 @@ node('jenkins-slave-generic') {
}

stage('Setup') {
def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}"
sh "virtualenv venv"
def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}"
sh """
${VENV}
echo "[global]\nindex = https://${credentials}@nexus-repository.snips.ai/repository/pypi-internal/pypi\nindex-url = https://pypi.python.org/simple/\nextra-index-url = https://${credentials}@nexus-repository.snips.ai/repository/pypi-internal/simple" >> venv/pip.conf
Expand All @@ -38,6 +39,7 @@ node('jenkins-slave-generic') {
checkout scm
def rootPath = pwd()
def path = "${rootPath}/${packagePath}"
def credentials = "${env.NEXUS_USERNAME_PYPI}:${env.NEXUS_PASSWORD_PYPI}"
sh "git submodule update --init --recursive"
sh """
virtualenv venv
Expand All @@ -46,6 +48,10 @@ node('jenkins-slave-generic') {
pip install .
python setup.py bdist_wheel upload -r pypisnips
git tag ${version(path)}
git remote rm origin
git remote add origin '[email protected]:snipsco/snips-nlu.git'
git config --global user.email '[email protected]'
git config --global user.name 'Jenkins'
git push --tags
"""
default:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
PACKAGE_PATH = os.path.join(ROOT_PATH, PACKAGE_NAME)
VERSION = "__version__"

with io.open(os.path.join(PACKAGE_PATH, VERSION))as f:
with io.open(os.path.join(PACKAGE_PATH, VERSION)) as f:
version = f.readline().strip()

required = [
Expand Down

0 comments on commit 53c2b25

Please sign in to comment.