#!/bin/bash if [ "$#" -lt 1 ] ; then echo "Usage: $0 " >&2 exit 1 fi # This script nowadays (that's why it exists as such simple and # short script at all) just appends "+0" to the specified # on the command line. # # This turned out to be the most reliable way to get: # # $existing_old_version < $snapshot_version < $new_version # # where $existing_old_version is the provided , # $snapshot_version is a version number based on the output of # the script (as used inside scripts like # generate-{git,svn}-snapshot) and $new_version is a version # number that might show up in the future. # # NOTE: The author of jenkins-debian-glue is aware of only one # exception where this isn't true with +0 appended for $snapshot. # This would be the case when e.g. version 1.2.3 would be changed # to 1.2.3-1. But this would mean a change in Debian packaging as # well (from Debian package source being identical to the # pristine source (AKA native package) vs. upstream software # packaged within Debian (AKA non-native package)). In such a # situation the $existing_old_version should be raised from e.g. # 1.2.3 to at least 1.2.3.1-1, otherwise the generated # $snapshot_version will be older than $existing_old_version # until it's 1.2.4, 1.3, etc. echo "${1}+0" # vim:foldmethod=marker ts=2 ft=sh ai expandtab sw=2