Skip to content

Commit af11adf

Browse files
DirectXMan12frozencemetery
authored andcommitted
Automatically upload checksumed taball on release
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. [[email protected]: rebase out KRB5_PPAS usage]
1 parent c4f8cb3 commit af11adf

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ dist
1212
gssapi/**/*.c
1313
docs/build
1414
__dont_use_cython__.txt
15+
**/__pycache__
16+
.eggs

.travis.before-deploy.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
# clean up
4+
git clean -Xdf
5+
6+
# make the dir
7+
mkdir ./tag_build
8+
9+
# create and checksum the tarball
10+
tar -czvf ./tag_build/${TRAVIS_TAG}.tar.gz --exclude='tag_build' --exclude='.git' --transform "s,^\.,python-gssapi-${TRAVIS_TAG}," .
11+
md5sum --binary ./tag_build/${TRAVIS_TAG}.tar.gz > ./tag_build/${TRAVIS_TAG}.md5sum

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,17 @@ matrix:
2020
install: sh .travis.install.sh
2121

2222
script: sh .travis.sh
23+
24+
before_deploy: sh .travis.before-deploy.sh
25+
deploy:
26+
provider: releases
27+
api_key:
28+
secure: U8RPR6liglI4J8MOSEyK9uxvSFRMcCkKLflpIFKcpUFg+PUuK85YtRdOOL/L/pifat9/KvoF7OJEMNTQjoYAhziMu8GGsiPZlkFzXNiy54FxTTtgprkhllRK7nw/jK/hopKM01goKVaUL860aU+KdpfStRTaAy8ZGEj13jwOMYU=
29+
file:
30+
- tag_build/${TRAVIS_TAG}.md5sum
31+
- tag_build/${TRAVIS_TAG}.tar.gz
32+
on:
33+
repo: pythongssapi/python-gssapi
34+
tags: true
35+
python: "3.4"
36+
condition: "$KRB5_VER = '1.13'"

0 commit comments

Comments
 (0)