travis: Show compressed image size

Squashed commit of the following:

commit 3460fec25e
Author: Alexey Rogachevskiy <sfalexrog@gmail.com>
Date:   Mon Aug 10 00:19:05 2020 +0300

    travis: Use short commit notation

commit fa44e4b42f
Author: Alexey Rogachevskiy <sfalexrog@gmail.com>
Date:   Sun Aug 9 01:00:56 2020 +0300

    travis: Fix IMAGE_VERSION initialization

commit 4bc985a7f4
Author: Alexey Rogachevskiy <sfalexrog@gmail.com>
Date:   Sat Aug 8 21:26:06 2020 +0300

    travis: Generate zip file after successful build

commit c2bfa07a36
Author: Alexey Rogachevskiy <sfalexrog@gmail.com>
Date:   Fri Aug 7 17:36:56 2020 +0300

    travis: Fix parsing errors

commit 6ba27ef15d
Author: Alexey Rogachevskiy <sfalexrog@gmail.com>
Date:   Fri Aug 7 17:28:48 2020 +0300

    travis: Output compressed image size
This commit is contained in:
Alexey Rogachevskiy
2020-08-10 13:47:17 +03:00
parent 6b5e3464f1
commit e94e552da3

View File

@@ -7,7 +7,7 @@ env:
global:
- DOCKER="sfalexrog/img-tool:qemu-update"
- TARGET_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git"
- if [[ -z ${TRAVIS_TAG} ]]; then IMAGE_VERSION="${TRAVIS_COMMIT}}"; else IMAGE_VERSION="${TRAVIS_TAG}"; fi
- IMAGE_VERSION=${TRAVIS_TAG:-${TRAVIS_COMMIT:0:7}}
- IMAGE_NAME="$(basename -s '.git' ${TARGET_REPO})_${IMAGE_VERSION}.img"
git:
depth: 50
@@ -36,12 +36,13 @@ jobs:
fi
before_cache:
- cp images/*.zip imgcache
after_success:
- sudo chmod -R 777 *
- cd images && zip ${IMAGE_NAME}.zip ${IMAGE_NAME} && stat --printf="Compressed image size:%s\n" ${IMAGE_NAME}.zip
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "goldarte"
- git config --local user.email "goldartt@gmail.com"
- sudo chmod -R 777 *
- cd images && zip ${IMAGE_NAME}.zip ${IMAGE_NAME}
deploy:
provider: releases
token: ${GITHUB_OAUTH_TOKEN}