Skip to content

Commit

Permalink
Automatically upload checksumed taball on release
Browse files Browse the repository at this point in the history
This commit instructs Travis to upload a compressed tarball
with the same contents (essentially) as GitHub's compressed tarball.
It also uploads an md5sum for the generated compressed tarball as well.

The upload happens on tags, when the Python version is Python 3.4 and
the krb5 version is 1.13 (this is intended to stay as the latest
published release).  To facilitate this, the KRB5_VER environment
variable was added to each environment in the test matrix.

To ensure that cleanup happens properly, a couple of extra directories
were added to the .gitignore file.

[rharwood@redhat.com: rebase out KRB5_PPAS usage]
  • Loading branch information
DirectXMan12 authored and frozencemetery committed Feb 26, 2015
1 parent c4f8cb3 commit af11adf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ dist
gssapi/**/*.c
docs/build
__dont_use_cython__.txt
**/__pycache__
.eggs
11 changes: 11 additions & 0 deletions .travis.before-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# clean up
git clean -Xdf

# make the dir
mkdir ./tag_build

# create and checksum the tarball
tar -czvf ./tag_build/${TRAVIS_TAG}.tar.gz --exclude='tag_build' --exclude='.git' --transform "s,^\.,python-gssapi-${TRAVIS_TAG}," .
md5sum --binary ./tag_build/${TRAVIS_TAG}.tar.gz > ./tag_build/${TRAVIS_TAG}.md5sum
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,17 @@ matrix:
install: sh .travis.install.sh

script: sh .travis.sh

before_deploy: sh .travis.before-deploy.sh
deploy:
provider: releases
api_key:
secure: U8RPR6liglI4J8MOSEyK9uxvSFRMcCkKLflpIFKcpUFg+PUuK85YtRdOOL/L/pifat9/KvoF7OJEMNTQjoYAhziMu8GGsiPZlkFzXNiy54FxTTtgprkhllRK7nw/jK/hopKM01goKVaUL860aU+KdpfStRTaAy8ZGEj13jwOMYU=
file:
- tag_build/${TRAVIS_TAG}.md5sum
- tag_build/${TRAVIS_TAG}.tar.gz
on:
repo: pythongssapi/python-gssapi
tags: true
python: "3.4"
condition: "$KRB5_VER = '1.13'"

0 comments on commit af11adf

Please sign in to comment.