modified version of jenkins debian glue (https://github.com/mika/jenkins-debian-glue) for devuan
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
1.3 KiB

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