Working Saturnin-based meta-command

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #!/bin/bash
  2. #shellcheck disable=SC2034
  3. # MKit - simple install helper
  4. # See LICENSE file for copyright and license details.
  5. #
  6. # Bump size (for vbump_? and release_?)
  7. #
  8. MKIT_BUMPSIZE=${MKIT_BUMPSIZE:-1}
  9. #
  10. # Debug mode (true|false)
  11. #
  12. MKIT_DEBUG=${MKIT_DEBUG:-false}
  13. #
  14. # Default deploy mode for files
  15. #
  16. MKIT_DEFAULT_MODE="644"
  17. #
  18. # Dry mode (true|false)
  19. #
  20. # Set to true to not install anything. Implies MKIT_DEBUG.
  21. #
  22. MKIT_DRY=${MKIT_DRY:-false}
  23. #
  24. # Path to mkit.ini
  25. #
  26. MKIT_INI=${MKIT_INI:-mkit.ini}
  27. #
  28. # Limit ini expansion depth
  29. #
  30. # To avoid endless loops, this value is subtracted each
  31. # time ini() expands a reference; when zero is reached,
  32. # no more expansions happen.
  33. #
  34. MKIT_INI_EXPAND=2
  35. #
  36. # Path to MKit local config and temp
  37. #
  38. # Typically hidden in project root, here MKit can
  39. # save its temporary lists.
  40. #
  41. MKIT_LOCAL=${MKIT_LOCAL:-.mkit}
  42. #
  43. # Package name
  44. #
  45. # Used as base for tarball and in some default macros.
  46. #
  47. MKIT_PROJ_PKGNAME=""
  48. #
  49. # Add time-based ordinal tag to SemVer build data?
  50. #
  51. # Can be 'none', 'ctime' or 'btime'.
  52. #
  53. # If 'ctime', devel builds have also timestamp-based tag in format of
  54. # `t%Y%m%d%H%M%S`, that is, a small character 't' followed by timestamp
  55. # without non-digit characters. The timestamps are in UTC, ie. timezones
  56. # need not apply. 'btime' has the same format, except that it's derived
  57. # from build time, while 'ctime' is from last commit's commit date.
  58. #
  59. # This helps with deploying development builds where packaging system
  60. # is not SemVer-compliant and makes it hard to install arbitrary version.
  61. # For example, old yum version (as of RHEL-6) will not let you install
  62. # version that it deems older than is installed, making it hard to
  63. # continually upgrade during active development. While packaging
  64. # systems have their own rukes (and SemVer says both versions should be
  65. # considered same) this tag will make it more likely to "win" the build
  66. # you made later.
  67. #
  68. # Note that this does not affect clean builds (ie. builds from clean
  69. # repo with HEAD corresponding to latest version tag.).
  70. #
  71. # Also note that 'btime' makes the version non-deterministic: merely
  72. # initiating the build a second later will result in different version.
  73. #
  74. MKIT_TTAG=${MKIT_TTAG:-ctime}
  75. #
  76. # This MKit version
  77. #
  78. MKIT_VERSION=0.0.34