Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Debian version #4840

Merged
merged 2 commits into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shellcheck says local is undefined in the POSIX shell. Most shells(bash, dash, etc.) support the keyword though.
Since master checks shell scripts during CI builds using shellcheck, we have three choices(stable-1.2 isn't affected):

  • Specify a shell in the shebang which supports local
  • Do nothing but silence shellcheck warnings
  • Use a portable way for declaring local variables, if any


VERSION=$(git describe --tags --match v[0-9].[0-9].[0-9]*)
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