diff --git a/.gt/remotes/tegonal-scripts/pulled.tsv b/.gt/remotes/tegonal-scripts/pulled.tsv index 8ce0bb0..f3f33a2 100644 --- a/.gt/remotes/tegonal-scripts/pulled.tsv +++ b/.gt/remotes/tegonal-scripts/pulled.tsv @@ -1,36 +1,36 @@ #@ Version: 1.1.0 tag file relativeTarget tagFilter sha512 -v4.2.0 src/setup.sh ../lib/tegonal-scripts/src/setup.sh .* ae5cb8feccad286063b22f33dc0bc5506a9d9982df756bb8fde8c6b3c8a853a44691777b66d6466b6b191bec3b86f98170dfc9ad566cdcec07c52d71c40f8efd -v4.2.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh .* c78a21387a128ef9452fbf74dcd30add6a0d0052cf38eb13c75b7ab34752165f3603f339943000097eef94045cd2c0718fd09b7ddf312cb0a89faa1607431006 -v4.2.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh .* 29b6bbf42196607474eb4b1975d1ef34a8767d3d51a94e68bfd0cdfcd3f1ea4b1bd008d3031fcb048e47934b7b53dec6b34b90557d264cf81f4b48ff935a49c3 -v4.2.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh .* 973fb0e9d9d85999518c63a69d802d29ead4b40fd5a0a8b2f97745e850426f7c22587f59ea2fb83a16e028fa4d6a60649f0cea19893be8f950a708c313626910 -v4.2.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh .* 49bf4c410457154a1d73e1f01e8a7ba6b0771c4b1e96f547f29acdfd46d4be667674fc6ef14204366eb43d414521a231eb0dfa1acb37e17fe8465b8b79bd84ba -v4.2.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh .* f867fe3fe2e5956951f3976d023550fdb78cbfc4aba283af74c457ecd60020f66c521a74283d6be5d1cf8e506966b9614d5a8b6d7b8275413cf8e43d8419f856 -v4.2.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh .* f1992f3bfc295bcc93b3b00213a018c938ba9d255d188d4f9a93409540d01b58f6240712692850240c6efed8c5693a39d950608d1e4b30de3ffffd9f1652be82 -v4.2.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh .* 9021c475366ffba18c30834d71f533d2f3ce2dc32d73499ad2c92a81daf3b676f33069e361122503d5b744a7bbd9a2f519ab54913e50df78cbe7e1dece0f87b4 -v4.2.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh .* aa867246f6118358a1e880e3bf6ba95c6289f25d8b36e8cc2c5116296c37f0a48a79f5ee8450e8e7df678b1d2a848acb0300042af7c4c40953bb8df61b858792 -v4.2.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh .* 8bd1221cc593df9f95f80197737f6453a5d45e8e2ea46ef5c1fad5a015c2d8b24328b728c69ec4e0f55f26fe45a53950e7206323ba1cd021772c186a3ce3bc1a -v4.2.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh .* 6a132a4666c23b5ee19e2f837e5d508ccf305ea26d128e583b1ef37ad04fb43174b3bfc6c89b8cd9b7ddddebbbb16940c4abe43b806fbfa1d4e765db33379209 -v4.2.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh .* bea8011d884f8faa7c9b9490f06d8a15237146cf5f6412ce0e9834aebea8cb6be5c152637a36eff5bc8e84b814fcd7abae785c590b4ad268638e699746fe9c4f -v4.2.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh .* 89fe82e7d795128ff77e900c77141b6557fc80ecca0e36cfccad9eaf26cde93feeee815b0c5adfa1767e0774f60e8d22517e25ebb44d31746eab0c7e279698c5 -v4.2.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh .* ea7dff5f11c7baf3cba668b64477e199b6667ba652e9b0940262985a05c9125cd2e3c952fab412302e0c1d44d522912b1280a2f33a40a8f5c4b3114397c35ccc -v4.2.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh .* 62f9946905407a9a93f4b6e7dfbe9ac8a372eed4bffe07d2e14e8a3882c6945eb151b06a70ddedc78e030674cd125fbb43338d78698b336e2a256559be8829a1 -v4.2.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh .* 6fcc981876e4839ba6edfabe84f2e440408ca646f8fe0e5d385b1dd119360dc58c7dd5945933eaf3fa8e43f18420fa53adad643d4d3feeba8b06b9d59ca45d53 -v4.2.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh .* 5476417a2cda2d99cb8f9bc9f5a84eed1605b9cc3463dd3e0eccddb73d6e86016d467a31b891e9adc14472f9b230287fa98b1365c443dd4b387b7ca23d67ef8c -v4.2.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh .* c22bea952143adc9679e07a3d9e20726b8cc4665b047ed7a800052ca60836676da4f158466e37bf3776207636a4dc291309cfd2c97327c6c39b10ae1687599d9 -v4.2.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh .* 7c9d7051848012bdcad2e8c8bfc37271ae8720fe81774abd7fbb10db6bc70ab5d967033deb784f320ebc006921508e7c248c349ec7c9183b5786d997bf85ee49 -v4.2.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh .* 923f86b0ec639fb9a68249340b208819b56489a1a4affa55c8f5a0382a69fc3372378f0a5cdf8c49c1bb4860ba2c143cb6d23cf525c6a06c032fe05049777583 -v4.2.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh .* 37bca22addf0914ef975f87055bb52101151ae75dedd29444d3d462488265f15f329958ce44fac046547d217f36259158b7e761391a1418dc5f7875ab6e10694 -v4.2.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh .* cef125be1548b1c3d7c46bd5b812e01102d4bcaec957ee4f8bb16d77d3e62d08575d4ae3ad0135100ab6289492424281f0d30911fec11a98f6f1e0fb18a41b29 -v4.2.0 src/releasing/prepare-files-next-dev-cycle.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh .* 2f4072c6a11b1f3d1b8cc3da2b30582d2638135178d028353d07074855370c75012a9a1b5c74c851e0770d27f9c4df03e35bc8e3a06ab3a2f032b43c185d187f -v4.2.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh .* c83a5d86ef86352f80ec799683f83a81d40493239872baab97937755a184c1c7f993fefbc4a87044917e7b9194cf2636c187d99be5af7707aee256c4771b8d5e -v4.2.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh .* a336e8db2cddf1a18b2303485ce10634f918ba43e93ab4e70c2e44c2492e1b1b07431794731f5576adbce0261436263ca96ddeec4ebb71bbeebd181074ddf326 -v4.2.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh .* 3b9c59b432ee2bcf3c9ccc61d4b4a53e414a87df4a275f6afbaac9aa503c5e8420ca0390ebf72d47f7ba31093c1007432c41bef1e311a2368801ef8956069cf6 -v4.2.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh .* 448ffdc8adea27d56d83e58d7ae152b2c8c2dc864248b4c82bfe8d74edfb0a3af351882edf0c5cbd3f4e4a67ef98738bc94abec5173de11f36e3a2a24f74e2b0 -v4.2.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh .* b8e3bcaf154c4da7d0db23063ed77b6996a6874d232c2a6fef88f5d32045f3fbbdeb527ea543e267df0ef11de8f17a28dcbc4997a0ee26513b7fdcfc6ea77f0f -v4.2.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh .* d1697d5d176620ba6079a4d9a3747b2c794a0866676461b3b86c33c16cc0d039e328105776ca86ba61cfbfcea4391e7054be325d20a34d7ebd6ce14c0ffb48be -v4.2.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh .* 1f20aa58d7746b92b38095761397b8a36d31d4e68988654f35e1c4493faaaacf7fe922ddad2d331d05a958da5a7bf385ffcc546beeeedaafef31c587f5349faa -v4.2.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh .* 3d94cce2b1e958c7de202fac2061c159d556f70b60335bfa776f7de6def744dd65e832c5dce97efc80bbc2b43b62898292483e859a7797939f2ab2dca876ae78 -v4.2.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh .* 7195c4481c899172fa53043483b28326ed50019c6a9ea102e03e45f363d39e6bdc04fd38985d17e24e0aa274807e5eeaeb435f9bd3d969cf2ac4fef2453350ad -v4.2.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh .* d96a13c15ad061309e88d219038df0f65703ba97147d47a43d72a14e86a0d1ec2c9b4ccb100ae210f58a07586f94ea15164cfc288b9b6ebad4287a766577029e -v4.2.0 src/releasing/release-files.sh ../lib/tegonal-scripts/src/releasing/release-files.sh .* a01e4e07241ce7a742bae93227353b4c5ef0e64a1a28e75ced60d990c259188a0d890dfda22437c3917aeb4e2541735b2e71438ab651be50e85ae04073b53fcf +v4.4.0 src/setup.sh ../lib/tegonal-scripts/src/setup.sh .* 8bb293a654ed9c4bdbc3eef38f1b390d125da94b5a9112ee176d12b664447bc9762db6e3dfeecd1a931605806f9afe290d3aeea2110dcd8e621da482092f902a +v4.4.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh .* 05fe392018c68dd4da7c728e889d0d3491111df17b77f5ff4c854a06c3b05f7429851136c51a6db4496ff080eb4f54ccd3488b554bbd9959131375416bbae117 +v4.4.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh .* bc1fffa5dd26f49237c0a067da328013bd2301ab5f133daa51a056f726bab3bd98f6e75ce051ec9a2eaf8d132d0afaa55a66288c9874e0161af259262e62e8fb +v4.4.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh .* 42e026f60362a90d7a2b2e45f21ccf253e62cbf5d94ed63b61e6503b4f77cfbe020b80d90825096a79d31a9447a98f500b4757ab379abe6ad8e77c4802a574a5 +v4.4.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh .* 2ae0f6eaa6745fadb218e3547c5e4a5d5c12f116932c311d7f00c51695ac3231554a77896cd7f90e87352afa9eed7a9691802e618bd973af20a7b1c08cf0afe0 +v4.4.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh .* e2c1d886ca9fa6ff15f0e72079184a2d0fe61ef80d360447bb56ff889f97bbef9c170d5e1f9d68012a8fa501c71bb0a005dce477cde1091bb026fb7931a477a9 +v4.4.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh .* 0fafc056e4504e64614e9d74d1b000e779785c59a0280cf15ee3462193e77b0dd2e7d82888e4c1c0987311e1bc79e54addeed8226af35d8f583f27f0c1616544 +v4.4.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh .* 584063b71a08d191d6fed83b15c388935c37b4d85ddc28210ebb7fd28881e742bd5b9528b5430297e99aefa85ac8e45d41ef074858204dbe240bbc823df61f24 +v4.4.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh .* c4ffd8e8dbd5ba30bd6995e48f0124f6ef1dc953a4fb27a94fba1992190dfb818560c17dd5fa8561a7a9f75300593708dd5839069b40aaade60722987e85c1b8 +v4.4.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh .* f43e5d516494edc51afba4853f7e0ac2054c78167462617050dea6d1444e86d7f4a03ec6cf201951a881384679f029fb12773f20e8ce4558ccaecf9af7205e5d +v4.4.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh .* 9ce45b832e32f415f2686639e709b1e11b1c20c0537b02cc8904e8ea6d8135d9bbbf5feb9086598fb4e65e28da7374750cc89aec23cfa702d52c3005cac833b7 +v4.4.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh .* c3e5564e51ff8f5c297bd841407527ed2628db2cb8ce663528bae29e15dd3b3863cd5b7421b6566bb69f3b9fd28a2b9ca55372ef1981250e2d882669e2deb776 +v4.4.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh .* 69fb4514c0981d7e21eded43547cc8e41fbb7c9233895583b70089a3a7159c8246afe16465a4eaf9267447be2b45e68a4ccc7d5651e5721a571ecb3a4b73b057 +v4.4.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh .* 84291fe676b46ed9940ff9cda3f2b1061746b2482db8f1fb4d4fa229463f3df8ddc3e572f7ec7f2ffe9aedabbf664e8d65760bad9e68ab5a5eb880c70012e470 +v4.4.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh .* 01daf24da2d461c723351ef71d960eece17f16b8884ab6d9f72f242a3535190425435008e6b568ea767319e8102cab4cdd74848504d65f67cb2b353301b0c3c2 +v4.4.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh .* db23e249bbfa1fa267e01355313dc6462581fac9e7a4c7b2dbf737889804ef1930f1dc5e87aa3e847b61d9f5d61ce2df2df6d4836d4b846a17d6f2b9a1925ce6 +v4.4.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh .* d5a9308e470e1d440821bcdc1e35c3cdec879c676218fee5355a0d49c4c0c33bf20ae78173f4308c15ee2333c14505873786f9bf37c4f74a18516a557138b984 +v4.4.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh .* f9a8bd84249c6276c17799ca6c8af74701ed52546b46211d68524117003c97f5870b1c95a5dbccab648bb2a7e31e2612b7d853cdb753f2297d22032c5a903cf5 +v4.4.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh .* 7201b6119029f2d63f9684d5d6604829522d08cb56b5e49baf1ea1e16aff0b5b7f7f750b134b1230fe6b3199825c28d9501ad46585e10f622b2951de4e0a4abb +v4.4.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh .* 9b236b1f62833881dc124ee20249fd0197d62626cbab2c4afd258cd4eaf0235264c1a10308f4ef9bba559642c85938b0a0cd4524d27451f8dc5cd52fb40681c3 +v4.4.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh .* a69299d26ecf31533003933d258cc7a1559b222f04a9009fc25e2fd862016e2e28e686ba1c636b8356b069eb11d6aa509f0e263bf025eb3733b1244178aa3adc +v4.4.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh .* 4269902ac5fa284871f708e101678753e6f4b58ec0ee9bf2015f85d5cc6fb53df0446d0f8542c5d2fbf94df550637054694144ce1470fe5c8500cff2cef99d31 +v4.4.0 src/releasing/prepare-files-next-dev-cycle.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh .* dde58993754a8d3670ec4134b31db6eeedfec0099ab6f078bd62f33194713972ac5983c302c94d7f78a5e256d18efa95fb7a4bd23ceeec1a603a6a0fa498b688 +v4.4.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh .* 11cc93fb3962d887ec0f714dd7e7894801cd828850bc62162a3b84fef644128de9a81084f0d0338721a9e01dddb66b9d6537ed25a4e0e495baedb76b6180a034 +v4.4.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh .* d99fffef34e71d1e40ab52fbff8fb183e9bbcf6319c42dd284745a8bbe08daff170f07d21ef20a8c3340783b64d30b78afc96f634dbe4cc70f30370c0a384c8a +v4.4.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh .* 9c81ca5981d3c3e1bcab96eef1a5859234ea35afed5331fdf6198e9910d36e8addbe2d10736f69dd53795e26c4a2ea1613fd0c2827a64434e9d28939288fd32e +v4.4.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh .* 54444f96332ee60da074c4eb0bad9a9040dde55fb6f0a9bde4043e38473395439c4244154d19fde131f9ba6afb9d3d374893ee6b72e3cd3eb0488e21949e792f +v4.4.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh .* faeade4a63aad3bef444a49570bb9cbf032b71d2532b2b466ce04ccd54eed8d446508f5f0311a290a4c2829073c2e8d6b6478558e12c0427931da15ee438d141 +v4.4.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh .* 1ed19315800cf914f0aa17342ded3e951b2474e17d31348b5eb3406aa54460259cc35c40b29e1cf57e7af1770b20b887aaa73780a688c95a6db3e8d2992fa324 +v4.4.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh .* bb9377ea68b44535c603edcd4863b8e0b0c6e31b553b98158bd09e81cfdd0dcc595ecbd9fe558628b9eab36e688ac8588fac617873ad8e0af4ddca3f24eb9163 +v4.4.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh .* 8da77a74846eec19c19010633270da79d078f145d70782512206fd3bce34ecd04bb558e7f7b42f09ec1cb821fe2cdc154a028fa63579db5342d4127792d678a7 +v4.4.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh .* f07d912490363135bc306e949aeb45e6f370f9500bdaa96ea01dea436fe3a288e6b4b832fe9eaec276a5cba07461095911e5024ff31703a91f0cf6a4e7e325e6 +v4.4.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh .* f4c7c4f85c89318989a52606c3e8ea1dce31ef5ba3bc46695030589408ce73aac9f5b45a57b0fa409a7a2d82df37d41f8ab191ab027343e60f52e6b1e9f74f5b +v4.4.0 src/releasing/release-files.sh ../lib/tegonal-scripts/src/releasing/release-files.sh .* 90c41b2169666bd92ee928576d17ba21501652ff83e576b03738af49c6b4451cb6c34b9435e04caac78b2c1abb885570164588623bd8440ae41d96f416feedf3 diff --git a/lib/tegonal-scripts/src/ci/install-shellcheck.sh b/lib/tegonal-scripts/src/ci/install-shellcheck.sh index 51ae845..22c4fa2 100755 --- a/lib/tegonal-scripts/src/ci/install-shellcheck.sh +++ b/lib/tegonal-scripts/src/ci/install-shellcheck.sh @@ -6,11 +6,10 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v4.2.0 +# Version: v4.4.0 ####### Description ############# # -# function which searches for *.sh files within defined paths (directories or a single *.sh) and -# runs shellcheck on each file with predefined settings i.a. sets `-s bash` +# installs shellcheck v0.10.0 into $HOME/.local/lib # ####### Usage ################### # @@ -35,12 +34,27 @@ declare currentDir currentDir=$(pwd) tmpDir=$(mktemp -d -t download-shellcheck-XXXXXXXXXX) cd "$tmpDir" -echo "6c881ab0698e4e6ea235245f22832860544f17ba386442fe7e9d629f8cbedf87 ./shellcheck-v0.10.0.linux.x86_64.tar.xz" >shellcheck-v0.10.0.linux.x86_64.tar.xz.sha256 -wget --no-verbose https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz -sha256sum -c shellcheck-v0.10.0.linux.x86_64.tar.xz.sha256 -tar -xf ./shellcheck-v0.10.0.linux.x86_64.tar.xz -chmod +x ./shellcheck-v0.10.0/shellcheck +shellcheckVersion="v0.10.0" +echo "6c881ab0698e4e6ea235245f22832860544f17ba386442fe7e9d629f8cbedf87 ./shellcheck-$shellcheckVersion.linux.x86_64.tar.xz" >"shellcheck-$shellcheckVersion.linux.x86_64.tar.xz.sha256" +wget --no-verbose "https://github.com/koalaman/shellcheck/releases/download/$shellcheckVersion/shellcheck-$shellcheckVersion.linux.x86_64.tar.xz" +sha256sum -c "shellcheck-$shellcheckVersion.linux.x86_64.tar.xz.sha256" +tar -xf "./shellcheck-$shellcheckVersion.linux.x86_64.tar.xz" +chmod +x "./shellcheck-$shellcheckVersion/shellcheck" mkdir -p "$HOME/.local/bin" -ln -s "$tmpDir/shellcheck-v0.10.0/shellcheck" "$HOME/.local/bin/shellcheck" +shellcheckInTmp="$tmpDir/shellcheck-$shellcheckVersion" +shellcheckInHomeLocalLib="$HOME/.local/lib/shellcheck-$shellcheckVersion" +shellcheckBin="$HOME/.local/bin/shellcheck" +if [[ -d "$shellcheckInHomeLocalLib" ]]; then + echo "going to remove the existing installation in $shellcheckInHomeLocalLib" + rm -r "$shellcheckInHomeLocalLib" +else + mkdir -p "$HOME/.local/lib" +fi +mv "$shellcheckInTmp" "$shellcheckInHomeLocalLib" +if [[ -f "$shellcheckBin" ]]; then + rm "$shellcheckBin" +fi +ln -s "$shellcheckInHomeLocalLib/shellcheck" "$shellcheckBin" + cd "$currentDir" shellcheck --version diff --git a/lib/tegonal-scripts/src/qa/run-shellcheck.sh b/lib/tegonal-scripts/src/qa/run-shellcheck.sh index f6d44e4..b391c11 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # function which searches for *.sh files within defined paths (directories or a single *.sh) and @@ -46,7 +46,7 @@ sourceOnce "$dir_of_tegonal_scripts/utility/recursive-declare-p.sh" sourceOnce "$dir_of_tegonal_scripts/utility/array-utils.sh" function runShellcheck() { - exitIfCommandDoesNotExist "shellcheck" "see https://github.com/koalaman/shellcheck#installing" + exitIfCommandDoesNotExist "shellcheck" "execute $dir_of_tegonal_scripts/ci/install-shellcheck.sh (if pulled) or see https://github.com/koalaman/shellcheck#installing" if (($# < 2)); then logError "At least two parameters need to be passed to runShellcheck, given \033[0;36m%s\033[0m\nFollowing a description of the parameters:" "$#" diff --git a/lib/tegonal-scripts/src/releasing/common-constants.source.sh b/lib/tegonal-scripts/src/releasing/common-constants.source.sh index 2f3ce88..f00062e 100644 --- a/lib/tegonal-scripts/src/releasing/common-constants.source.sh +++ b/lib/tegonal-scripts/src/releasing/common-constants.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under European Union Public License 1.2 # /___/ Please report bugs and contribute back your improvements # -# Version: v4.2.0 +# Version: v4.4.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 56fbc4b..041cc01 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: v4.2.0 +# Version: v4.4.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 d604406..0af8148 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -64,7 +64,7 @@ function preReleaseCheckGit() { local tags tags=$(git tag) || die "The following command failed (see above): git tag" - if grep "$version" <<< "$tags" >/dev/null; then + if grep -q --fixed-strings "$version" <<< "$tags"; then logError "tag %s already exists locally, adjust version or delete it with git tag -d %s" "$version" "$version" if hasRemoteTag "$version"; then printf >&2 "Note, it also exists on the remote which means you also need to delete it there -- e.g. via git push origin :%s\n" "$version" 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 fe412cf..b9fb509 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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/prepare-next-dev-cycle-template.sh b/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh index 9fc61c7..856789b 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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/release-files.sh b/lib/tegonal-scripts/src/releasing/release-files.sh index 4c22c0c..dbe0b3d 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Releasing files based on conventions: @@ -76,7 +76,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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/release-template.sh b/lib/tegonal-scripts/src/releasing/release-template.sh index c4a8c5e..b10312c 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -155,7 +155,7 @@ function releaseTemplate() { "$releaseHook" || return $? if [[ $prepareOnly != true ]]; then - git add . || return $? + git add "$projectsRootDir" || return $? git commit --edit -m "$version " || return $? local signsTags signsTags=$(git config --get tag.gpgSign) diff --git a/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh b/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh index 0abc9c7..5bba050 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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 bdda628..65d2a5b 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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 682cfae..ffe9234 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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-common-steps.sh b/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh index 382fd86..1ec7fd0 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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-issue-templates.sh b/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh index 8c624a8..5ce2f6c 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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-scripts.sh b/lib/tegonal-scripts/src/releasing/update-version-scripts.sh index a30013e..32ba40e 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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/setup.sh b/lib/tegonal-scripts/src/setup.sh index d603c10..b198517 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: v4.2.0 +# Version: v4.4.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 93801c3..401e8f2 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # utility functions for dealing with arrays diff --git a/lib/tegonal-scripts/src/utility/ask.sh b/lib/tegonal-scripts/src/utility/ask.sh index e20c175..affe9da 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Utility functions to ask the user something via input. diff --git a/lib/tegonal-scripts/src/utility/checks.sh b/lib/tegonal-scripts/src/utility/checks.sh index 638436a..d652761 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Functions to check declarations @@ -106,7 +106,7 @@ function checkArgIsArray() { reg='^declare -a.*' local arrayDefinition # we are not failing (with || die...) on this line as the if will fail afterwards - arrayDefinition="$(recursiveDeclareP checkArgIsArray_arr)" + arrayDefinition="$(recursiveDeclareP checkArgIsArray_arr)" || traceAndDie "could not get array definition of %s" "${!checkArgIsArray_arr}" if ! [[ $arrayDefinition =~ $reg ]]; then local funcName=${FUNCNAME[1]} if [[ $funcName == "exitIfArgIsNotArray" ]]; then @@ -216,7 +216,7 @@ function checkArgIsFunction() { local name argNumberOrName # shellcheck disable=SC2034 # is passed by name to parseFnArgs local -ra params=(name argNumberOrName) - parseFnArgs params "$@" + parseFnArgs params "$@" || return $? if ! declare -F "$name" >/dev/null; then local declareP @@ -239,7 +239,7 @@ function checkArgIsBoolean() { local value argNumberOrName # shellcheck disable=SC2034 # is passed by name to parseFnArgs local -ra params=(value argNumberOrName) - parseFnArgs params "$@" + parseFnArgs params "$@" || return $? if ! [[ $value =~ ^(true|false)$ ]]; then local funcName=${FUNCNAME[1]} @@ -316,21 +316,36 @@ function exitIfVariablesNotDeclared() { done } +function checkPathIsInsideOf() { + if ! (($# == 2)); then + logError "Two arguments needs to be passed to checkPathIsInsideOf, given \033[0;36m%s\033[0m\n" "$#" + echo >&2 '1: pathToCheck the path which should be inside of rootDir' + echo >&2 '2: rootDir the root directory' + printStackTrace + exit 9 + + fi + local path=$1 + local rootDir=$2 + local pathAbsolute rootDirectoryAbsolute + pathAbsolute="$(realpath -m "$path")" || return $? + rootDirectoryAbsolute="$(realpath -m "$rootDir")" || return $? + [[ "$pathAbsolute" == "$rootDirectoryAbsolute"* ]] +} + function checkPathNamedIsInsideOf() { - local path name parentDirectory + local path name rootDir # shellcheck disable=SC2034 # is passed by name to parseFnArgs - local -ra params=(path name parentDirectory) - parseFnArgs params "$@" + local -ra params=(path name rootDir) + parseFnArgs params "$@" || return $? - local pathAbsolute parentDirectoryAbsolute - pathAbsolute="$(realpath -m "$path")" - parentDirectoryAbsolute="$(realpath -m "$parentDirectory")" - if ! [[ "$pathAbsolute" == "$parentDirectoryAbsolute"* ]]; then - returnDying "the given \033[0;36m%s\033[0m %s is outside of %s" "$name" "$pathAbsolute" "$parentDirectory" || return $? + # shellcheck disable=SC2310 # we are aware of that ! will disable set -e for checkPathIsInsideOf + if ! checkPathIsInsideOf "$path" "$rootDir"; then + returnDying "the given \033[0;36m%s\033[0m %s not inside of %s" "$name" "$pathAbsolute" "$rootDir" || return $? fi } function exitIfPathNamedIsOutsideOf() { - # shellcheck disable=SC2310 # we are aware of that || will disable set -e for checkIfPathNamedIsOutsideOf + # shellcheck disable=SC2310 # we are aware of that || will disable set -e for checkPathNamedIsInsideOf checkPathNamedIsInsideOf "$@" || exit $? } diff --git a/lib/tegonal-scripts/src/utility/execute-if-defined.sh b/lib/tegonal-scripts/src/utility/execute-if-defined.sh index 59271e0..d493c0e 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. diff --git a/lib/tegonal-scripts/src/utility/git-utils.sh b/lib/tegonal-scripts/src/utility/git-utils.sh index f2d3731..c12ffd1 100644 --- a/lib/tegonal-scripts/src/utility/git-utils.sh +++ b/lib/tegonal-scripts/src/utility/git-utils.sh @@ -5,7 +5,7 @@ # / __/ -_) _ `/ _ \/ _ \/ _ `/ / It is licensed under Apache License 2.0 # \__/\__/\_, /\___/_//_/\_,_/_/ Please report bugs and contribute back your improvements # /___/ -# Version: v4.2.0 +# Version: v4.4.0 # ####### Description ############# # @@ -73,6 +73,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/parse-fn-args.sh" +sourceOnce "$dir_of_tegonal_scripts/utility/string-utils.sh" function currentGitBranch() { git rev-parse --abbrev-ref HEAD @@ -132,9 +133,10 @@ function hasRemoteTag() { local -r tag=$1 local -r remote=${2:-"origin"} shift 1 || traceAndDie "could not shift by 1" - local output + local output literalTag output=$(git ls-remote -t "$remote") || die "the following command failed (see above): git ls-remote -t \"$remote\"" - grep "$tag" >/dev/null <<<"$output" + literalTag=$(escapeRegex "refs/tags/$tag") + grep -q -E "$literalTag\$" <<<"$output" } function remoteTagsSorted() { @@ -150,11 +152,11 @@ function remoteTagsSorted() { function latestRemoteTag() { 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 + 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:-".*"} diff --git a/lib/tegonal-scripts/src/utility/gpg-utils.sh b/lib/tegonal-scripts/src/utility/gpg-utils.sh index 5e354b8..8bffc3b 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # utility functions for dealing with gpg @@ -190,7 +190,7 @@ function isGpgKeyInKeyDataExpired() { local -ra params=(keyData) parseFnArgs params "$@" - grep -E '^(sub|pub):e:' <<<"$keyData" >/dev/null + grep -q -E '^(sub|pub):e:' <<<"$keyData" } function isGpgKeyInKeyDataRevoked() { @@ -199,13 +199,13 @@ function isGpgKeyInKeyDataRevoked() { local -ra params=(keyData) parseFnArgs params "$@" - grep -E '^(sub|pub):r:' <<<"$keyData" >/dev/null + grep -q -E '^(sub|pub):r:' <<<"$keyData" } function getRevocationData() { if (($# == 0)) || (($# > 2)); then logError "You need to pass at least 1 and at max 2 arguments to getRevocationData, given \033[0;36m%s\033[0m\n" "$#" - echo >&2 '1: keyId the gpg keyId for which we shall print the revocation informatoin' + echo >&2 '1: keyId the gpg keyId for which we shall print the revocation information' echo >&2 "2: gpgDir (optional) the gpg-dir in which we shall search for the key -- default: use gpg's default" printStackTrace exit 9 diff --git a/lib/tegonal-scripts/src/utility/http.sh b/lib/tegonal-scripts/src/utility/http.sh index 0ca864b..97fe569 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: v4.2.0 +# Version: v4.4.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='v4.2.0' +export TEGONAL_SCRIPTS_VERSION='v4.4.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 30182c9..57245a2 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # utility function dealing with Input/Output @@ -63,7 +63,7 @@ function withCustomOutputInput() { withCustomOutputInput_tmpFile=$(mktemp /tmp/tegonal-scripts-io.XXXXXXXXX) eval "exec ${withCustomOutputInput_outputNr}>\"$withCustomOutputInput_tmpFile\"" || traceAndDie "could not create output file descriptor %s" "$withCustomOutputInput_outputNr" eval "exec ${withCustomOutputInput_inputNr}<\"$withCustomOutputInput_tmpFile\"" || traceAndDie "could not create input file descriptor %s" "$withCustomOutputInput_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 + # don't fail if we cannot delete the tmp file, if this should happen, then the system should clean-up the file when the process ends rm "$withCustomOutputInput_tmpFile" || true $withCustomOutputInput_fun "$@" diff --git a/lib/tegonal-scripts/src/utility/log.sh b/lib/tegonal-scripts/src/utility/log.sh index ef5f06c..aedd5a3 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. diff --git a/lib/tegonal-scripts/src/utility/parse-args.sh b/lib/tegonal-scripts/src/utility/parse-args.sh index 5858da5..858ff15 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Intended to parse command line arguments. Provides a simple way to parse named arguments including a documentation @@ -151,7 +151,7 @@ function parseArgumentsInternal { if ! ((parseArguments_numOfArgumentsParsed == 0)); then logWarning "there were arguments defined prior to --help, they were all ignored and instead the help is shown" elif (($# > 1)); then - logWarning "there were arguments defined after --help, they were all be ignored, you might want to remove --help" + logWarning "there were arguments defined after --help, they will all be ignored, you might want to remove --help" fi return 99 fi diff --git a/lib/tegonal-scripts/src/utility/parse-commands.sh b/lib/tegonal-scripts/src/utility/parse-commands.sh index 642d842..0a77b51 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Intended to parse command line arguments of a script which uses commands and delegates accordingly. diff --git a/lib/tegonal-scripts/src/utility/parse-fn-args.sh b/lib/tegonal-scripts/src/utility/parse-fn-args.sh index 19e04a3..82239bf 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Intended to parse positional function parameters including assignment and check if there are enough arguments diff --git a/lib/tegonal-scripts/src/utility/parse-utils.sh b/lib/tegonal-scripts/src/utility/parse-utils.sh index 6a18a69..e1a2a37 100644 --- a/lib/tegonal-scripts/src/utility/parse-utils.sh +++ b/lib/tegonal-scripts/src/utility/parse-utils.sh @@ -6,13 +6,10 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v4.2.0 +# Version: v4.4.0 ####### Description ############# # -# Intended to parse command line arguments. Provides a simple way to parse named arguments including a documentation -# if one uses the parameter `--help` and shows the version if one uses --version. -# I.e. that also means that `--help` and `--version` are reserved patterns and should not be used by your -# script/function. +# Utility functions for argument parser like function such as parse-args and parse-fn-args # ####### Usage ################### # diff --git a/lib/tegonal-scripts/src/utility/recursive-declare-p.sh b/lib/tegonal-scripts/src/utility/recursive-declare-p.sh index 6abb292..f9fe36e 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: v4.2.0 +# Version: v4.4.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 63ee6cd..b080000 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: v4.2.0 +# Version: v4.4.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). @@ -80,7 +80,7 @@ function replaceHelpSnippet() { local snippet cleanedUpSnippet markdownSnippet snippet=$("$script" "${varargs[@]}") || true - # remove ansi colour codes form snippet + # remove ansi colour codes from snippet cleanedUpSnippet=$(perl -0777 -pe "s/\033\[([01];\d{2}|0)m//g" <<<"$snippet") || die "could not quote snippet for %s" "$script" markdownSnippet=$(printf "\`\`\`text\n%s\n\`\`\`" "$cleanedUpSnippet") || die "could not create markdownSnippet for %s" "$script" diff --git a/lib/tegonal-scripts/src/utility/replace-snippet.sh b/lib/tegonal-scripts/src/utility/replace-snippet.sh index 23d700e..cb9ca93 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: v4.2.0 +# Version: v4.4.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 f8e41b9..896ab55 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: v4.2.0 +# Version: v4.4.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. diff --git a/lib/tegonal-scripts/src/utility/update-bash-docu.sh b/lib/tegonal-scripts/src/utility/update-bash-docu.sh index e86c3ab..0378d5c 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: v4.2.0 +# Version: v4.4.0 # ####### Description ############# #