Merge pull request #2417 from dnephin/inlude_git_sha_in_version
Add the git sha to version output
This commit is contained in:
commit
8bc84c74e7
13 changed files with 67 additions and 18 deletions
|
|
@ -10,6 +10,7 @@ fi
|
|||
TAG=$1
|
||||
VERSION="$(python setup.py --version)"
|
||||
|
||||
./script/write-git-sha
|
||||
python setup.py sdist
|
||||
cp dist/docker-compose-$VERSION.tar.gz dist/docker-compose-release.tar.gz
|
||||
docker build -t docker/compose:$TAG -f Dockerfile.run .
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@ docker build -t "$TAG" . | tail -n 200
|
|||
docker run \
|
||||
--rm --entrypoint="script/build-linux-inner" \
|
||||
-v $(pwd)/dist:/code/dist \
|
||||
-v $(pwd)/.git:/code/.git \
|
||||
"$TAG"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ mkdir -p `pwd`/dist
|
|||
chmod 777 `pwd`/dist
|
||||
|
||||
$VENV/bin/pip install -q -r requirements-build.txt
|
||||
./script/write-git-sha
|
||||
su -c "$VENV/bin/pyinstaller docker-compose.spec" user
|
||||
mv dist/docker-compose $TARGET
|
||||
$TARGET version
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ virtualenv -p /usr/local/bin/python venv
|
|||
venv/bin/pip install -r requirements.txt
|
||||
venv/bin/pip install -r requirements-build.txt
|
||||
venv/bin/pip install --no-deps .
|
||||
./script/write-git-sha
|
||||
venv/bin/pyinstaller docker-compose.spec
|
||||
mv dist/docker-compose dist/docker-compose-Darwin-x86_64
|
||||
dist/docker-compose-Darwin-x86_64 version
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ virtualenv .\venv
|
|||
.\venv\Scripts\pip install --no-deps .
|
||||
.\venv\Scripts\pip install --allow-external pyinstaller -r requirements-build.txt
|
||||
|
||||
git rev-parse --short HEAD | out-file -encoding ASCII compose\GITSHA
|
||||
|
||||
# Build binary
|
||||
# pyinstaller has lots of warnings, so we need to run with ErrorAction = Continue
|
||||
$ErrorActionPreference = "Continue"
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ docker push docker/compose:$VERSION
|
|||
echo "Uploading sdist to pypi"
|
||||
pandoc -f markdown -t rst README.md -o README.rst
|
||||
sed -i -e 's/logo.png?raw=true/https:\/\/github.com\/docker\/compose\/raw\/master\/logo.png?raw=true/' README.rst
|
||||
./script/write-git-sha
|
||||
python setup.py sdist
|
||||
if [ "$(command -v twine 2> /dev/null)" ]; then
|
||||
twine upload ./dist/docker-compose-${VERSION}.tar.gz
|
||||
|
|
|
|||
7
script/write-git-sha
Executable file
7
script/write-git-sha
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Write the current commit sha to the file GITSHA. This file is included in
|
||||
# packaging so that `docker-compose version` can include the git sha.
|
||||
#
|
||||
set -e
|
||||
git rev-parse --short HEAD > compose/GITSHA
|
||||
Loading…
Add table
Add a link
Reference in a new issue