From d1122a445806337e1da6c2e18557532c372e918f Mon Sep 17 00:00:00 2001 From: robstoll <5557885+robstoll@users.noreply.github.com> Date: Mon, 21 Oct 2024 04:02:43 +0000 Subject: [PATCH] update files of remote tegonal-scripts to version v3.5.0 via gt --- .gt/remotes/tegonal-scripts/pulled.tsv | 68 +++++++++---------- .../src/ci/install-shellcheck.sh | 4 +- lib/tegonal-scripts/src/qa/run-shellcheck.sh | 4 +- .../src/releasing/common-constants.source.sh | 3 +- .../releasing/deduce-next-version.source.sh | 2 +- .../src/releasing/pre-release-checks-git.sh | 6 +- .../releasing/prepare-files-next-dev-cycle.sh | 6 +- .../prepare-next-dev-cycle-template.sh | 6 +- .../src/releasing/release-files.sh | 6 +- .../src/releasing/release-template.sh | 6 +- .../src/releasing/sneak-peek-banner.sh | 4 +- .../src/releasing/toggle-sections.sh | 4 +- .../src/releasing/update-version-README.sh | 6 +- .../releasing/update-version-common-steps.sh | 6 +- .../update-version-issue-templates.sh | 6 +- .../src/releasing/update-version-scripts.sh | 6 +- lib/tegonal-scripts/src/setup.sh | 2 +- .../src/utility/array-utils.sh | 12 ++-- lib/tegonal-scripts/src/utility/ask.sh | 10 +-- lib/tegonal-scripts/src/utility/checks.sh | 33 ++++++--- .../src/utility/execute-if-defined.sh | 4 +- lib/tegonal-scripts/src/utility/git-utils.sh | 21 ++++-- lib/tegonal-scripts/src/utility/gpg-utils.sh | 2 +- lib/tegonal-scripts/src/utility/http.sh | 4 +- lib/tegonal-scripts/src/utility/io.sh | 10 +-- lib/tegonal-scripts/src/utility/log.sh | 18 ++--- lib/tegonal-scripts/src/utility/parse-args.sh | 25 ++++--- .../src/utility/parse-commands.sh | 8 +-- .../src/utility/parse-fn-args.sh | 12 ++-- .../src/utility/parse-utils.sh | 4 +- .../src/utility/recursive-declare-p.sh | 2 +- .../src/utility/replace-help-snippet.sh | 2 +- .../src/utility/replace-snippet.sh | 2 +- .../src/utility/source-once.sh | 6 +- .../src/utility/update-bash-docu.sh | 2 +- 35 files changed, 177 insertions(+), 145 deletions(-) diff --git a/.gt/remotes/tegonal-scripts/pulled.tsv b/.gt/remotes/tegonal-scripts/pulled.tsv index d103c4b..98039fb 100644 --- a/.gt/remotes/tegonal-scripts/pulled.tsv +++ b/.gt/remotes/tegonal-scripts/pulled.tsv @@ -1,36 +1,36 @@ #@ Version: 1.0.0 tag file relativeTarget sha512 -v3.2.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh f7a57b15a9f528697732cacdf57af3abd48158fdfcbb8519c406073829d167bb8b581532860eaafa4348b966a3a628128fb4d0b762a357a5ed96770ade8ceb4f -v3.2.0 src/releasing/prepare-files-next-dev-cycle.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh 53aa25befc4bb6d5877cbd4a9a418f2070d05012fd590b46a18edc1d354b24a96b382e927648060ca474ca4078319caa4557ddd53b55a2c35bbfc490d25cc29b -v3.2.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh 4dadd9061503bcf762039d4ee114f72ad44cebfefb1624fe893513c02b0c7a78ddaf16c13b7c5c189b70719fdd584a5d352e941dbcdaee8e479e5cba1f2880ba -v3.2.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh 115c44f61127882615f5c5aa2d8fe15d92bf3d50c7bae656b22b0a42389d433ced7dfcf68959bf8a44f52c163e28aabcbeafe48c05d994cd5b97ae161a7a55d4 -v3.2.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh 3c9bbcc40ea56bcd188cf0a06e318e8443a311ee7a6409a25320d3c9c25e542fd25877f81b324010c9a90fcc28ce9f260a3c6d2e9e4140614fbd84753382e0d8 -v3.2.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh 1f6e6a6f2c3cf0af41445c329425d6481399a292dc578afcaa835b946eefc12bdad6818c7c0a0e8e23320a8fbcf0356dff996a26a0c8d95eac7a7eab7f02e269 -v3.2.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh 6df19bbd687369c64616fbd2d4a0a8b2b536db7d5221dcee8cc1fc54552835faa81ce19d91d0a44e60ea33403e5aedfe24b8296a2fe096e6e58459b727717f88 -v3.2.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh d2ab0f4a2f5b26107895c306db972931c1fc13e4348d719d5afa1468242a6530e778381eb8ea02ceb6facb75cb6b4047f297696acc45a3ab833f4f785cfe16a0 -v3.2.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh 6a5c0a77216ee8222b1b5bb3d8e8f27ae68a604f46d8e5d8811e09ea827e1a269205446f252eed6e5dd7852aae66352180272ac433c8ed1a5744eb5a59cd4859 -v3.2.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh fb47fce748ca08650338c0dd1ecb715a0309e3d7d4342d1dbccf2691ca6130c1ecb61c681a6d75a150982b00f1a7a9ff17f2b8686a468916798b7d912f12050e -v3.2.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh 55fb9d8cd58ac0a833642959234f4b349b70e75bc310ef98c9f64e268bcf68d20763fc71ce8fad95080b84ca3637be1008edad93d69862b9e54fb6692e3b820c -v3.2.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh 9aabb683af66bab30cba32f8486b4a3eb2fcaa243d743b1ea7177a1b17477e44249694b5fcec74298c3d1efb5989a2f86e10c78e5c810fed2b8756509c690f59 -v3.2.0 src/releasing/release-files.sh ../lib/tegonal-scripts/src/releasing/release-files.sh 67f81c5a1b6353ceaf4f8cd003664622387fb4ada3b2eb073d38ca45a92be03bd7bf9bd568dc2a9a70c1650ffa98255e47b34e847242d1c0c9bb3e2c2aa660cc -v3.2.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh 701867a847119f4da16af5cc75c1261bf53d2a7e0d61c289e5b1358e28aba34d2ab0e964adb3bc18d0c249ed869c29440463a5b8aa70376a47d42293813e1549 -v3.2.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh 34e6549d3208d4bee23e28a9c81b7f6774280a5a9afd5759fc5ace8161d35a87acfec707b75d447a427e6f4f3ad14d6ba48529a92f7a0be91526e456bc2d85a1 -v3.2.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh 31c842882e85e4ed9192b31f042a8348229776622d01d6c15f49caee4faf49da74c7d50f379c532fc4998da52cedd51a36e92b432f71908cd31ce84652653918 -v3.2.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh 10b68f46a45f9bad34892bb3a55d72c2a8f58bf4836c9ed1eebf0999ad89c624f3e0ffd19101bacfdd7ec1bbe5f2e729d79bcff4058a2a10b249fad153cdcad6 -v3.2.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh ebc507d88a3105790f3f7825db9c698234100d4eceb32f10f8acf94328123a95260841367dfa1eb04922f42a7d32fbf9143031cb1e8ee8b066386bb475895b62 -v3.2.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh 5766b484335d71b7889e0060905295eb3b43acc1ea102d23d859eb83537940f0165c5a29d818d8ba8017e9a46824a2b11328e13bdc8160d31699ebfa0b4e809a -v3.2.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh 57dc45a171642bd8925f73eb44c2fbccbf9084e0c95a868d1204b2d7b5d330f9b549db2af5ba9907dae7f0852ece39ab1656274ac383cebd0abbb0d12cee1eff -v3.2.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh 3ff775eb686499bf75f497c7071fbe0c64c0b2a129318a7f0010870b9b4328848aa029d98a2d1cc58dab5b15834e5e689a2efbec981e9898eb5af68c729e49df -v3.2.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh 9d93c8fb0bea1109a4cf51438eda04c70b2479e51ff05eef529e2715405c054339620117d3164876e6f325612be641da6653fce9435a637b3768b01a89c5c9d6 -v3.2.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh 8f564cf2946d4ab4a8089331990ddfc24f7194dbe1d4377505faced56d6a4e60bab0c3dfbaf39662676f49d36bfa9f79594d9177ba2c9ec46f825d332529516b -v3.2.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh 7fa58fc83d65ed11393f2ee688aedc5d133571194dc6c3bb7b053133154f53d8909cf9f732d619d70d17d6cc37d2f392ae1b0d6d055602893b74cbcde06425e2 -v3.2.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh 5d2482992c3c0e562faba718b3946cdb8b58cdf5fc5d6ece6a5a4a0050262ec80ea2f95b6f6b927940298171747adcda511325991c6a530d8af8c4a5a454faa7 -v3.2.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh 6ac7234f74f545942cab445ea90c157203075839abfd20191bfec266d6c15fbfac681523543fb61ccf5f1dbc16cc3125c5a86ec9daf1d763ef2af634acde506e -v3.2.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh 861813fee3650a32ad89548f4a816eeaa85b713dd146791d4afe342af30cc1bded27f620fae8702886c6fd58a00c9cc8da9b3254cefcf3155d748a021272c32e -v3.2.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh e7dc9cf595aa46cb1593db997e6079546371e5b9e832a5233301a2d3d73378a579de47ed1742e42aa845a932ab5e6758208f2d2c505263ee8eecc2c164f72d6b -v3.2.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh f0b90b8ed4bdea02609ca71df547d5853e315fc30b7e2ea8aaeb20ffcb5da910045d8cdde213137350e8f26d529032f626b558d81cc436c31b22467ef1cb3dfd -v3.2.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh 6b6688d85a5a0c591c73d2ef32a0b896266ceb6af7cea0f06afd8a645b46b2e38abf1eaa2efa444a06382ef0c170de6a2ba2e14062fba0bfa0d384198e0ac1a2 -v3.2.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh 10a0d54232712ca7dd56297d7022194f6fcadf564c458d3ff04a15d8539989d8d727db9e903e0a062e0cd75667b71cf8f56444d9116f37664505ac19610ce2fb -v3.2.0 src/setup.sh ../lib/tegonal-scripts/src/setup.sh f6221b322efb57a8e595c4d033e18ee3d4ba7b373f549fc1e608401a2976ac03e09f4f033787f3d25896d7cf9447edf074f558259c7813df65792440bc472e09 -v3.2.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh 628dafc9ab0a44bd588785631f3d1f58f79f8764d3d628796fdb913d50cbf5991baa2d5df3d3b62d0d93ae41eef6d36f547a32186438f42c1430758e089f711e -v3.2.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh e717ded82bd1545d355a101486a8e746786a224c6110ba0b8451b9754822901f2636320092cf813a55a082c45ae96943cf963c6261c361f2c753f646bb36aa98 +v3.5.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh d6411f772297bc2dd7103c4380ae3b9ec56d61bd816d6b9994c22573ce54709b9f5f1299353265a5fbb854b88d4b49a85cd5d46583f117ccaf8d4ed0983b401b +v3.5.0 src/releasing/prepare-files-next-dev-cycle.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh 9255b2ed8a179ffcf07253d9158fcd5a1ed27b286eab0d66a31e820deba310d0914838778746b9a960b57c6c239e294fbeb59bb6f2d10be47e9dde5cbbfe7df0 +v3.5.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh ba3baa7a3fa2f84b0569bddb1e66cf43c4eedfeae8396334b5161f5d45e2d5839ff208d85e9c84c3daa593f52f871983598d52c055dd74741403da5dff3da01f +v3.5.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh 81122a9d7d218822c287e634bbf78cdcb1aae2e944e5b138d7c2c886c7c1e7748501c2a0058a038a06b760b8da24cb30c89230bf48bd7ff4934620ab7151bee1 +v3.5.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh 2b908dbbff0f85ff29e3a99c0ab0f53ff9bc827e2043e9755a49578d8aecb249db37853e843f55095ccaf7cf75475bed06a4ceae8b1f502b1dae7c4d3c8fb494 +v3.5.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh eae68fac4370d4b63e914fab679353cf21cae522c791b918500d7f2637cde39d7651254c76cc147cafd886f82f0d766cb9f3eba92ff41c9ac36b3b315c91bd52 +v3.5.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh 0c60cf542ca430d7dfff3e73bd7466fd7fe165ad38e49a5f7d3e5aacc8e9e924b8449507d6702661eebe40f32ceeea6a55657fb544cd8e5028957a00db881eaa +v3.5.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh b4298d1a20b5edf9786c5c5b7c474a303845b6c9a5809a860ef72d550c0ebb90f500a9e52ed185d2679503417b815cb559a98a9f54eab0817efa7dbedcf2d087 +v3.5.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh 68b47f7fb115a1c3ffa7d0b8fa94530b8f763ec8a68ffcf85d063b51d0f521d4c2a2fe90d940e6f7cc33af0bd65a0d3b8e7cec09f1cd50f85df1573065a8653b +v3.5.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh 705324860df286f34013e7e8c020dc6c19ef0d1f70af3ab007118271232e74f055d52553ac797ce72a16584866207a440f63d54701cd92d6fb3661e7fa40d5ce +v3.5.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh 60558d4d40a479df16ebd2257803cf8c5f1698666d1cd58fbfc64bac87d818cbf8817a9ad4ac05cc4898c576b465755d12e6972cbb619fc68d972b54d2a240d1 +v3.5.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh 13df70d8d3aedaac5ab18983fd53bfc0ccffffe4846134a87d5a019150ad146c46aadb22fae3fb1771ce743beaee87d5360e1db679bea6e3062188965751497e +v3.5.0 src/releasing/release-files.sh ../lib/tegonal-scripts/src/releasing/release-files.sh 2f2be9e46d4f8fe9516cd20320ae0d6ffdcf0866e803f0ce309308ad22711d7da7b46ba2540774a9b44961864a718aef25ef7a5f240e50800471d882a1a21223 +v3.5.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh e905f8ec3c0ea6b5d3a3c3a295bab690cc2b9d42ec784d56ec525f24044490c216756e05f6d9312f6379821e3f7208d44990bd8c598e9b268f40cc933951dcc9 +v3.5.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh 357c47ad757cdd8be932f2c1b6c000c58e5b502fe1d19c921568d736355e04ff01b652b407a0f04664ccfc1c2cfbd8e0b3b8a695521ce0a3a88eb289c8cbaf38 +v3.5.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh 04164299e848f75681497284e5c9b358a62f98d213c60d9f2a576342f7a116a9b1a4acf6a591d1535dfc0351b2f656a3f8c4f838ec8e01611f94c3e0111e46d2 +v3.5.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh ca5c6d738c1ee44bcbd9f9c7ad022e16aba64a42d1473622f85669c8d135063995445d183e8ca94b38d7d61a687ff28f13bbfa76b1d8277e077d84d4251b8bc0 +v3.5.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh 656e5a5f94c24615b91f91222c11069ef448c8e7a374db68f98c7cfe4fdda01680f228bbbefdf1f426a96207bd80bef404c9bfd0e426983e7825f638d89c5ec9 +v3.5.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh dcbf51d144a2e797df34862e495fcb1a8c0387990c7454158c40f5ebf38d1837a9c75fca09c5fa4ae88905b2d21ceafa3ee657bb6ab2cbc3924dea51e47393b3 +v3.5.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh ea15975b230cabcc1d75afea011270b4d5c03e2ea4dda8558bd2060b4a2b4f02d48022019c83b23d85f83fefc7de1a8a87318cda0af7e948c3912aa3d7cda8b7 +v3.5.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh 3fdea7b78d37c9424602c1d0ff90ff19b7e7d3674d8ad412777754221118851ebdab41c129fb9181110a3639a19712ebf81ed35d4b86314814a53d99bbb2b26f +v3.5.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh 64b8f1dac3ed9cf860719b40f6e9adfa973096a4754714de20bbb9f42ade1572a754eeea1495a12395529bd71f1d4b280e613a23d26edd7e5546486fe9b9cbb4 +v3.5.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh a2194e8afba6d70589d3f3aed954e303c956125746ddbdd97beaa0ef015d354ce08949c712cbb80e26a0da52399cb90d8551b9dc60ab2ac890c6d1e8b03318da +v3.5.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh 18a1b91f8e3aa6c61805ca8a9cf43ac87a817b61032297455aaff198a65b9d2fbfcb7bb3bdac9a940020129694ce2a7997d917e51413e8228dce4265df59a96a +v3.5.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh 1a25b07c8a19b93b5ca91582fb636e9273911fed455de2964a803ac09416201739bcd66eab39a94d9916f8d4a668c5c75bbd8f4b5bf6fb4fdc11b912d056b245 +v3.5.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh 9e2b1a685aa14c574e1421ba6e3155a112dc47c069a09d048ced9f22eb85b400c701239ae5c64f898c384df97d849a008925ca22b67cfba42e89a8c5fc09a16a +v3.5.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh 0eaf94a12decc88f3c905290da1b18d0037f6d9fb6908517d3d85ec48972e0ee0288e8de5e2b88fb36e4d24f5ebe8d9a5b819d0afe5c7f35ad778c41b1a3f1d5 +v3.5.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh 4678ad9224783ef52e49e6eb65c16eea902a1a22d28754fd70911b5bceb1810093e6942a57ed473c99a4ae8985b649b569444e16a549a80f102eff97a43d4691 +v3.5.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh 6fb6bd4aacc13cd02889b125642ceb0b7e3cf7032412d692f85fa412f9457873345aa49d53d98fefdd8056f84bc36d0dea4e8f1e6ee4d7adff3de67c23bccc40 +v3.5.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh f9464a208738c42754b316328586eb7a5c52cffddb57aa27ce15c4e67889667d4b7df6736a97df5ce0ca64ffe430151c6055f6e0cb53c0057f7111242895394c +v3.5.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh b48bd331c9d3300ab676e969fd8b51bffb409de15b5745f30a7f3867a1a14a50828c5f83e4bc104c5e481261508578903a579986b7e2b7b0f23fe0d5e1ead621 +v3.5.0 src/setup.sh ../lib/tegonal-scripts/src/setup.sh c72440ceb9dfffca3feacb4d652f8b6ad1266277a1549b6271a47e1c0fdc0746994cf01a1a0335a95e1c7e93454a1fdade9007d7d2226f20e95e6f52ea0d0fa7 +v3.5.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh 5dd7f1e67ebe2c1c1ea2e51b6e42ace0cf9c2963781b873d223e279c0df03c64b2781bb67c2d8ad1630915f24145fda3a4ab965250be91f20f9cd0574654563e +v3.5.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh c4777d0e64ccfdfd96114227ca703668a9938d3c27cd7f931ef10b8eb7cd943c089dc1b83c4508c77fea275e656b0d9e548157b64f68fa55446a344443ef7cce diff --git a/lib/tegonal-scripts/src/ci/install-shellcheck.sh b/lib/tegonal-scripts/src/ci/install-shellcheck.sh index 4f5b8eb..4e12f8e 100755 --- a/lib/tegonal-scripts/src/ci/install-shellcheck.sh +++ b/lib/tegonal-scripts/src/ci/install-shellcheck.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # function which searches for *.sh files within defined paths (directories or a single *.sh) and @@ -20,7 +20,7 @@ # # jobs: # steps: -# - name: install shellcheck v0.10.0 +# - name: install shellcheck # run: ./lib/tegonal-scripts/src/ci/install-shellcheck.sh # # and most likely as well # - name: run shellcheck diff --git a/lib/tegonal-scripts/src/qa/run-shellcheck.sh b/lib/tegonal-scripts/src/qa/run-shellcheck.sh index cc2739b..c446cc0 100755 --- a/lib/tegonal-scripts/src/qa/run-shellcheck.sh +++ b/lib/tegonal-scripts/src/qa/run-shellcheck.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # function which searches for *.sh files within defined paths (directories or a single *.sh) and @@ -58,7 +58,7 @@ function runShellcheck() { fi local -rn runShellcheck_paths=$1 local -r sourcePath=$2 - shift 2 || die "could not shift by 2" + shift 2 || traceAndDie "could not shift by 2" exitIfArgIsNotArrayOrIsEmpty runShellcheck_paths 1 diff --git a/lib/tegonal-scripts/src/releasing/common-constants.source.sh b/lib/tegonal-scripts/src/releasing/common-constants.source.sh index f84b0e2..aa24eef 100644 --- a/lib/tegonal-scripts/src/releasing/common-constants.source.sh +++ b/lib/tegonal-scripts/src/releasing/common-constants.source.sh @@ -6,7 +6,8 @@ # / __/ -_) _ `/ _ \/ _ \/ _ `/ / Copyright 2022 Tegonal Genossenschaft # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under European Union Public License 1.2 # /___/ Please report bugs and contribute back your improvements -# Version: v3.2.0 +# +# Version: v3.5.0 ####### Description ############# # # constants intended to be sourced into a function diff --git a/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh b/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh index cc9b8ed..50c144d 100644 --- a/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh +++ b/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # intended to be sourced into a function which expects params version and nextVersion diff --git a/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh b/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh index 830f30b..3cfa493 100755 --- a/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh +++ b/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Checks that releasing a certain version (creating a corresponding git tag) makes sense: We check: @@ -34,7 +34,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -46,7 +46,7 @@ sourceOnce "$dir_of_tegonal_scripts/utility/parse-args.sh" function preReleaseCheckGit() { local versionRegex versionParamPatternLong - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version branch # shellcheck disable=SC2034 # is passed by name to parseArguments diff --git a/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh b/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh index 149685d..b383d61 100755 --- a/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh +++ b/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Prepare the next dev cycle for files based on conventions: @@ -60,7 +60,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -73,7 +73,7 @@ sourceOnce "$dir_of_tegonal_scripts/releasing/prepare-next-dev-cycle-template.sh function prepareFilesNextDevCycle() { local versionParamPatternLong projectsRootDirParamPatternLong local additionalPatternParamPatternLong beforePrFnParamPatternLong afterVersionUpdateHookParamPatternLong - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version afterVersionUpdateHook projectsRootDir additionalPattern beforePrFn afterVersionUpdateHook # shellcheck disable=SC2034 # is passed by name to parseArguments diff --git a/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh b/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh index f17584a..1dabd37 100755 --- a/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh +++ b/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Prepares the next dev cycle based on conventions: @@ -61,7 +61,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -76,7 +76,7 @@ function prepareNextDevCycleTemplate() { local versionRegex versionParamPatternLong projectsRootDirParamPatternLong local additionalPatternParamPatternLong beforePrFnParamPatternLong afterVersionUpdateHookParamPatternLong local forReleaseParamPatternLong - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version projectsRootDir additionalPattern beforePrFn afterVersionUpdateHook # shellcheck disable=SC2034 # is passed by name to parseArguments diff --git a/lib/tegonal-scripts/src/releasing/release-files.sh b/lib/tegonal-scripts/src/releasing/release-files.sh index 4ae80c3..98ceea4 100755 --- a/lib/tegonal-scripts/src/releasing/release-files.sh +++ b/lib/tegonal-scripts/src/releasing/release-files.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Releasing files based on conventions: @@ -75,7 +75,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -91,7 +91,7 @@ function releaseFiles() { local versionParamPatternLong projectsRootDirParamPatternLong local additionalPatternParamPatternLong afterVersionUpdateHookParamPatternLong releaseHookParamPatternLong local findForSigningParamPatternLong beforePrFnParamPatternLong prepareNextDevCycleFnParamPatternLong - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version key findForSigning branch projectsRootDir additionalPattern # shellcheck disable=SC2034 # seems unused but is set in deduce-next-version diff --git a/lib/tegonal-scripts/src/releasing/release-template.sh b/lib/tegonal-scripts/src/releasing/release-template.sh index 677b108..46637c8 100755 --- a/lib/tegonal-scripts/src/releasing/release-template.sh +++ b/lib/tegonal-scripts/src/releasing/release-template.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Defines a release process template where some conventions are defined: @@ -80,7 +80,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -96,7 +96,7 @@ function releaseTemplate() { local additionalPatternParamPatternLong prepareOnlyParamPatternLong local beforePrFnParamPatternLong prepareNextDevCycleFnParamPatternLong afterVersionUpdateHookParamPatternLong local forReleaseParamPatternLong releaseHookParamPatternLong - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version releaseHook branch projectsRootDir additionalPattern nextVersion prepareOnly local beforePrFn prepareNextDevCycleFn afterVersionUpdateHook diff --git a/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh b/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh index e6054a6..cf41488 100755 --- a/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh +++ b/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Shows or hides the sneak peek banner @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/toggle-sections.sh b/lib/tegonal-scripts/src/releasing/toggle-sections.sh index 4255485..8b78c29 100755 --- a/lib/tegonal-scripts/src/releasing/toggle-sections.sh +++ b/lib/tegonal-scripts/src/releasing/toggle-sections.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Searches for ... as well as for @@ -36,7 +36,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/update-version-README.sh b/lib/tegonal-scripts/src/releasing/update-version-README.sh index 704d291..eb42f92 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-README.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-README.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Replaces the version used in download badge(s) and in the sneak peek banner @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -41,7 +41,7 @@ fi sourceOnce "$dir_of_tegonal_scripts/utility/parse-args.sh" function updateVersionReadme() { - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version file additionalPattern # shellcheck disable=SC2034 # is passed by name to parseArguments diff --git a/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh b/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh index d00fc5a..267a8b7 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Carry out some common update version steps either during releasing or in preparing the next dev cycle (indicated via @@ -56,7 +56,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -71,7 +71,7 @@ sourceOnce "$dir_of_tegonal_scripts/releasing/update-version-scripts.sh" function updateVersionCommonSteps() { local forReleaseParamPatternLong versionParamPatternLong additionalPatternParamPatternLong - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local forRelease version projectsRootDir additionalPattern # shellcheck disable=SC2034 # is passed by name to parseArguments diff --git a/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh b/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh index ca59afd..1371674 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Updates the placeholder of all labels named `Affected Version` in issue templates. @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -41,7 +41,7 @@ fi sourceOnce "$dir_of_tegonal_scripts/utility/parse-args.sh" function updateVersionIssueTemplates() { - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version directory additionalPattern # shellcheck disable=SC2034 # is passed by name to parseArguments diff --git a/lib/tegonal-scripts/src/releasing/update-version-scripts.sh b/lib/tegonal-scripts/src/releasing/update-version-scripts.sh index b2f8ec5..9240474 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-scripts.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-scripts.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Updates the version which is placed before the `Description` section in bash files (line 8 in this file). @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -41,7 +41,7 @@ fi sourceOnce "$dir_of_tegonal_scripts/utility/parse-args.sh" function updateVersionScripts() { - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local version directory additionalPattern # shellcheck disable=SC2034 # is passed by name to parseArguments diff --git a/lib/tegonal-scripts/src/setup.sh b/lib/tegonal-scripts/src/setup.sh index 996d564..bcaa60f 100644 --- a/lib/tegonal-scripts/src/setup.sh +++ b/lib/tegonal-scripts/src/setup.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # script which should be sourced and sets up variables and functions for the scripts diff --git a/lib/tegonal-scripts/src/utility/array-utils.sh b/lib/tegonal-scripts/src/utility/array-utils.sh index b4f96ce..6beacb1 100644 --- a/lib/tegonal-scripts/src/utility/array-utils.sh +++ b/lib/tegonal-scripts/src/utility/array-utils.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # utility functions for dealing with arrays @@ -63,7 +63,7 @@ sourceOnce "$dir_of_tegonal_scripts/utility/checks.sh" joinByChar() { local IFS="$1" - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" echo "$*" } @@ -78,7 +78,7 @@ joinByString() { if (($# > 1)); then local separator="$1" local firstArg="$2" - shift 2 || die "could not shift by 2" + shift 2 || traceAndDie "could not shift by 2" printf "%s" "$firstArg" "${@/#/$separator}" fi } @@ -96,7 +96,7 @@ function arrFilter() { local -rn arrFilter_arrIn=$1 local -rn arrFilter_arrOut=$2 local -r predicate=$3 - shift 3 || die "could not shift by 3" + shift 3 || traceAndDie "could not shift by 3" exitIfArgIsNotFunction "$predicate" 3 @@ -127,7 +127,7 @@ function arrTakeEveryX() { local -rn arrFilterMod_arrOut=$2 local -ri modulo=$3 local -ri offset=$4 - shift 4 || die "could not shift by 4" + shift 4 || traceAndDie "could not shift by 4" # shellcheck disable=SC2317 # is passed by name to arrFilter function arrFilterMod_fn() { @@ -146,7 +146,7 @@ function arrStringEntryMaxLength() { exit 9 fi local -rn arrStringEntryMaxLength_arr=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" local -i i maxLength=0 arrLength="${#arrStringEntryMaxLength_arr[@]}" for ((i = 0; i < arrLength; ++i)); do diff --git a/lib/tegonal-scripts/src/utility/ask.sh b/lib/tegonal-scripts/src/utility/ask.sh index c6fd102..0dfce9d 100644 --- a/lib/tegonal-scripts/src/utility/ask.sh +++ b/lib/tegonal-scripts/src/utility/ask.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Utility functions to ask the user something via input. @@ -55,7 +55,7 @@ function askYesOrNo() { exit 9 fi local -r question=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" local -r askYesOrNo_timeout=20 local answer='n' @@ -68,9 +68,9 @@ function askYesOrNo() { # shellcheck disable=SC2059 # the question itself can have %s thus we use it in the format string askWithTimeout "\033[0;36m$question\033[0m y/[n]:" "$askYesOrNo_timeout" askYesOrNo_noAnswerCallback answer "" "$@" - if [[ $answer == y ]] || [[ $answer == Y ]]; then + if [[ $answer == y ]] || [[ $answer == Y ]] || [[ $answer == yes ]]; then return 0 - elif [[ $answer == n ]] || [[ $answer == N ]]; then + elif [[ $answer == n ]] || [[ $answer == N ]] || [[ $answer == no ]]; then return 1 else logWarning "got \033[0;36m%s\033[0m as answer (instead of y for yes or n for no), interpreting it as a n, i.e. as a no" "$answer" @@ -99,7 +99,7 @@ function askWithTimeout() { local -r askWithTimeout_noAnswerFn=$3 local -r askWithTimeout_outVarName=$4 local -r askWithTimeout_readArgs=$5 - shift 5 || die "could not shift by 5" + shift 5 || traceAndDie "could not shift by 5" exitIfArgIsNotFunction "$askWithTimeout_noAnswerFn" 3 # shellcheck disable=SC2059 # the question itself can have %s thus we use it in the format string diff --git a/lib/tegonal-scripts/src/utility/checks.sh b/lib/tegonal-scripts/src/utility/checks.sh index 5cf68d3..6f6cdc0 100644 --- a/lib/tegonal-scripts/src/utility/checks.sh +++ b/lib/tegonal-scripts/src/utility/checks.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Functions to check declarations @@ -51,7 +51,7 @@ # # # shellcheck disable=SC2317 # is passed by name to exitIfArgIsNotArrayWithTuples # function describePair() { -# echo >&2 "array contains 2-tuples with names where the first value is the first-, and the second the lastname" +# echo >&2 "array contains 2-tuples with names where the first value is the first-, and the second the last name" # } # # check array with 2-tuples # exitIfArgIsNotArrayWithTuples arr 2 "names" 1 describePair @@ -70,6 +70,10 @@ # # meant to be used in a file which is sourced where a contract exists between the file which `source`s and the sourced file # exitIfVarsNotAlreadySetBySource myVar1 var2 var3 # +# declare myVar4 +# exitIfVariablesNotDeclared myVar4 myVar5 # would exit because myVar5 is not set +# echo "myVar4 $myVar4" +# ################################### set -euo pipefail shopt -s inherit_errexit @@ -92,7 +96,7 @@ function checkArgIsArray() { fi local -rn checkArgIsArray_arr=$1 local -r argNumberOrName=$2 - shift 2 || die "could not shift by 2" + shift 2 || traceAndDie "could not shift by 2" reg='^declare -a.*' local arrayDefinition @@ -117,9 +121,9 @@ function exitIfArgIsNotArrayOrIsEmpty() { exitIfArgIsNotArray "$@" local -rn exitIfArgIsNotArrayOrIsEmpty_arr=$1 local -r argNumberOrName=$2 - shift 2 || die "could not shift by 2" + shift 2 || traceAndDie "could not shift by 2" if [[ ${#exitIfArgIsNotArrayOrIsEmpty_arr[@]} -lt 1 ]]; then - die "the passed argument \033[0;36m%s\033[0m is an empty array" "${!checkArgIsArray_arr}" + traceAndDie "the passed argument \033[0;36m%s\033[0m is an empty array" "${!checkArgIsArray_arr}" fi } @@ -140,7 +144,7 @@ function checkArgIsArrayWithTuples() { local -r tupleRepresents=$3 local -r argNumberOrName=$4 local -r describeTupleFn=$5 - shift 5 || die "could not shift by 5" + shift 5 || traceAndDie "could not shift by 5" local -r arrLength=${#checkArgIsArrayWithTuples_paramArr[@]} @@ -152,7 +156,7 @@ function checkArgIsArrayWithTuples() { fi local arrayDefinition - arrayDefinition=$(recursiveDeclareP checkArgIsArrayWithTuples_paramArr) || die "could not get array definition of %s" "${!checkArgIsArrayWithTuples_paramArr}" + arrayDefinition=$(recursiveDeclareP checkArgIsArrayWithTuples_paramArr) || traceAndDie "could not get array definition of %s" "${!checkArgIsArrayWithTuples_paramArr}" reg='declare -a.*' if ! [[ "$arrayDefinition" =~ $reg ]]; then logError "the passed array \033[0;36m%s\033[0m is broken" "${!checkArgIsArrayWithTuples_paramArr}" @@ -254,7 +258,7 @@ function exitIfArgIsNotVersion() { function checkArgIsVersion() { local versionRegex - source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || die "could not source common-constants.source.sh" + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" local value argNumberOrName # shellcheck disable=SC2034 # is passed by name to parseFnArgs @@ -291,7 +295,18 @@ function exitIfCommandDoesNotExist() { function exitIfVarsNotAlreadySetBySource() { for varName in "$@"; do if ! [[ -v "$varName" ]] || [[ -z ${!varName} ]]; then - die "looks like \$%s was not defined by %s where this file (%s) was sourced" "$varName" "${BASH_SOURCE[2]:-${BASH_SOURCE[1]}}" "${BASH_SOURCE[0]}" + traceAndDie "looks like \$%s was not defined by %s where this file (%s) was sourced" "$varName" "${BASH_SOURCE[2]:-${BASH_SOURCE[1]}}" "${BASH_SOURCE[0]}" + fi + done +} + +function exitIfVariablesNotDeclared() { + shift 1 || traceAndDie "could not shift by 1" + for variableName in "$@"; do + if ! declare -p "$variableName" 2>/dev/null | grep -q 'declare --'; then + logError "you need to \`declare\` (\`local\`) the variable \033[0;36m%s\033[0m otherwise we write to the global scope (you can also \`declare\` it in the global scope)" "$variableName" + printStackTrace + exit 1 fi done } diff --git a/lib/tegonal-scripts/src/utility/execute-if-defined.sh b/lib/tegonal-scripts/src/utility/execute-if-defined.sh index 050bbdb..6c659b5 100644 --- a/lib/tegonal-scripts/src/utility/execute-if-defined.sh +++ b/lib/tegonal-scripts/src/utility/execute-if-defined.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. @@ -66,7 +66,7 @@ function executeIfFunctionNameDefined() { fi local functionName=$1 local argNumberOrName=$2 - shift 2 || die "could not shift by 2" + shift 2 || traceAndDie "could not shift by 2" if [[ -n $functionName ]]; then exitIfArgIsNotFunction "$functionName" "$argNumberOrName" logInfo "arg %s defined (%s), going to call it" "$argNumberOrName" "$functionName" diff --git a/lib/tegonal-scripts/src/utility/git-utils.sh b/lib/tegonal-scripts/src/utility/git-utils.sh index fc27ca9..17f68a3 100644 --- a/lib/tegonal-scripts/src/utility/git-utils.sh +++ b/lib/tegonal-scripts/src/utility/git-utils.sh @@ -3,9 +3,9 @@ # __ __ # / /____ ___ ____ ___ ___ _/ / This script is provided to you by https://github.com/tegonal/scripts # / __/ -_) _ `/ _ \/ _ \/ _ `/ / It is licensed under Apache License 2.0 -# \__/\__/\_, /\___/_//_/\_,_/_/ Please remotert bugs and contribute back your improvements +# \__/\__/\_, /\___/_//_/\_,_/_/ Please report bugs and contribute back your improvements # /___/ -# Version: v3.2.0 +# Version: v3.5.0 # ####### Description ############# # @@ -60,6 +60,8 @@ # echo "latest tag on origin: $latestTag" # latestTag=$(latestRemoteTag upstream) # echo "latest tag on upstream: $latestTag" +# latestTag=$(latestRemoteTag origin "^v1\.[0-9]+\.[0-9]+$") +# echo "latest tag in the major 1.x.x series on origin without release candidates: $latestTag" # ################################### set -euo pipefail @@ -129,7 +131,7 @@ function hasRemoteTag() { fi local -r tag=$1 local -r remote=${2:-"origin"} - shift 1 || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" local output output=$(git ls-remote -t "$remote") || die "the following command failed (see above): git ls-remote -t \"$remote\"" grep "$tag" >/dev/null <<<"$output" @@ -139,7 +141,7 @@ function remoteTagsSorted() { local remote="origin" if (($# > 0)); then remote=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" fi git ls-remote --refs --tags "$remote" | cut --delimiter='/' --fields=3 | @@ -147,13 +149,18 @@ function remoteTagsSorted() { } function latestRemoteTag() { - if (($# > 1)); then - traceAndDie "you can optionally pass the name of the remote (defaults to origin) to latestRemoteTag but not more, given: %s" "$#" + if (($# > 2)); then + logError "Maximum 2 arguments can be passed to latestRemoteTag, given \033[0;36m%s\033[0m\n" "$#" + echo >&2 '1: remote (optional) the name of the remote, defaults to origin' + echo >&2 '2: tagFilter (optional) a regex pattern (as supported by grep -E) which allows to filter available tags before determining the latest, defaults to .* (i.e. include all)' + printStackTrace + exit 9 fi local -r remote=${1:-"origin"} + local -r tagFilter=${2:-".*"} local tag #shellcheck disable=SC2310 # we are aware of that || will disable set -e for remoteTagsSorted - tag=$(remoteTagsSorted "$remote" | tail -n 1) || die "could not get remote tags sorted, see above" + tag=$(remoteTagsSorted "$remote" | grep -E "$tagFilter" | tail -n 1) || die "could not get remote tags sorted for remote %s, see above" "$remote" if [[ -z $tag ]]; then die "looks like remote \033[0;36m%s\033[0m does not have a tag yet." "$remote" fi diff --git a/lib/tegonal-scripts/src/utility/gpg-utils.sh b/lib/tegonal-scripts/src/utility/gpg-utils.sh index aa434e7..56b355d 100644 --- a/lib/tegonal-scripts/src/utility/gpg-utils.sh +++ b/lib/tegonal-scripts/src/utility/gpg-utils.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # utility functions for dealing with gpg diff --git a/lib/tegonal-scripts/src/utility/http.sh b/lib/tegonal-scripts/src/utility/http.sh index 268bb8e..21d2211 100644 --- a/lib/tegonal-scripts/src/utility/http.sh +++ b/lib/tegonal-scripts/src/utility/http.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # utility function dealing with fetching files via http @@ -29,7 +29,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.2.0' +export TEGONAL_SCRIPTS_VERSION='v3.5.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/utility/io.sh b/lib/tegonal-scripts/src/utility/io.sh index bfc2452..612c887 100644 --- a/lib/tegonal-scripts/src/utility/io.sh +++ b/lib/tegonal-scripts/src/utility/io.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # utility function dealing with Input/Ouput @@ -54,14 +54,14 @@ function withCustomOutputInput() { local outputNr=$1 local inputNr=$2 local fun=$3 - shift 3 || die "could not shift by 3" + shift 3 || traceAndDie "could not shift by 3" exitIfArgIsNotFunction "$fun" 3 local tmpFile tmpFile=$(mktemp /tmp/tegonal-scripts-io.XXXXXXXXX) - eval "exec ${outputNr}>\"$tmpFile\"" || die "could not create output file descriptor %s" "$outputNr" - eval "exec ${inputNr}<\"$tmpFile\"" || die "could not create input file descriptor %s" "$inputNr" + eval "exec ${outputNr}>\"$tmpFile\"" || traceAndDie "could not create output file descriptor %s" "$outputNr" + eval "exec ${inputNr}<\"$tmpFile\"" || traceAndDie "could not create input file descriptor %s" "$inputNr" # don't fail if we cannot delete the tmp file, if this should happened, then the system should clean-up the file when the process ends rm "$tmpFile" || true @@ -73,7 +73,7 @@ function withCustomOutputInput() { function deleteDirChmod777() { local -r dir=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" # e.g files in .git will be write-protected and we don't want sudo for this command # yet, if it fails, then we ignore the problem and still try to delete the folder chmod -R 777 "$dir" || true diff --git a/lib/tegonal-scripts/src/utility/log.sh b/lib/tegonal-scripts/src/utility/log.sh index 15eacc1..e70124d 100644 --- a/lib/tegonal-scripts/src/utility/log.sh +++ b/lib/tegonal-scripts/src/utility/log.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. @@ -88,45 +88,45 @@ unset CDPATH function logInfo() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" logInfoWithoutNewline "$msg\n" "$@" } function logInfoWithoutNewline() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" printf "\033[0;34mINFO\033[0m: $msg" "$@" } function logWarning() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" logWarningWithoutNewline "$msg\n" "$@" } function logWarningWithoutNewline() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" printf "\033[0;93mWARNING\033[0m: $msg" "$@" } function logError() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" logErrorWithoutNewline "$msg\n" "$@" } function logErrorWithoutNewline() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" printf >&2 "\033[0;31mERROR\033[0m: $msg" "$@" } function logSuccess() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" logSuccessWithoutNewline "$msg\n" "$@" } function logSuccessWithoutNewline() { local msg=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" printf "\033[0;32mSUCCESS\033[0m: $msg" "$@" } diff --git a/lib/tegonal-scripts/src/utility/parse-args.sh b/lib/tegonal-scripts/src/utility/parse-args.sh index 83f6208..0cbf6f4 100644 --- a/lib/tegonal-scripts/src/utility/parse-args.sh +++ b/lib/tegonal-scripts/src/utility/parse-args.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Intended to parse command line arguments. Provides a simple way to parse named arguments including a documentation @@ -74,6 +74,7 @@ if ! [[ -v dir_of_tegonal_scripts ]]; then source "$dir_of_tegonal_scripts/setup.sh" "$dir_of_tegonal_scripts" fi sourceOnce "$dir_of_tegonal_scripts/utility/array-utils.sh" +sourceOnce "$dir_of_tegonal_scripts/utility/ask.sh" sourceOnce "$dir_of_tegonal_scripts/utility/checks.sh" sourceOnce "$dir_of_tegonal_scripts/utility/parse-utils.sh" @@ -127,14 +128,19 @@ function parseArgumentsInternal { local -rn parseArguments_paramArr=$2 local -r parseArguments_examples=$3 local -r parseArguments_version=$4 - shift 4 || die "could not shift by 4" + shift 4 || traceAndDie "could not shift by 4" if ! [[ "$parseArguments_unknownBehaviour" =~ ^(ignore|error)$ ]]; then - die "unknownBehaviour needs to be one of 'error' or 'ignore' got \033[0;36m%s\033[0m" "$parseArguments_unknownBehaviour" + traceAndDie "unknownBehaviour needs to be one of 'error' or 'ignore' got \033[0;36m%s\033[0m" "$parseArguments_unknownBehaviour" fi parse_args_exitIfParameterDefinitionIsNotTriple parseArguments_paramArr + # shellcheck disable=SC2034 # passed by name to exitIfVariablesNotDeclared + local -a parseArguments_variableNames + arrTakeEveryX parseArguments_paramArr parseArguments_variableNames 3 0 + exitIfVariablesNotDeclared "${parseArguments_variableNames[@]}" + local -ri parseArguments_arrLength="${#parseArguments_paramArr[@]}" local -i parseArguments_numOfArgumentsParsed=0 @@ -173,24 +179,25 @@ function parseArgumentsInternal { exit 9 fi # that's where the black magic happens, we are assigning to global (not local to this function) variables here - printf -v "$parseArguments_paramName" "%s" "$2" || die "could not assign value to $parseArguments_paramName" + printf -v "$parseArguments_paramName" "%s" "$2" || traceAndDie "could not assign value to $parseArguments_paramName" parseArguments_expectedName=1 ((++parseArguments_numOfArgumentsParsed)) - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" fi done if [[ $parseArguments_unknownBehaviour = 'error' ]] && ((parseArguments_expectedName == 0)); then - parse_args_printHelp >&2 parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" if [[ $parseArguments_argName =~ ^- ]] && (($# > 1)); then logError "unknown argument \033[1;36m%s\033[0m (and value %s)" "$parseArguments_argName" "$2" else logError "unknown argument \033[1;36m%s\033[0m" "$parseArguments_argName" fi - echo >&2 "consult the output of --help shown further above for valid names" + if askYesOrNo "Shall I print the help for you?"; then + parse_args_printHelp >&2 parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" + fi exit 9 fi - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" done } @@ -255,7 +262,7 @@ function exitIfNotAllArgumentsSet { local -rn exitIfNotAllArgumentsSet_paramArr=$1 local -r exitIfNotAllArgumentsSet_examples=$2 local -r exitIfNotAllArgumentsSet_version=$3 - shift 3 || die "could not shift by 3" + shift 3 || traceAndDie "could not shift by 3" # it is handy to see the stacktrace if it is not a direct call from command line # where we assume that the script as such has a "main" function, this one calls one function from this file and diff --git a/lib/tegonal-scripts/src/utility/parse-commands.sh b/lib/tegonal-scripts/src/utility/parse-commands.sh index b9dde5a..1f2fffb 100644 --- a/lib/tegonal-scripts/src/utility/parse-commands.sh +++ b/lib/tegonal-scripts/src/utility/parse-commands.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Intended to parse command line arguments of a script which uses commands and delegates accordingly. @@ -117,7 +117,7 @@ function parseCommands { local -r version=$2 local -r sourceFn=$3 local -r fnPrefix=$4 - shift 4 || die "could not shift by 4" + shift 4 || traceAndDie "could not shift by 4" if (($# < 1 )); then logError "no command passed to %s, following the output of --help\n" "$(basename "${BASH_SOURCE[1]}")" @@ -129,7 +129,7 @@ function parseCommands { exitIfArgIsNotFunction "$sourceFn" 3 local -r command=$1 - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" local -a commandNames=() arrTakeEveryX parseCommands_paramArr commandNames 2 0 local tmpRegex regex @@ -138,7 +138,7 @@ function parseCommands { local -r tmpRegex regex if [[ "$command" =~ $regex ]]; then - "$sourceFn" "$command" || die "could not source necessary files to bring in function for command %s" "$command" + "$sourceFn" "$command" || traceAndDie "could not source necessary files to bring in function for command %s" "$command" "$fnPrefix${command/-/_}" "$@" elif [[ "$command" == "--help" ]]; then parse_commands_printHelp parseCommands_paramArr "$version" diff --git a/lib/tegonal-scripts/src/utility/parse-fn-args.sh b/lib/tegonal-scripts/src/utility/parse-fn-args.sh index 925e174..8e8a920 100644 --- a/lib/tegonal-scripts/src/utility/parse-fn-args.sh +++ b/lib/tegonal-scripts/src/utility/parse-fn-args.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Intended to parse positional function parameters including assignment and check if there are enough arguments @@ -74,7 +74,7 @@ function parseFnArgs() { # using unconventional naming in order to avoid name clashes with the variables we will initialise further below local -rn parseFnArgs_paramArr1=$1 - shift 1 || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" exitIfArgIsNotArray parseFnArgs_paramArr1 1 @@ -127,17 +127,19 @@ function parseFnArgs() { exit 9 fi + exitIfVariablesNotDeclared "${parseFnArgs_paramArr1[@]}" + for ((parseFnArgs_i = 0; parseFnArgs_i < parseFnArgs_minExpected; ++parseFnArgs_i)); do local parseFnArgs_name=${parseFnArgs_paramArr1[parseFnArgs_i]} # assign arguments to specified variables - printf -v "$parseFnArgs_name" "%s" "$1" || die "could not assign value to $parseFnArgs_name" + printf -v "$parseFnArgs_name" "%s" "$1" || traceAndDie "could not assign value to $parseFnArgs_name" local -r "$parseFnArgs_name" - shift || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" done # assign rest to varargs if used if [[ $parseFnArgs_withVarArgs == true ]]; then # shellcheck disable=SC2034 # varargs is defined in outer scope and will be used there, thus ok - varargs=("$@") || die "could not assign the rest of arguments to varargs" + varargs=("$@") || traceAndDie "could not assign the rest of arguments to varargs" fi } diff --git a/lib/tegonal-scripts/src/utility/parse-utils.sh b/lib/tegonal-scripts/src/utility/parse-utils.sh index bb345d3..a04b699 100644 --- a/lib/tegonal-scripts/src/utility/parse-utils.sh +++ b/lib/tegonal-scripts/src/utility/parse-utils.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Intended to parse command line arguments. Provides a simple way to parse named arguments including a documentation @@ -31,7 +31,7 @@ # function myParseFunction() { # while (($# > 0)); do # if [[ $1 == "--version" ]]; then -# shift || die "could not shift by 1" +# shift 1 || traceAndDie "could not shift by 1" # printVersion "$MY_LIBRARY_VERSION" # fi # #... diff --git a/lib/tegonal-scripts/src/utility/recursive-declare-p.sh b/lib/tegonal-scripts/src/utility/recursive-declare-p.sh index fb34116..714bf64 100644 --- a/lib/tegonal-scripts/src/utility/recursive-declare-p.sh +++ b/lib/tegonal-scripts/src/utility/recursive-declare-p.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Utility function which returns the `declare` statement of a variable with given name where it recursively calls diff --git a/lib/tegonal-scripts/src/utility/replace-help-snippet.sh b/lib/tegonal-scripts/src/utility/replace-help-snippet.sh index 8662658..ab06c21 100644 --- a/lib/tegonal-scripts/src/utility/replace-help-snippet.sh +++ b/lib/tegonal-scripts/src/utility/replace-help-snippet.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Helper script do capture the `--help` output of a script and replace a snippet in HTML based scripts (e.g. in a Markdown script). diff --git a/lib/tegonal-scripts/src/utility/replace-snippet.sh b/lib/tegonal-scripts/src/utility/replace-snippet.sh index 8264408..dbe3603 100644 --- a/lib/tegonal-scripts/src/utility/replace-snippet.sh +++ b/lib/tegonal-scripts/src/utility/replace-snippet.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Helper script do replace a snippet in HTML based files (e.g. in a Markdown file). diff --git a/lib/tegonal-scripts/src/utility/source-once.sh b/lib/tegonal-scripts/src/utility/source-once.sh index 9e7a229..fd10b70 100644 --- a/lib/tegonal-scripts/src/utility/source-once.sh +++ b/lib/tegonal-scripts/src/utility/source-once.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. @@ -71,7 +71,7 @@ function sourceOnce() { sourceOnce_exitIfNotAtLeastOneArg "$@" local -r sourceOnce_file="$1" - shift 1 || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" local sourceOnce_guard sourceOnce_guard=$(determineSourceOnceGuard "$sourceOnce_file") @@ -108,7 +108,7 @@ function sourceAlways() { sourceOnce_exitIfNotAtLeastOneArg "$@" local -r sourceAlways_file="$1" - shift 1 || die "could not shift by 1" + shift 1 || traceAndDie "could not shift by 1" local sourceAlways_guard sourceAlways_guard=$(determineSourceOnceGuard "$sourceAlways_file") diff --git a/lib/tegonal-scripts/src/utility/update-bash-docu.sh b/lib/tegonal-scripts/src/utility/update-bash-docu.sh index 73f9863..6c6474b 100644 --- a/lib/tegonal-scripts/src/utility/update-bash-docu.sh +++ b/lib/tegonal-scripts/src/utility/update-bash-docu.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.2.0 +# Version: v3.5.0 # ####### Description ############# #