Skip to content

Commit

Permalink
Sync Debian version (#4840)
Browse files Browse the repository at this point in the history
* Sync Debian version

* Drop temporary logging
  • Loading branch information
jasp00 authored Mar 7, 2019
1 parent 9e6ce06 commit cdd1ddb
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ matrix:
osx_image: xcode8.2
env: QT5=True
- env: TARGET_OS=debian-sid TARGET_DEPLOY=True
git:
depth: false
- env: TARGET_OS=debian-sid TARGET_ARCH=i386
- compiler: clang
env: TARGET_OS=debian-sid
Expand Down
34 changes: 34 additions & 0 deletions .travis/linux.debian-sid.script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,40 @@ else
sudo pbuilder --update --basetgz "$BASETGZ"
fi

sync_version() {
local VERSION
local MMR
local STAGE
local EXTRA

VERSION=$(git describe --tags --match v[0-9].[0-9].[0-9]*)

This comment has been minimized.

Copy link
@PhysSong

PhysSong Mar 11, 2019

Member

@jasp00 I think this command may fail in i386 and/or Clang builds because they still use shallow clones.

This comment has been minimized.

Copy link
@jasp00

jasp00 Mar 12, 2019

Author Member

Right, it is a fatal error.

VERSION=${VERSION#v}
MMR=${VERSION%%-*}
case $VERSION in
*-*-*-*)
VERSION=${VERSION%-*}
STAGE=${VERSION#*-}
STAGE=${STAGE%-*}
EXTRA=${VERSION##*-}
VERSION=$MMR~$STAGE.$EXTRA
;;
*-*-*)
VERSION=${VERSION%-*}
EXTRA=${VERSION##*-}
VERSION=$MMR.$EXTRA
;;
*-*)
STAGE=${VERSION#*-}
VERSION=$MMR~$STAGE
;;
esac

sed "1 s/@VERSION@/$VERSION/" -i debian/changelog
echo Set Debian version to $VERSION
}

sync_version

DIR="$PWD"
cd ..
dpkg-source -b "$DIR"
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lmms (1.2.0~rc7.1) unstable; urgency=low
lmms (@VERSION@) unstable; urgency=low

* Upstream integration.
* Drop Debian menu entry (policy 9.6).
Expand Down

0 comments on commit cdd1ddb

Please sign in to comment.