Skip to content

Commit 0242d1a

Browse files
authored
Merge pull request #17 from zalando-incubator/version_check
Implement version change check in CI.
2 parents 0c168f6 + ae94636 commit 0242d1a

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ script:
1111
- make test
1212
- make lint
1313
- make docs
14+
- ./check_version.sh
1415
after_success:
1516
- python-codacy-coverage -r coverage.xml
1617
before_deploy:

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.2.8][] - 2019-05-21
8+
## [1.2.9][] - 2019-05-21
9+
10+
### Added
11+
12+
- CI script for checking if the version number has been updated.
13+
14+
## [1.2.8][] - 2019-05-20
915

1016
### Added
1117

@@ -69,6 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6975
- Implemented `-v`/`--version` option to show Zelt version.
7076
- This changelog.
7177

78+
[1.2.9]: https://github.com/zalando-incubator/zelt/compare/v1.2.8...v1.2.9
7279
[1.2.8]: https://github.com/zalando-incubator/zelt/compare/v1.2.7...v1.2.8
7380
[1.2.7]: https://github.com/zalando-incubator/zelt/compare/v1.2.6...v1.2.7
7481
[1.2.6]: https://github.com/zalando-incubator/zelt/compare/v1.2.5...v1.2.6

check_version.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /bin/bash
2+
3+
VERSION_FILE="pyproject.toml"
4+
PREVIOUS_VERSION=$(git describe --abbrev=0 --tags)
5+
# Remove leading 'v' char.
6+
PREVIOUS_VERSION=${PREVIOUS_VERSION#?}
7+
# Using sed to remove leading and trailing double quotes.
8+
CURRENT_VERSION=$(grep -m 1 version $VERSION_FILE | awk '{print $3}' | sed -e 's/^"//' -e 's/"$//')
9+
10+
if [ $CURRENT_VERSION == $PREVIOUS_VERSION ]; then
11+
echo "ERROR: Version has not been updated in '$VERSION_FILE'!"
12+
echo "Don't forget to also update the CHANGELOG."
13+
echo "Current version: $CURRENT_VERSION"
14+
echo "Released version: $PREVIOUS_VERSION"
15+
exit 1
16+
fi

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "zelt"
3-
version = "1.2.8"
3+
version = "1.2.9"
44
description = "Zalando end-to-end load tester"
55
authors = [
66
"Brian Maher <brian.maher@zalando.de>",

0 commit comments

Comments
 (0)