File: release.sh

package info (click to toggle)
patator 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 616 kB
  • sloc: python: 3,387; sh: 95; makefile: 3
file content (16 lines) | stat: -rwxr-xr-x 431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

set -ex

DOCKER_IMAGE='lanjelot/patator'
GIT_REPO='https://github.com/lanjelot/patator'
TMP_COPY=$(mktemp -d)

git clone -b master $GIT_REPO $TMP_COPY
cd $TMP_COPY
VERSION=$(echo `git tag|sort -V|tail -1`-`git rev-parse --verify HEAD|cut -b -7`)
sed -i -e "s,^__version__.*$,__version__ = '$VERSION'," patator.py
docker build . -t $DOCKER_IMAGE:$VERSION -t $DOCKER_IMAGE:latest

docker login
docker push $DOCKER_IMAGE