From aa703c6fa8bfd0e19c339e439f5c09b6ef4d77a1 Mon Sep 17 00:00:00 2001 From: tegonal-bot Date: Mon, 19 Oct 2026 12:07:21 +0000 Subject: [PATCH 1/2] update files of remote tegonal-scripts to version(s) v5.2.0 via gt --- .gt/remotes/tegonal-scripts/pulled.tsv | 140 +++++++++--------- .../src/ci/install-shellcheck.sh | 106 +++++++------ lib/tegonal-scripts/src/ci/install-shfmt.sh | 88 ++++++----- .../src/qa/check-help-callable.sh | 2 +- lib/tegonal-scripts/src/qa/run-shellcheck.sh | 4 +- lib/tegonal-scripts/src/qa/run-shfmt.sh | 2 +- .../src/releasing/common-constants.source.sh | 7 +- .../releasing/deduce-next-version.source.sh | 2 +- ...on-update-hook.params-definition.source.sh | 2 +- ...after-version-update-hook.params.source.sh | 2 +- ...-dev-cycle-template.default-args.source.sh | 2 +- ...cycle-template.params-definition.source.sh | 2 +- ...s-next-dev-cycle-template.params.source.sh | 2 +- ...iles-next-dev-cycle.default-args.source.sh | 2 +- ...next-dev-cycle.params-definition.source.sh | 2 +- ...pare-files-next-dev-cycle.params.source.sh | 2 +- ...-dev-cycle-template.default-args.source.sh | 6 +- ...cycle-template.params-definition.source.sh | 2 +- ...e-next-dev-cycle-template.params.source.sh | 2 +- ...ease-files-template.default-args.source.sh | 2 +- ...files-template.params-definition.source.sh | 2 +- .../release-files-template.params.source.sh | 2 +- .../release-files.default-args.source.sh | 9 +- .../release-files.params-definition.source.sh | 7 +- .../params/release-files.params.source.sh | 2 +- .../release-template.default-args.source.sh | 5 +- ...lease-template.params-definition.source.sh | 2 +- .../params/release-template.params.source.sh | 2 +- ...ersion-common-steps.default-args.source.sh | 13 +- ...n-common-steps.params-definition.source.sh | 2 +- ...date-version-common-steps.params.source.sh | 2 +- .../src/releasing/pre-release-checks-git.sh | 6 +- .../prepare-files-next-dev-cycle-template.sh | 14 +- .../prepare-next-dev-cycle-template.sh | 21 +-- .../src/releasing/release-files-template.sh | 11 +- .../src/releasing/release-template.sh | 23 ++- .../src/releasing/sbt-publish-to-sonatype.sh | 4 +- .../src/releasing/sneak-peek-banner.sh | 4 +- .../src/releasing/toggle-sections.sh | 4 +- .../src/releasing/update-version-README.sh | 11 +- .../releasing/update-version-common-steps.sh | 10 +- .../update-version-issue-templates.sh | 22 ++- .../src/releasing/update-version-scripts.sh | 17 ++- .../src/setup_tegonal_scripts.sh | 2 +- .../src/utility/array-utils.sh | 2 +- lib/tegonal-scripts/src/utility/ask.sh | 2 +- lib/tegonal-scripts/src/utility/checks.sh | 78 ++++++---- lib/tegonal-scripts/src/utility/cleanups.sh | 2 +- lib/tegonal-scripts/src/utility/date-utils.sh | 2 +- .../src/utility/execute-if-defined.sh | 2 +- lib/tegonal-scripts/src/utility/git-utils.sh | 6 +- lib/tegonal-scripts/src/utility/gpg-utils.sh | 2 +- lib/tegonal-scripts/src/utility/http.sh | 4 +- lib/tegonal-scripts/src/utility/io.sh | 2 +- lib/tegonal-scripts/src/utility/log.sh | 2 +- lib/tegonal-scripts/src/utility/parse-args.sh | 2 +- .../src/utility/parse-commands.sh | 2 +- .../src/utility/parse-fn-args.sh | 2 +- .../src/utility/parse-utils.sh | 2 +- .../src/utility/recursive-declare-p.sh | 2 +- .../src/utility/replace-help-snippet.sh | 2 +- .../src/utility/replace-snippet.sh | 2 +- .../src/utility/secret-utils.sh | 2 +- .../src/utility/source-once.sh | 2 +- .../src/utility/string-utils.sh | 4 +- .../src/utility/update-bash-docu.sh | 2 +- 66 files changed, 393 insertions(+), 311 deletions(-) diff --git a/.gt/remotes/tegonal-scripts/pulled.tsv b/.gt/remotes/tegonal-scripts/pulled.tsv index fbb923d..39dabe5 100644 --- a/.gt/remotes/tegonal-scripts/pulled.tsv +++ b/.gt/remotes/tegonal-scripts/pulled.tsv @@ -1,69 +1,71 @@ -#@ Version: 1.3.0 -tag file relativeTarget tagFilter hasPlaceholder sha512 -v5.0.0 src/utility ../lib/tegonal-scripts/src/utility .* false is_a_tracking_directory -v5.0.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh .* false c7d779990cfc3ae903d0a092123cea153ba9e653275a715fc44f698a6825b6e2062cc838fd71a2e3a7260b844c99b1b0a9ae784f84d248b828dfa8cd0a55a18d -v5.0.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh .* false 11c5000bf6bbf05b001a9c626acb1c8564a400e692bdd13aca31f934cc9f65c29958e3e5028caf85f361b39f1c2d8bbcb81269dddc8a0964816f935c396f0781 -v5.0.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh .* false 5df9cd7d3c1a9c9f7cb973ba76d759f14774978c14fa7b59c2c98f59953c6d4edebbf6b1dfbf33f04f8922bbc1edb1e782c5e5da097affa7b96838d150a7e3f6 -v5.0.0 src/utility/cleanups.sh ../lib/tegonal-scripts/src/utility/cleanups.sh .* false 644e30f722d2bfcb67657d98e7efb9f4f20f5fc3dcabfb42c884e117422444a366861587bb9acff66e53c2e4a46377e0393dda124ad14b2335d54477c6c9fe15 -v5.0.0 src/utility/date-utils.sh ../lib/tegonal-scripts/src/utility/date-utils.sh .* false 2fadc10ba67bf3781d891b2808dcde911ffc0a8d3953e53973a09f1aaf9093b52cf0050dbd08295366c796efda72c64dca3ff6008ce4ac591e7d1266b0f322ca -v5.0.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh .* false 1c1edc68eabc24e2fa68f883414e053aa082cd95fab29e0f798bea2e05da2b848163e0833e4da3d66764d7b8a6ed57a0e6e50f3aeeaef0e43768e5db354728c2 -v5.0.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh .* false a62ee7bc75da5c83cc2774e643fe2d68711741d3c66f10bff2018937ac4c3f88cf55cfe64b34eb2995b92c4e96d38936fbde27185dce3876114583e3da51d14c -v5.0.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh .* false 806f1f1ee56c8daddc12fd77711b71a5cf90adc9a9d842f907b616057721ad5b4dbf56c17f37a4b1c3effab119a572e7e253815d8e5b89a8d79db691b8660d3f -v5.0.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh .* false c370bcd5089f32aa7b968da9f20517661b5a13e2a966e1e3fcad3778edc4cc4c18fcdb4bcef0a91547d9c2c368daa6d525f7eb1d10cb142314a56825efa35bc5 -v5.0.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh .* false 0b616faee5812456c47011cb28d77bbeea62b97c699d6381fa866d46e1b0ceca7160f9fa50fe2d875d6c94923f92dbf8506539efdaf9ce488e4377e8753b42ab -v5.0.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh .* false ccce7245760183d38474b9a37805853fd4fa4fc39ffcf1935f768f86cd33c79e3aacede71423b406cc9b0d79837698ee3b3bce083c541e5bd89b014204a98247 -v5.0.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh .* false 8c18eac330a72f1458e53975b8fada8ae45343173e6f72531e31e88d2ea570daed6ebae6980b620b1d5497f37b936011d5a2769214aecc0a912d6e0cd6af0a2e -v5.0.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh .* false dad7edad33b4b549a0ee184f6f628baf81d54690ce004ea790003b6fd16d6ac76c9ceab8dace00ac3b76829c2fefbb49bf41c75f401665d7556a2346fc329ab9 -v5.0.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh .* false 2e23292833217154141e2f97dbf1d4d0f8faeec88d21b28398ae5cb0f3699396879c14c15225b918237d64f63f66c62308e74bcef32dec652299576fbe6a5189 -v5.0.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh .* false 6b6b62adfdd99609b6ac5ae3feab038299679d500fb5373aff67c5f2ee13647aeeb11ac98790a981016f6e6e5a126760ce1d0947fda1394a92a05a8c656022e0 -v5.0.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh .* false a55fd847536587ce817e09b8fa6a700a6c9aff3f8dfb5f912fc0fe9507388d8ac270b71f48b62215668fbc8a17f0779a69475e8151cb5a8c4634b37fbaead1c8 -v5.0.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh .* false 75367c0e7a9b9b6c01a4658586552b9b10b2f9dd273c9a7df5c043e44a3cb1fb5cb11f2481b776c3ebe6060161a7ff432cef147c31f6b570f4a54026d2249eeb -v5.0.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh .* false 5956d0809fc78ea4647ddea78e9585068971c9691d684f5c5110c5f17ba2b11e4a75fd384b3411c319cc361ff82de2974763821c252e9b2d4d4fa4e58d6defe5 -v5.0.0 src/utility/secret-utils.sh ../lib/tegonal-scripts/src/utility/secret-utils.sh .* false 7ef00780a0236a2e3694f2ec4eb41b6aff381ebc2613c13e51008789c8e9658648139114b7aedf46d4beebdfe9248428669e48fe60b7a7d5f513f8b7d14ffad6 -v5.0.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh .* false 1b9710c7f290336008592781718b672fc26a4ff787be6e26aa2dd292202f25a6dedf522cc18972c6bf685edd80ce7ae262c0fb952733554af28ba29f729be00a -v5.0.0 src/utility/string-utils.sh ../lib/tegonal-scripts/src/utility/string-utils.sh .* false 8f16921816ef80e490ae865d8abe8bf5e900d06380ebe34af901533f1118cd525a92509363ebe5f7b26fd7adb5d0aea55086865297218833cf2a4260a0290315 -v5.0.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh .* false f1569e172e39cd92920111a55360278a34145db63d9fd7fbe8b5622d292a75f25fb6e9e3bf0fb50f420c04eede969e3cdd441138354db34b1962787024b10bca -v5.0.0 src/releasing ../lib/tegonal-scripts/src/releasing .* false is_a_tracking_directory -v5.0.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh .* false f191a399b9d8a325626b105d5d3f80f71ff8a6a95a8e3f9df51feb23b31467ee4f147d6762e547bce175bfdf07f2aafe7096103f6d3c2746e6feb5696880d13d -v5.0.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh .* false 26a430ec9fcaccab6599cafa5fd96e531f29a9a1f24f96602ee928cc60e0466568816e8cd8984e83c7b574cd5a8ee29074dbbd49d31dbb56211375438d0cbdee -v5.0.0 src/releasing/params/after-version-update-hook.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params-definition.source.sh .* false d911cf3b6c5de9d09718651a4b1c8e27fe1c4f8dfa99c2bd383bd09f8c0ab20cf4dffb6955b7ace0a821ca13e5528b037c40cd4fa7d0e4590641e12039b59943 -v5.0.0 src/releasing/params/after-version-update-hook.params.source.sh ../lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params.source.sh .* false e8501b2ab3ec7161d0dcc6ca03aa81e8f49fdb4d1f3c6a113bc45b5eb69668bfe55b250733fafbff55ac4ec5cf7b2df314fea68514473811c4f22f904b279a93 -v5.0.0 src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh .* false aa022fe8e650176496116b5948afaff37ce28be13a6b848a85dea2e46c84b711a11dae54e608e1cbc4c7510d2091022a2499e5bb51c38828da7bf937a63a1e8e -v5.0.0 src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh .* false a2463de2cdd3516fe41709e2dd92e84ad140bb0099b60680fa907a24dff1150e58aeb90c2d01baffa2fa66c90ec839ee6988b144dea9ef54b60c0ced38ca1b1e -v5.0.0 src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh .* false 86e5c7138b5a0fad72cfa343a8726c19099dbfbcc4bcddfc5d17004acfc7bd5d2b31e8bdf60d852ed409a49874794f173ffbf98780d808f17081810c57a8f468 -v5.0.0 src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh .* false 578a8df2f6e2594f94cc9873f089a840e264837aab5530df963ce0373f01df17c7dbc707b49af651fe40254d0f856bb6dc72fe4b6e9e40664811fc2f9170f43c -v5.0.0 src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh .* false 87379dbd2a1bc075c3902146c9cad928deeabe5735f763e3785ea60439186bdb0745d7d0d61d7f74fa0a0300e2fe7b66a9b439ec0033bd78ba617331c862db19 -v5.0.0 src/releasing/params/prepare-files-next-dev-cycle.params.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params.source.sh .* false 6f63d2f61b3a98a71ce2fcf29b8f79b81310abe19649c7c0fea19d8d8b2722386860df775cfb3f03f02a8257271a162ac6d5091837107493c1519a4ff534f953 -v5.0.0 src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh .* false 7efa6ecdb97ea4656fd734c080e84da5276320cb9b4b5e1d554eb286f6613ec63e7ac7c0dbb47b3a1ecd06225ef0fa7de662a4146dffea6b1b7ff1d5d6ae5376 -v5.0.0 src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh .* false 6ec972567645ab8558be60a21d7bfc3ece43d1aa2b0adbdd69a2f0980c38be7e1719c2f9ca3a460f0230b0a20e77619045add602e75cae9b504890de16f4f61b -v5.0.0 src/releasing/params/prepare-next-dev-cycle-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params.source.sh .* false c53275162609a7a1588c33eb3c298b1af68a8f6e1119306d4a93c3d8b84d5dd6e0c3ac19891c48bd9e26b46143e43a89939cc848de4321d8fb5b4971442f6db0 -v5.0.0 src/releasing/params/release-files-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files-template.default-args.source.sh .* false 96e56b7f26d99a4e86432ae6aa88a4aea149973798579a007946ba2f715379afaad7c6a9daf643a03e022d2439a651a289fc2a150cc55d6960b49b4b0352ddb9 -v5.0.0 src/releasing/params/release-files-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files-template.params-definition.source.sh .* false 78d791ee72d6ee3f0f32159cdc9a83763582402e5db17af90a3bc02f436109e9ebd473caf98d6daa9691aebcb91b0baa9488904dfdb84fd308a439c56f6f6395 -v5.0.0 src/releasing/params/release-files-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files-template.params.source.sh .* false 5154f98669583f39eaacd204cd2774637eda3b80bd8a84e955aa3487d7f666d0f3881eab2268d3d2daf4b5fb4e30c2460cf9507f6c6f435947cff081098ac184 -v5.0.0 src/releasing/params/release-files.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files.default-args.source.sh .* false af8ca74d4e65ffb631f3cdc4467d7c43961db508e14b25d600f9ee67f93ecfd044221901d381d459ef0be80942e2aee584143f05c58f34053816ed8924a74b90 -v5.0.0 src/releasing/params/release-files.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files.params-definition.source.sh .* false f8879c03f8ac933a81e561dc9c4ebf753cf11e88bbc6c9a793eddb39366a7ea65c8f7390bece80b937f85ba20d92eb7874814c38ef82acf0d6e57ca6757f9288 -v5.0.0 src/releasing/params/release-files.params.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files.params.source.sh .* false e1f472ed6c0ae84217b54f8d0c9f5b70d3d12509b2c7a8c2db7a41b5be50f3a73a25e24569e67453ac8fa2d4da69a19fecac2d66a9fdaf6e3a0449950fb9ce67 -v5.0.0 src/releasing/params/release-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/release-template.default-args.source.sh .* false 4959fea2818bbd16b1371cbdadd8515bb35c621c45d6dfa34a65040ac2562c55178519429106624b9fbe380929cc7ae1a51e600221d7508354029cdb3071494e -v5.0.0 src/releasing/params/release-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/release-template.params-definition.source.sh .* false 49d4d9682ffc24f6b71fc1005efef27afe354009c5dee91ef0de5b513093467702e726b4c6bbf4f005dc1f983fbb528700678be29041bb29dac1bc9b3a017c9c -v5.0.0 src/releasing/params/release-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/release-template.params.source.sh .* false 14e0c72794689d929421ce8dc4d74ad0916b4d7487322c64b592c725d2d1611e9f76e8c1cf4fae422adb77d8579548d88fb41f0b72892314b2c54412d12dc383 -v5.0.0 src/releasing/params/update-version-common-steps.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/update-version-common-steps.default-args.source.sh .* false ade54e5675d1f56da75deafabcaa4aab3883fcb20528806db96d3f75c78b3d127299152f5a14606b3ceb1885870398f5588b039958eb01bc8c4eefa4ff509dd0 -v5.0.0 src/releasing/params/update-version-common-steps.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params-definition.source.sh .* false 77056518dc31eb59780d16bd627ceee1de0b5ddc455adb23845fea1a2ad83a7c0e3dadce29debdcc7afe8aa5d2b11149e9b570ec51c4697f5305af6b6db9cef6 -v5.0.0 src/releasing/params/update-version-common-steps.params.source.sh ../lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params.source.sh .* false 374077dbf89560669882dd69c64827884518c6a7783a76af131cdf363a9287d9f453f082b944b7b32deb320c29ddccffe9bab7685826c743ba4099f481673e8a -v5.0.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh .* false bb4ab2e8bcf07d57dd190b1520b763362aa62398215878cd30a806b41f36ae8507fe1f0ba16c4e4cc41d261a23b762b2e0d177ff68a79340fdbb0de25d208a8c -v5.0.0 src/releasing/prepare-files-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle-template.sh .* false 033480a303e7b13fe3d9202dc29600a392da727f207e797c713d0e33297a4b9f6fae9d9826a3d4a1691f64221bd9a2ae34cef4ea4c6c3ac38e17d2af7e9afea3 -v5.0.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh .* false 4800f20ad75e5754948eaae36c0da1ba01bf48a05582e9138758aada8893ea9ae750e9ea4d4b7b9714c5d113b1415411c48a1cdba2910a1b7d40f26dbfbc39db -v5.0.0 src/releasing/release-files-template.sh ../lib/tegonal-scripts/src/releasing/release-files-template.sh .* false b5376a04d57e03c0acafa947821633936533ff8602a437adc357e8bca4106a115e04d2a7900a6074400ce05cf7eee2bb910f06f9cdf7d4b9207be3d5417a2988 -v5.0.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh .* false d46b8616e71a2dde385edbba3568b70c604eef26a7484714a4efb1b1f8271f887e1e63931a6d073e15dfce7fc9b4fdf5602903213c8b76a824e3a939c981b980 -v5.0.0 src/releasing/sbt-publish-to-sonatype.sh ../lib/tegonal-scripts/src/releasing/sbt-publish-to-sonatype.sh .* false f4b7c67421a3d1e7eb3122d885ac43ecf1a6bd8de5a08c4fc6740ed923ab4e2c11de692fe876b7ba061e169da59ad0abeca1d2ff0454fab61e22b6498f1f52bc -v5.0.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh .* false e239e25f8b09e865ba6f08fbd292977417e5dfb475ad450a18e3c87851cb3bdeb21667da19d05d495a87c9ad923e4e14854d40e945227383c81c9eaf258e395a -v5.0.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh .* false c1e3181ef84f7dcb2a7449ecc2131ee282d590320c2b846d3a8a9a2af73660f9411b5fe74cfdb6b8aecb2b4895559cf497491dc682969a4b8fadfd80c2dc0d93 -v5.0.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh .* false 45e3dd4d1d66b265c61f24b2895ab9ef041886ca1870827369bd6d866d5290cdbf6ccb43b787c3dedc4e92450fd7daa90878a96a22a9c3dfa768f80d73e4ec6d -v5.0.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh .* false b61305f7db31556e25c18ae37da3bb5b39d5484469354e1f81b06848cea9580ec21b15da0287f41e53929974363d399e7b41de5aa505a5e33f299d308c2d5fbe -v5.0.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh .* false 26087ad16409fb91ad9f5e4ab910d82ec9f9a8e57fbfc4888dcbbf7361930863721f127c1c830f7ac01f4c6cb484562a1f7abec9f6086d7b23dd03ff7fe5f5e3 -v5.0.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh .* false 87f9dfb0edd47686bf646858abab3dcd8b616b261ce001a6662b0f60e28b2d0b47f58b1f8d83e6749aada0093f189fe8bd1ce36ab3fa85003c8d678dc560a1ed -v5.0.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh .* false 4c72c4e006b572dd069ca3c36d2e2eaf48dc7529538ce1a58114b596ae60e3b132c2f34fa8efbfc3a8765bfeafda84d1a93165958520825c24efe1067cfd415e -v5.0.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh .* false 47efcf9f9a03fdf2b660336fcd6a1dd4a8fd67c39079ac98176631762e0a36bfcab9583ad3c92b19388e7c4bbc2c8ad9eaf7b06cc55fecb1f88922a155b206b1 -v5.0.0 src/ci/install-shfmt.sh ../lib/tegonal-scripts/src/ci/install-shfmt.sh .* false 80e814008d1a4f2137aa3a1b08a58d09367ed1d9e166929bf8f074cef65bbcd5237ea42b412ee89ac525a2e891eb10178da209870d9fb55c28978b3f2fef10ca -v5.0.0 src/qa/run-shfmt.sh ../lib/tegonal-scripts/src/qa/run-shfmt.sh .* false e385f4512c8275b1743edebcff933b08689c67bb2865395350a80d1f666c1b313511fa74b15db2d661970125843ea923277bb54a2cc2621176b661d4f15c89b8 -v5.0.0 src/setup_tegonal_scripts.sh ../lib/tegonal-scripts/src/setup_tegonal_scripts.sh .* false 4ac1cc7470861e3bbcb3a5f0ba4d19c1d79766900fa19897103edffc18d814b421763dc17aacae469770af9470710ce0b781aeb9e2fcf3aeffc1f3eccefb27d4 -v5.1.0 src/qa/check-help-callable.sh ../lib/tegonal-scripts/src/qa/check-help-callable.sh .* false 68540930313dff998d5d1db920e16fd84e5215370688f99c513d2c89bdb40f6144c5b2a906b3b7529b088d41cb6252d421d2ae95add8efe1571c2952c14fe7dd +#@ Version: 1.4.0 +tag file relativeTarget tagFilter hasPlaceholder excludeFilesMatching sha512 +v5.2.0 src/utility ../lib/tegonal-scripts/src/utility .* false ^$ is_a_tracking_directory +v5.2.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh .* false ^$ 5b7618c1225ac171f4a1d620d39e5caa0049edcc3605a93e78b5e6764e8b9a203df7391c93277c3e0523d0b873a63f564ad060732afc2e1e7b0ba14f85114088 +v5.2.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh .* false ^$ e966b3647e74b931c674a525795218ffa7de4ab15c00827f9220f3eb1416bc19e7686412fe88c0799c0ce8fb440593fa46a94e60d8ff425ab23d31ba9f04395f +v5.2.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh .* false ^$ 7c0b8ca8e88e902ae4575bb92b79449f58eb55c768b13ceac3bae0a2b2e4eab1d7bbd0fd9bd7bb5ae98b1b4314179dd25023b1fb7cea0448bb8256eb638e997f +v5.2.0 src/utility/cleanups.sh ../lib/tegonal-scripts/src/utility/cleanups.sh .* false ^$ a4b7a78cad324a1ade59a08f0dd83ab828b7f9fe249ec5276c9e96850f3647c7a5c8510cd55ce413d547523a00c137c9231f44667539a223866baac411d4c77c +v5.2.0 src/utility/date-utils.sh ../lib/tegonal-scripts/src/utility/date-utils.sh .* false ^$ a23d46f6172d95caa9ddcbb5955d83ab4be05d99d3d78f78194b08ebe81b841e28e41501e6d6674fd6586f0ddcd8cc41636dd8164358edb862f9c10d2b0a6052 +v5.2.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh .* false ^$ 3d71c95ee8d0dacf33de403343f594b034778422bf2d5ecb74383c911d61e462c28175f99db3f7e5e531ccac650ea7873c0c0c3b365ffccfd3f54872e0272efb +v5.2.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh .* false ^$ 76f4aec6a0e5dcc501de348f29209547e3f8dc2aa1b46d66d2797aa91d88a2dceb1b51c455dcd6707f756c71fdfa49654cdc3c3cda77edc98d84217b59f28b76 +v5.2.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh .* false ^$ f086d1f93b5d2f121cd5db820780ee39f5d11b8fe3ecee3680c0b589d4c16cbf0ddf45bac3b0f48c09995163f434f095a6cb8dc4b3722b3224d2ec015902df5e +v5.2.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh .* false ^$ 2c94d7a2366d08832fea2e32fc2a745cb1a7487f536a0d3e07d713ec2213d60539ee91550ddbf53918bb154d41352b7cacc753614199a574a853fceda8a6d223 +v5.2.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh .* false ^$ fe354f46dc1f162ecf1deb32537d5eeb6595462c065b7b3def95fef822c984c7b06f1855bbc3fc7e755c11d51897cb96444ce0f800ef639bed13e02e613f7a57 +v5.2.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh .* false ^$ dca4732acf4ce569322bc03c767627c3317a7dde25234c0364a12b0cd7befb69f14abb8bb3b5c8540c82743a03404e87e861002afc95167012204e62d00febc8 +v5.2.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh .* false ^$ 1524bc1a0339b3af7d9c9b5a1f83e619aa18ff8934a016f66e68664341d51e887abc08b98a74a0b0edaf880757e6e9a4e70454403d357fb06312d007dcaf1e3b +v5.2.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh .* false ^$ 486cb46b401ecb161b7b2f9f8923749c00d720cd42dbfe637bab10f7ee1653d86c698ddcacb4b73c20ff8de625946214a40fdd109eee6ae86ecce8e668240533 +v5.2.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh .* false ^$ c5bec4c9df903988019934bc1db45b628c46f05f9b7fb712807aa9d3f456bb373d364ca0a47e92fa7dc25c404d39bea9d96ec5cb767285ece64f18ed165b3ed7 +v5.2.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh .* false ^$ 1c4dd045c687d9cdde477037fc263c42bcf9bd2c4b5c14b0a2141693856cb08a897ac92de30e86981a3d000bea2bdc3fabcdbdafab69469054116310e6b70781 +v5.2.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh .* false ^$ 9229dd6a524fa903b0a32d816385a98c54c9f1eec6ff6058c8f3446a30debca89b8d901493f1b353c6c54149b086d1f662c00dd10eb02bd4606cbb9353155a67 +v5.2.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh .* false ^$ c19b896cd47d17e5d6b31c4ab4f7d13b0da6a00e358664d907910fcfc3a0adf2eab5d896c8dbbd252de3d0b180bf54e0bd6d22e4898a0ca0dc985bf496b15942 +v5.2.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh .* false ^$ 6a86c3a415a7bc1505e5f6196d26e9bd341382460a05187e729fd327db08d7890a18a70316d502a15f5cc0b5da0274520299d10c576c6ab816200c5ca64d5563 +v5.2.0 src/utility/secret-utils.sh ../lib/tegonal-scripts/src/utility/secret-utils.sh .* false ^$ f56af0fd2c1de116c22efb50b569cc40fe8e8e73c0e45d5cfb0072aa518c0ef1f264a21a8f7c1b18147fcc388a3ca887fcf7d7d5e0bba254e78ce9875679a6e3 +v5.2.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh .* false ^$ a0c93756a28d5a25b609c318f1adcaa558c930161e1fecb975188260971226b1976c8eabe52ed9d3c0c5ad9086f62621b4f0a0603841d452e3f74d37d475fba4 +v5.2.0 src/utility/string-utils.sh ../lib/tegonal-scripts/src/utility/string-utils.sh .* false ^$ 0e8aa8ab86a183783f3c4b4f3c4e1687a3aa61197f7ad131db0d9de4b3da03f3efdf3d669754693f9aed99047a1614d31353a873c32aa31111cdc530ba27492b +v5.2.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh .* false ^$ 553cfad39dc4dbb8703fb2503d5154c5831b5588ec74fa98a90feee2f36f36797bfc63119af59cfbf4cf7f89a85e056e548b5d02c0dc9db56df99c0f46f30e85 +v5.2.0 src/releasing ../lib/tegonal-scripts/src/releasing .* false ^$ is_a_tracking_directory +v5.2.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh .* false ^$ ab49e600a673eb9697aebfced61d02118413f6cb09d4d5fd0d63f80c7c2ef679b97baac153fd90ddcd03eb200024b3ae7cb5a19b5237f35c25fa37aaeb38ed91 +v5.2.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh .* false ^$ dc6d45e87f065f3929d451636311e5286dc93007987c48bab162cfde2a661637c90fac021405aecd0904a16c982a92c80644cfc292db2836066263cf3cfd33e9 +v5.2.0 src/releasing/params/after-version-update-hook.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/after-version-update-hook.default-args.source.sh .* false ^$ 48a99c33568d1d5a41e88e962095532a69e2652eaa761dde181fbf5642fcc93dcb6ebf1f3e504cf48b657706d9c46aed313eb385a4aea954191c621ba31c181d +v5.2.0 src/releasing/params/after-version-update-hook.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params-definition.source.sh .* false ^$ b98f43cccd0759ca762ec7ca425c86509b3df8e9fc614948497d323a242c075357252be4f21c6269df8c0c59b79509a72c35c817d8c2333bc6febf530857ff6d +v5.2.0 src/releasing/params/after-version-update-hook.params.source.sh ../lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params.source.sh .* false ^$ a0ff0a4dbaf8fb7ea597cb8dec914259cf5304b871edf982154b03a516b28b55b39d1b1c245e28ff8dcc9ba7eaef668fecfac93c9d4ed7999c8c463beeb6efd9 +v5.2.0 src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh .* false ^$ b782eec1aead7e0faaa62c60ef17b6fc6df6fb2406ebacb124fd4b5dd2e082566ca726860a4bae0d47c018bb70ec6ddd6639670544c60f3fb67444ad93b348c7 +v5.2.0 src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh .* false ^$ d5e18ad4b1b333d5b4f6ca46da8d7252d2882486a534cba9eb36fa36f07f4c45858739c7e390113ccac3995e4ac51077896d635f25692e8dc3ff4f41c1e369cf +v5.2.0 src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh .* false ^$ fdaccad3cb93cdeb5b2a110fdfe733815823eaf3042f15c4a07b4037cfdf6dee75e5f778760996d1bd44050c367672c1db10801fa97361bff9730de23152036f +v5.2.0 src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh .* false ^$ 639beeac6412d174fb2ee0a2c57b65f827ef37df8758859622d419a771294ff2ab244df7d723aac1be03f4a7c63386a2abd714d21117abcb73b15c950a83ac8f +v5.2.0 src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh .* false ^$ 0fffa441a7cedba7a0fa72d0b107217d5a376f63395ef707a4f9be9c3229c475e2d423175b640d9f67d15a8bd2032a51422d55fdb1704ed651b05ac0484a8a5f +v5.2.0 src/releasing/params/prepare-files-next-dev-cycle.params.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params.source.sh .* false ^$ 23df0720674eb6b775979ed9c039bbaf775f034ddaf152909502ea4bb2d41a4fe7a9c1990507e41c113985cc8cce7bc5954e36eb7c8316e3ec3a0a79674cdf40 +v5.2.0 src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh .* false ^$ 5e779e0c017a2a68a123347be8c02fe2bde6241133bd9f4147e0f59c2be8916bb8f217b65c59bab89fd7abd753b28b59593c9a4bf247dfee9353a4d70ad787b8 +v5.2.0 src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh .* false ^$ 180c3d975991d60c11b384bae10a0c58e349c309af2e23ec94c462f7f8e6f4fa92b67e395b906a9b053e1535af5828f1461ebf377cb85374504b08c7f7de5e02 +v5.2.0 src/releasing/params/prepare-next-dev-cycle-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params.source.sh .* false ^$ b4e047e4c52586395eef867f4ce7228747af1f4935dcf481b6c639c054d12714def796dc2823e6da7813c87bc5573af8a0dcc7e88b10c183e93559f571b380d7 +v5.2.0 src/releasing/params/release-files-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files-template.default-args.source.sh .* false ^$ 6755ec184a734da1f9b4829b746bdc6ec83efbc8541729245ea2a33ec30d0630d15f70aebe5c409c9c5605c6f4e1089a9ebf451382ae190aa3b12f80a944ba43 +v5.2.0 src/releasing/params/release-files-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files-template.params-definition.source.sh .* false ^$ 1466dc15e84ce5fd14204b63f1be0ecc2afc49b625c10997a8a1d8f82939b2d144ff7956c5eff1b8d47dd0e0f62004adde66b955d37ad172968037f6f9ede0d3 +v5.2.0 src/releasing/params/release-files-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files-template.params.source.sh .* false ^$ dcdf5354782c8bc6bc5f499f1363c0b5dc62c8a081600019bb2dce1c2da48019064b0f220a6ca038eaa26682e884a528284ec67639737f70c0014832022958c7 +v5.2.0 src/releasing/params/release-files.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files.default-args.source.sh .* false ^$ 724751ed975faf3f934442dc64840ee35062fb4070ad9cebdaf5390ab88522504ccccbbb844b9165c06291a3d108dea42be27b120fc7a5ee8d9ecda5409c5723 +v5.2.0 src/releasing/params/release-files.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files.params-definition.source.sh .* false ^$ 79c8899c903c82736b07231ceef43e26c1fcf23c1fdd7c0bdb7b4b37153968395dc72adc8959713a8d253b42336c71b3fb98f54a1d7cb263fb22059ababb1acc +v5.2.0 src/releasing/params/release-files.params.source.sh ../lib/tegonal-scripts/src/releasing/params/release-files.params.source.sh .* false ^$ d06cf84ad1f1261c316027f98c3ea640429c56bff8144966d56ea1a79194f7565853aa1c98f36b9c920dbc60c38cc0ea2e7b2271a576617f3930129bd4494177 +v5.2.0 src/releasing/params/release-template.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/release-template.default-args.source.sh .* false ^$ 57bd5d5c31f1208b6ab096883d258f8994e9de44fccf596117e8b9241934bc18c6ce4ea1688fe78687b0f19035c38d57f97f8f10bc95c56c7b9d6d6604cc843a +v5.2.0 src/releasing/params/release-template.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/release-template.params-definition.source.sh .* false ^$ cc671343603aa5d716e3938ede147b2e60314662f7a929fabb5bb8ca0567485198c7edaa18cc6d4dec9bc0cfb43e14b68560d6e02009eacb8e21fb87997a150f +v5.2.0 src/releasing/params/release-template.params.source.sh ../lib/tegonal-scripts/src/releasing/params/release-template.params.source.sh .* false ^$ ea8fec4299b68c9ab0391e3a9ddd4c7d8b0eb562b93e517bd2ebd0dba2ab269527457d523c4e12cf8653dbcffca90983234c997c5bc75664e0a4541666b71dcf +v5.2.0 src/releasing/params/update-version-common-steps.default-args.source.sh ../lib/tegonal-scripts/src/releasing/params/update-version-common-steps.default-args.source.sh .* false ^$ 665ebae201ca7b6aaf93835135b09671ebb0b92ecfd2edc73c3d5859ff8bb2f04bce2e041d8f77f7075e27dacccee9873c250cc83a838446985d97569a7c5b88 +v5.2.0 src/releasing/params/update-version-common-steps.params-definition.source.sh ../lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params-definition.source.sh .* false ^$ 90054631a04c4123082eccf1c97c442159972faa58c1b60b3665fc16e7f141cc83c34441873fd3d682e4a7d09622ee2fdd1d576b942769573a0a493035c10fc7 +v5.2.0 src/releasing/params/update-version-common-steps.params.source.sh ../lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params.source.sh .* false ^$ 041dd10cc40e42e8dec8d7e055d049f3ba1c5ff8fc9a90407e9892cd178b298ccb05c47aeab38a12fdde4bd9090c049597732d037c7f3d028eaf81b8062dfd39 +v5.2.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh .* false ^$ 1c0666ddca401ce4f9798dc5fc75a8239d4740ba3b60e08a3351a5cae288b7502ea7fe6b25d1daef5d99318d5db1e38b359db7b4e70a752bc36ebabacade0432 +v5.2.0 src/releasing/prepare-files-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle-template.sh .* false ^$ c3fd16991b13546280d5ca95fdb08554dc8a005cd5a2dd02bf488395e5512568faee45691c6b3616bbe011ce0db6560c1d7eef416126c698c28fbe301afe146e +v5.2.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh .* false ^$ 7e1eddca437a4493f9ad38d75e1fa7a607762c9678904b90e506f021af51bd5d3a07022968027af7d1972edaa0d6dea6cc551713b844f551b625a5dbfc0d76e4 +v5.2.0 src/releasing/release-files-template.sh ../lib/tegonal-scripts/src/releasing/release-files-template.sh .* false ^$ 02f8b3e89f08a85cd20410b8cba641185edbb0305b788efe568cbba7ab7e6483c5b7eb0bafb87971049d7f7e06678a777e73a27ecdbe95939377df34a42e5d07 +v5.2.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh .* false ^$ 8a9ce89b31d277d048fd0e7dc0546964b673c7db035d0b06d67ef204197f9a9cbbf2e366a2c1f0a64362bc2944e26e3e51cbe3b35898489c6e6af7480080619c +v5.2.0 src/releasing/sbt-publish-to-sonatype.sh ../lib/tegonal-scripts/src/releasing/sbt-publish-to-sonatype.sh .* false ^$ 5cd0cd95fecf1a058100f5eaf716fcd988ef1403541a77473e4da686643e0f871b99ba4f0812710d5dafc381212d0a4632b68080882dfca14c0dd89ea78a36b7 +v5.2.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh .* false ^$ 0ef29ab9580208bf72984d0d69482e402c734f65428194b229bd144d11ca18bcc4350065df229120df05da49c993e42479839b1d5bde5728bfd9cb54161abb94 +v5.2.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh .* false ^$ 9df42d38a3b02f7d681fe9a2fcf3ec9d5a556b4de17f08a032f66fe75b0ee0536a05940d90ddb74c43bb0d06dc7270ec11678828280d0df32c0e6601375094d6 +v5.2.0 src/releasing/update-ref-in-repo-urls.sh ../lib/tegonal-scripts/src/releasing/update-ref-in-repo-urls.sh .* false ^$ 7373897068e9ae30a84e730d5d5521097e2b62604997607e0c090d8400dc9c1a21b52c3514e791b0b515ac3d561994bb4254dfbf2d2da2f2150da24413836b94 +v5.2.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh .* false ^$ 8a54c0c5e7d2110f15ce3bbeb11ea31beddac16f41233f82795517b0995d1756ab718a36deb11df9393b123a0594ccef34c0138aaf7425c3c5f0a7d99ead9af6 +v5.2.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh .* false ^$ bb90da55cfb0f85dbbd94aa43d992fc39109c7990623946ddeec282527a197dc505d3b151fa4e512bde89269df3667120de42837aaaeb9dc66cca4d94a1ac171 +v5.2.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh .* false ^$ aa91f2cfae0c5f944692b8fa974c540b31136b338bb7889c4ba86aee26379311ba7a9a2e398743b8e1fd2566d91ec563d0d1af60119e74349aecf318d188494b +v5.2.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh .* false ^$ 7e91e1c2f1ef6a59b9dc425da6a710bdd79141c5610d4c927496f8ca6c528ac761bcfda699aae60ca0840622b16808a6f10aa8931c3164a21fde4caf52571e78 +v5.2.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh .* false ^$ df93751d0f1cfeafe30a0b1c881439cfde129a172aa36731487a02ca4c3414d91b8d2df7a036eab62a790db09357724646cd3cc8ccd2295b6a2f4f05299adac5 +v5.2.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh .* false ^$ d8d19a30cc12ba7d670dffdea0b105fdc920be7c8a65619c1eaa5d72acb3982b41431cc5a9cd09f35305f689ec15b9968ae647447efb8251db78730d3df80c4c +v5.2.0 src/ci/install-shfmt.sh ../lib/tegonal-scripts/src/ci/install-shfmt.sh .* false ^$ 6935d042c208b250285e8000309010c2eb115d5039bfde73b7a234ba82ed0151eecbb0e9ce216a5245db653f5affd17ecf4c93d352b39473ac17e2dd01a01ee9 +v5.2.0 src/qa/run-shfmt.sh ../lib/tegonal-scripts/src/qa/run-shfmt.sh .* false ^$ fd87184b0ed38f7fea7dc918d225919253c9411201f8798ca7fef5b91188b7924f68209ddc55d2f747a5e2a178200fa315a3fad078a152ee4793d7a1f7d08daf +v5.2.0 src/setup_tegonal_scripts.sh ../lib/tegonal-scripts/src/setup_tegonal_scripts.sh .* false ^$ 42d39c8fca103817d44e959267b733aaf54e462bd9e0055ca993cb876766be9193567390765f52c164e2858c33adbb0ec0fd2cd300c280dc787d502a0415cd69 +v5.2.0 src/qa/check-help-callable.sh ../lib/tegonal-scripts/src/qa/check-help-callable.sh .* false ^$ 5a22f89eaf367566418976220e3a3730788045552e581a7efb8263f0da3bd9c583a1918aa94f5d0d99bcfe36bb41831e0e658c9f04fcfb0c2ce9caddba50c6cc diff --git a/lib/tegonal-scripts/src/ci/install-shellcheck.sh b/lib/tegonal-scripts/src/ci/install-shellcheck.sh index e3f3980..5172ec8 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # installs shellcheck v0.11.0 into $HOME/.local/lib and sets up a symlink in $HOME/.local/bin @@ -42,56 +42,66 @@ function die() { exit 1 } -currentDir=$(pwd) -tmpDir=$(mktemp -d -t download-shellcheck-XXXXXXXXXX) || die "could not create a temp directory" -cd "$tmpDir" -shellcheckVersion="v0.11.0" -tarFile="shellcheck-$shellcheckVersion.linux.x86_64.tar.xz" -expectedSha="8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198 $tarFile" -echo "$expectedSha" >"$tarFile.sha256" +function main() { + local currentDir tmpDir shellcheckVersion tarFile expectedSha url + currentDir=$(pwd) + tmpDir=$(mktemp -d -t download-shellcheck-XXXXXXXXXX) || die "could not create a temp directory" + # shellcheck disable=SC2064 # we want to expand it here since the vars are local to main + trap "cd '$currentDir'; rm -rf '$tmpDir'" EXIT + cd "$tmpDir" + shellcheckVersion="v0.11.0" + tarFile="shellcheck-$shellcheckVersion.linux.x86_64.tar.xz" + expectedSha="8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198 $tarFile" + echo "$expectedSha" >"$tarFile.sha256" -url="https://github.com/koalaman/shellcheck/releases/download/$shellcheckVersion/$tarFile" -echo "going to download shellcheck $shellcheckVersion from: $url" -if command -v curl >/dev/null; then - curl --fail -L -O "$url" || die "could not download shellcheck" -else - # if curl does not exist, then we try it with wget - wget --no-verbose "$url" -fi -sha256sum -c "$tarFile.sha256" || { - actualSha="$(sha256sum "$tarFile")" - die "checksum did not match, aborting\nexpected:\n%s\ngiven :\n%s" "$expectedSha" "$actualSha" -} -tar -xf "./$tarFile" -chmod +x "./shellcheck-$shellcheckVersion/shellcheck" || die "could not make shellcheck executable" + url="https://github.com/koalaman/shellcheck/releases/download/$shellcheckVersion/$tarFile" + echo "going to download shellcheck $shellcheckVersion from: $url" + if command -v curl >/dev/null; then + curl --fail -L -O "$url" || die "could not download shellcheck" + else + # if curl does not exist, then we try it with wget + wget --no-verbose "$url" || die "could not download shellcheck" + fi + sha256sum -c "$tarFile.sha256" || { + local actualSha + actualSha="$(sha256sum "$tarFile")" + die "checksum did not match, aborting\nexpected:\n%s\ngiven :\n%s\n" "$expectedSha" "$actualSha" + } + tar -xf "./$tarFile" + chmod +x "./shellcheck-$shellcheckVersion/shellcheck" || die "could not make shellcheck executable" + + local shellcheckInTmp homeLocalBin homeLocalLib shellcheckInHomeLocalLib shellcheckBin + shellcheckInTmp="$tmpDir/shellcheck-$shellcheckVersion" + homeLocalBin="$HOME/.local/bin" + homeLocalLib="$HOME/.local/lib" + shellcheckInHomeLocalLib="$homeLocalLib/shellcheck-$shellcheckVersion" + shellcheckBin="$homeLocalBin/shellcheck" -shellcheckInTmp="$tmpDir/shellcheck-$shellcheckVersion" -homeLocalBin="$HOME/.local/bin" -homeLocalLib="$HOME/.local/lib" -shellcheckInHomeLocalLib="$homeLocalLib/shellcheck-$shellcheckVersion" -shellcheckBin="$homeLocalBin/shellcheck" + mkdir -p "$homeLocalBin" || die "was not able to create the bin directory %s" "$homeLocalBin" -mkdir -p "$homeLocalBin" || die "was not able to create the bin directory %s" "$homeLocalBin" + if [[ -d "$shellcheckInHomeLocalLib" ]]; then + echo "going to remove the existing installation in $shellcheckInHomeLocalLib" + rm -r "$shellcheckInHomeLocalLib" || die "was not able to remove a previous installation in %s" "$shellcheckInHomeLocalLib" + else + mkdir -p "$homeLocalLib" || die "was not able to create the installation directory %s" "$homeLocalLib" + fi + mv "$shellcheckInTmp" "$shellcheckInHomeLocalLib" + if [[ -f "$shellcheckBin" ]]; then + rm "$shellcheckBin" + fi + ln -s "$shellcheckInHomeLocalLib/shellcheck" "$shellcheckBin" -if [[ -d "$shellcheckInHomeLocalLib" ]]; then - echo "going to remove the existing installation in $shellcheckInHomeLocalLib" - rm -r "$shellcheckInHomeLocalLib" || die "was not able to remove a previous installation in %s" "$shellcheckInHomeLocalLib" -else - mkdir -p "$homeLocalLib" || die "was not able to create the installation directory %s" "$homeLocalLib" -fi -mv "$shellcheckInTmp" "$shellcheckInHomeLocalLib" -if [[ -f "$shellcheckBin" ]]; then - rm "$shellcheckBin" -fi -ln -s "$shellcheckInHomeLocalLib/shellcheck" "$shellcheckBin" + cd "$currentDir" -cd "$currentDir" + local shellcheckPath shellcheckCurrentVersion + shellcheckPath=$(command -v shellcheck) + if [[ $shellcheckPath != "$shellcheckBin" ]]; then + shellcheckCurrentVersion=$(shellcheck --version) + logError "was able to install shellcheck in %s but \`command -v shellcheck\` returns another path:\n%s\nFollowing the output of \`shellcheck --version\`:\n%s" "$shellcheckBin" "$shellcheckPath" "$shellcheckCurrentVersion" + else + shellcheck --version + printf "\033[0;32mSUCCESS\033[0m: installed shellcheck %s in %s\n" "$shellcheckVersion" "$homeLocalLib" + fi +} -shellcheckPath=$(command -v shellcheck) -if [[ $shellcheckPath != "$shellcheckBin" ]]; then - shellcheckCurrentVersion=$(shellcheck --version) - logError "was able to install shellcheck in %s but \`command -v shellcheck\` returns another path:\n%s\nFollowing the output of \`shellcheck --version\`:\n%s" "$shellcheckBin" "$shellcheckPath" "$shellcheckCurrentVersion" -else - shellcheck --version - printf "\033[0;32mSUCCESS\033[0m: installed shellcheck %s in %s\n" "$shellcheckVersion" "$homeLocalLib" -fi +main "$@" diff --git a/lib/tegonal-scripts/src/ci/install-shfmt.sh b/lib/tegonal-scripts/src/ci/install-shfmt.sh index a9bbdaf..c91873c 100755 --- a/lib/tegonal-scripts/src/ci/install-shfmt.sh +++ b/lib/tegonal-scripts/src/ci/install-shfmt.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # installs shfmt v3.12.0_linux_amd64 into $HOME/.local/bin @@ -42,47 +42,57 @@ function die() { exit 1 } -currentDir=$(pwd) -tmpDir=$(mktemp -d -t download-shfmt-XXXXXXXXXX) || die "could not create a temp directory" -cd "$tmpDir" -shfmtVersion="v3.12.0" -binFile="shfmt_${shfmtVersion}_linux_amd64" -expectedSha="d9fbb2a9c33d13f47e7618cf362a914d029d02a6df124064fff04fd688a745ea $binFile" -echo "$expectedSha" >"$binFile.sha256" +function main() { + local currentDir tmpDir shfmtVersion binFile expectedSha url + currentDir=$(pwd) + tmpDir=$(mktemp -d -t download-shfmt-XXXXXXXXXX) || die "could not create a temp directory" + # shellcheck disable=SC2064 # we want to expand it here since the vars are local to main + trap "cd '$currentDir'; rm -rf '$tmpDir'" EXIT + cd "$tmpDir" + shfmtVersion="v3.12.0" + binFile="shfmt_${shfmtVersion}_linux_amd64" + expectedSha="d9fbb2a9c33d13f47e7618cf362a914d029d02a6df124064fff04fd688a745ea $binFile" + echo "$expectedSha" >"$binFile.sha256" -url="https://github.com/mvdan/sh/releases/download/$shfmtVersion/$binFile" -echo "going to download shfmt $shfmtVersion from: $url" -if command -v curl >/dev/null; then - curl --fail -L -O "$url" || die "could not download shfmt" -else - # if curl does not exist, then we try it with wget - wget --no-verbose "$url" -fi -sha256sum -c "$binFile.sha256" || { - actualSha="$(sha256sum "$binFile")" - die "checksum did not match, aborting\nexpected:\n%s\ngiven :\n%s" "$expectedSha" "$actualSha" -} -chmod +x "./$binFile" || die "could not make shfmt executable" + url="https://github.com/mvdan/sh/releases/download/$shfmtVersion/$binFile" + echo "going to download shfmt $shfmtVersion from: $url" + if command -v curl >/dev/null; then + curl --fail -L -O "$url" || die "could not download shfmt" + else + # if curl does not exist, then we try it with wget + wget --no-verbose "$url" || die "could not download shfmt" + fi + sha256sum -c "$binFile.sha256" || { + local actualSha + actualSha="$(sha256sum "$binFile")" + die "checksum did not match, aborting\nexpected:\n%s\ngiven :\n%s" "$expectedSha" "$actualSha" + } + chmod +x "./$binFile" || die "could not make shfmt executable" + + local shfmtInTmp homeLocalBin shfmtBin + shfmtInTmp="$tmpDir/$binFile" + homeLocalBin="$HOME/.local/bin" + shfmtBin="$homeLocalBin/shfmt" -shfmtInTmp="$tmpDir/$binFile" -homeLocalBin="$HOME/.local/bin" -shfmtBin="$homeLocalBin/shfmt" + mkdir -p "$homeLocalBin" || die "was not able to create the bin directory %s" "$homeLocalBin" -mkdir -p "$homeLocalBin" || die "was not able to create the bin directory %s" "$homeLocalBin" + if [[ -f "$shfmtBin" ]]; then + echo "going to remove the existing installation in $homeLocalBin" + rm "$shfmtBin" || die "was not able to remove a previous installation in %s" "$homeLocalBin" + fi + mv "$shfmtInTmp" "$shfmtBin" -if [[ -f "$shfmtBin" ]]; then - echo "going to remove the existing installation in $homeLocalBin" - rm "$shfmtBin" || die "was not able to remove a previous installation in %s" "$homeLocalBin" -fi -mv "$shfmtInTmp" "$shfmtBin" + cd "$currentDir" -cd "$currentDir" + local shfmtPath shfmtCurrentVersion + shfmtPath=$(command -v shfmt) + if [[ $shfmtPath != "$shfmtBin" ]]; then + shfmtCurrentVersion=$(shfmt --version) + logError "was able to install shfmt in %s but \`command -v shfmt\` returns another path:\n%s\nFollowing the output of \`shfmt --version\`:\n%s" "$shfmtBin" "$shfmtPath" "$shfmtCurrentVersion" + else + shfmt --version + printf "\033[0;32mSUCCESS\033[0m: installed shfmt %s in %s\n" "$shfmtVersion" "$homeLocalBin" + fi +} -shfmtPath=$(command -v shfmt) -if [[ $shfmtPath != "$shfmtBin" ]]; then - shfmtCurrentVersion=$(shfmt --version) - logError "was able to install shfmt in %s but \`command -v shfmt\` returns another path:\n%s\nFollowing the output of \`shfmt --version\`:\n" "$shfmtBin" "$shfmtPath" "$shfmtCurrentVersion" -else - shfmt --version - printf "\033[0;32mSUCCESS\033[0m: installed shfmt %s in %s\n" "$shfmtVersion" "$homeLocalBin" -fi +main "$@" diff --git a/lib/tegonal-scripts/src/qa/check-help-callable.sh b/lib/tegonal-scripts/src/qa/check-help-callable.sh index bcf80c8..8ffb4bc 100755 --- a/lib/tegonal-scripts/src/qa/check-help-callable.sh +++ b/lib/tegonal-scripts/src/qa/check-help-callable.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.1.0 +# Version: v5.2.0 ####### Description ############# # # function which calls given scripts by passing --help and checks that the exit code is 99 as expected diff --git a/lib/tegonal-scripts/src/qa/run-shellcheck.sh b/lib/tegonal-scripts/src/qa/run-shellcheck.sh index 87e78a5..b781ab9 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # function which searches for *.sh files within defined paths (directories or a single *.sh) and @@ -19,7 +19,7 @@ # shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } # scriptsDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)" # # Assumes tegonal's scripts were fetched with gt - adjust location accordingly -# dir_of_tegonal_scripts="scriptsDir/../lib/tegonal-scripts/src" +# dir_of_tegonal_scripts="$scriptsDir/../lib/tegonal-scripts/src" # source "$dir_of_tegonal_scripts/setup_tegonal_scripts.sh" "$dir_of_tegonal_scripts" # source "$dir_of_tegonal_scripts/qa/run-shellcheck.sh" # diff --git a/lib/tegonal-scripts/src/qa/run-shfmt.sh b/lib/tegonal-scripts/src/qa/run-shfmt.sh index dd2731e..d0866d5 100755 --- a/lib/tegonal-scripts/src/qa/run-shfmt.sh +++ b/lib/tegonal-scripts/src/qa/run-shfmt.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # function which runs shfmt on defined paths, ignoring *.doc.sh files. diff --git a/lib/tegonal-scripts/src/releasing/common-constants.source.sh b/lib/tegonal-scripts/src/releasing/common-constants.source.sh index 7af2e01..a541f4d 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # constants intended to be sourced into a function @@ -39,6 +39,7 @@ local -r projectsRootDirParamDocu='(optional) The projects directory -- default: local -r additionalPatternParamPatternLong='--pattern' local -r additionalPatternParamPattern="-p|$additionalPatternParamPatternLong" local -r additionalPatternParamDocu='(optional) pattern which is used in a perl command (separator /) to search & replace additional occurrences. It should define two match groups and the replace operation looks as follows: '"\\\${1}\$version\\\${2}" +local -r additionalPatternDefaultArg='' local -r nextVersionParamPatternLong='--next-version' local -r nextVersionParamPattern="-nv|$nextVersionParamPatternLong" @@ -69,3 +70,7 @@ local -r afterVersionUpdateHookParamPatternLong='--after-version-update-hook' local -r afterVersionUpdateHookParamPattern="$afterVersionUpdateHookParamPatternLong" local -r afterVersionUpdateHookParamDocu="(optional) if defined, then this function is called after versions were updated and before calling beforePr. \ The following arguments are passed: $versionParamPatternLong version $projectsRootDirParamPatternLong projectsRootDir and $additionalPatternParamPatternLong additionalPattern" + +local -r repoUrlParamPatternLong='--repo-url' +local -r repoUrlParamPattern="$repoUrlParamPatternLong" +local -r repoUrlParamDocu='The url to the repo (e.g. https://github.com/tegonal/scripts)' 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 29a5775..c7f94d8 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # intended to be sourced into a function which expects params version and nextVersion diff --git a/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params-definition.source.sh index 122a354..7c7d639 100644 --- a/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for afterVersionUpdateHook functions diff --git a/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params.source.sh b/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params.source.sh index 2a36232..650c1ef 100644 --- a/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh index fc7a925..76946a9 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.default-args.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines default args for ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh index 24def54..82027b3 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for the function prepareFilesNextDevCycleTemplate diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh index c6715a3..a3595b8 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle-template.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh index 4e87536..a9e2c9e 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.default-args.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines default args for ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh index 584f345..07ec665 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for a prepareNextDevCycle function which is based on prepareNextDevCycleTemplate diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params.source.sh index 0bdac14..0d65a2e 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-files-next-dev-cycle.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh index 9a81bf1..0c7ed9b 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines default args for ...params-definition.source.sh @@ -15,8 +15,8 @@ ################################### { # shellcheck disable=SC2154 # it is assumed dir_of_tegonal_scripts is defined where this file is sourced - source "$dir_of_tegonal_scripts/releasing/params/update-version-common-steps.default-args.source.sh" || - traceAndDie "could not source update-version-common-steps.default-args.source.sh" + source "$dir_of_tegonal_scripts/releasing/params/after-version-update-hook.default-args.source.sh" || + traceAndDie "could not source after-version-update-hook.default-args.source.sh" } # Note, it is used in release-template.default-args.source.sh, if you should add default args which are only relevant diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh index 08ff9a9..7679abd 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for the function prepareNextDevCycleTemplate diff --git a/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params.source.sh b/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params.source.sh index 7886ab6..1d8a733 100644 --- a/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/prepare-next-dev-cycle-template.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/release-files-template.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/release-files-template.default-args.source.sh index 536d31d..7613549 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-files-template.default-args.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-files-template.default-args.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines default args for ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/release-files-template.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/release-files-template.params-definition.source.sh index 8f9e04b..184c3c5 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-files-template.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-files-template.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for the function releaseFilesTemplate diff --git a/lib/tegonal-scripts/src/releasing/params/release-files-template.params.source.sh b/lib/tegonal-scripts/src/releasing/params/release-files-template.params.source.sh index 6db3123..df18f30 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-files-template.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-files-template.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/release-files.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/release-files.default-args.source.sh index 9167a67..f9595dc 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-files.default-args.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-files.default-args.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines default args for ...params-definition.source.sh @@ -18,4 +18,9 @@ source "$dir_of_tegonal_scripts/releasing/params/release-files-template.default-args.source.sh" || traceAndDie "could not source release-files-template.default-args.source.sh" } -# currently release-files defines not more optional params than release-files-template, hence the above is enough +# currently release-files defines not more optional params than release-files-template, on the contrary, since don't +# want to expose all params to the user, we have to unset certain values which are set +# shellcheck disable=SC2154 # we assume default-args is sourced after params-definition +for var in "${releaseFiles_hideFromUser[@]}"; do + unset "$var" +done diff --git a/lib/tegonal-scripts/src/releasing/params/release-files.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/release-files.params-definition.source.sh index 1c92d00..0f00192 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-files.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-files.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for the a custom release function which is based on releaseFilesTemplate but wants to @@ -21,8 +21,11 @@ } local -a releaseFiles_sameAsFilesWithSomeExceptions=() -arrDropTuplesByKey releaseFilesTemplateParams 3 releaseFiles_sameAsFilesWithSomeExceptions \ +local releaseFiles_hideFromUser=( findForSigning prepareNextDevCycleFn afterVersionUpdateHook projectsRootDir additionalPattern +) +arrDropTuplesByKey releaseFilesTemplateParams 3 releaseFiles_sameAsFilesWithSomeExceptions \ + "${releaseFiles_hideFromUser[@]}" local -ra releaseFilesParams=( "${releaseFiles_sameAsFilesWithSomeExceptions[@]}" diff --git a/lib/tegonal-scripts/src/releasing/params/release-files.params.source.sh b/lib/tegonal-scripts/src/releasing/params/release-files.params.source.sh index a734c9b..e47def7 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-files.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-files.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/release-template.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/release-template.default-args.source.sh index 8db7026..09e2932 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-template.default-args.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-template.default-args.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines default args for ...params-definition.source.sh @@ -17,9 +17,8 @@ # deduces nextVersion based on version if not already set (and if version set) # shellcheck disable=SC2154 # it is assumed dir_of_tegonal_scripts is defined where this file is sourced source "$dir_of_tegonal_scripts/releasing/deduce-next-version.source.sh" || traceAndDie "could not source deduce-next-version.source.sh" - source "$dir_of_tegonal_scripts/releasing/params/prepare-next-dev-cycle-template.params.source.sh" || traceAndDie "could not source prepare-next-dev-cycle-template.params.source.sh" + source "$dir_of_tegonal_scripts/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh" || traceAndDie "could not source prepare-next-dev-cycle-template.default-args.source.sh" } if ! [[ -v branch ]]; then branch="main"; fi if ! [[ -v prepareOnly ]]; then prepareOnly=false; fi -if ! [[ -v beforePrFn ]]; then beforePrFn='beforePr'; fi if ! [[ -v prepareNextDevCycleFn ]]; then prepareNextDevCycleFn='prepareNextDevCycle'; fi diff --git a/lib/tegonal-scripts/src/releasing/params/release-template.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/release-template.params-definition.source.sh index 7cef91f..b000805 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-template.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-template.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for the function releaseTemplate diff --git a/lib/tegonal-scripts/src/releasing/params/release-template.params.source.sh b/lib/tegonal-scripts/src/releasing/params/release-template.params.source.sh index f150640..304fc37 100644 --- a/lib/tegonal-scripts/src/releasing/params/release-template.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/release-template.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh diff --git a/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.default-args.source.sh index 8dc8a79..5f9ef0e 100644 --- a/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.default-args.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.default-args.source.sh @@ -7,16 +7,17 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines default args for ...params-definition.source.sh for files which use the same arguments but allow optional # parameters (the afterVersionUpdateHook as such should not) # ################################### +{ + # shellcheck disable=SC2154 # it is assumed dir_of_tegonal_scripts is defined where this file is sourced + source "$dir_of_tegonal_scripts/releasing/params/after-version-update-hook.default-args.source.sh" || + traceAndDie "could not source after-version-update-hook.default-args.source.sh" +} -# Note, it is used in prepare-next-dev-cycle-template.default-args.source.sh, if you should add default args -# which are only relevant for update-version-common-steps then don't re-use in -# prepare-next-dev-cycle-template.default-args.source.sh any more. -if ! [[ -v projectsRootDir ]]; then projectsRootDir=$(realpath ".") || die "could not determine realpath of ."; fi -if ! [[ -v additionalPattern ]]; then additionalPattern="^$"; fi +# nothing in addition for now diff --git a/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params-definition.source.sh b/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params-definition.source.sh index d169c24..130c63e 100644 --- a/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params-definition.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params-definition.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines the parameters for the function releaseTemplate diff --git a/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params.source.sh b/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params.source.sh index eeb655d..57b45c1 100644 --- a/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params.source.sh +++ b/lib/tegonal-scripts/src/releasing/params/update-version-common-steps.params.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines local variables for the params defined in ...params-definition.source.sh 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 279976e..68b188c 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: v5.0.0 +# Version: v5.2.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 || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -99,7 +99,7 @@ function preReleaseCheckGit() { local tags tags=$(git tag) || die "The following command failed (see above): git tag" - if grep -q --fixed-strings --line-regexp "$version" <<<"$tags"; then + if grep -q --fixed-strings --line-regexp -e "$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-template.sh b/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle-template.sh index b0adcc6..3b421f9 100755 --- a/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle-template.sh +++ b/lib/tegonal-scripts/src/releasing/prepare-files-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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Prepare the next dev cycle for files based on conventions: @@ -60,7 +60,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -82,6 +82,9 @@ function prepareFilesNextDevCycleTemplate() { local -a prepareNextDevCycleTemplateArgs addLocalVarMatchingParamNamesToArgs prepareNextDevCycleTemplateParams prepareNextDevCycleTemplateArgs + local -a afterVersionHookArgs + addLocalVarMatchingParamNamesToArgs afterVersionHookParams afterVersionHookArgs + # those variables are used in local functions further below which will be called from releaseTemplate. # The problem: in case releaseTemplate defines a variable with the same name, then we would use those # variables instead of the one we define here, hence we prefix them to avoid this problem @@ -93,15 +96,16 @@ function prepareFilesNextDevCycleTemplate() { parseArguments afterVersionHookParams "" "$TEGONAL_SCRIPTS_VERSION" "$@" || return $? exitIfNotAllArgumentsSet afterVersionHookParams "" "$TEGONAL_SCRIPTS_VERSION" + local -a afterVersionHookArgs + addLocalVarMatchingParamNamesToArgs afterVersionHookParams afterVersionHookArgs + updateVersionScripts \ "$versionParamPatternLong" "$version-SNAPSHOT" \ "$additionalPatternParamPatternLong" "$additionalPattern" \ -d "$projectsRootDir/src" || return $? executeIfFunctionNameDefined "$prepare_files_next_dev_afterVersionUpdateHook" "$afterVersionUpdateHookParamPatternLong" \ - "$versionParamPatternLong" "$version" \ - "$projectsRootDirParamPatternLong" "$projectsRootDir" \ - "$additionalPatternParamPatternLong" "$additionalPattern" + "${afterVersionHookArgs[@]}" } prepareNextDevCycleTemplate \ 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 b95abd8..65e462f 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Prepares the next dev cycle based on conventions: @@ -49,7 +49,7 @@ # # # in case you want to provide your own prepare-next-dev-cycle.sh and only want to do some pre-configuration # # (such as specify the after-version-hook) then you might want to source it instead -# sourceOnce "$dir_of_tegonal_scripts/releasing/prepare-next-dev-cycle-template.sh.sh" +# sourceOnce "$dir_of_tegonal_scripts/releasing/prepare-next-dev-cycle-template.sh" # # # and then call the function with your pre-configuration settings: # # here we define the function which shall be used as after-version-update-hook after "$@", this way one cannot @@ -60,7 +60,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -74,28 +74,29 @@ sourceOnce "$dir_of_tegonal_scripts/releasing/update-version-common-steps.sh" function prepareNextDevCycleTemplate() { source "$dir_of_tegonal_scripts/releasing/params/prepare-next-dev-cycle-template.params.source.sh" || traceAndDie "could not source prepare-next-dev-cycle-template.params.source.sh" source "$dir_of_tegonal_scripts/releasing/params/prepare-next-dev-cycle-template.params-definition.source.sh" || traceAndDie "could not source prepare-next-dev-cycle-template.params-definition.source.sh" - parseArguments prepareNextDevCycleTemplateParams "" "$TEGONAL_SCRIPTS_VERSION" "$@" + parseArguments prepareNextDevCycleTemplateParams "" "$TEGONAL_SCRIPTS_VERSION" "$@" || return $? source "$dir_of_tegonal_scripts/releasing/params/prepare-next-dev-cycle-template.default-args.source.sh" || traceAndDie "could not source prepare-next-dev-cycle-template.default-args.source.sh" exitIfNotAllArgumentsSet prepareNextDevCycleTemplateParams "" "$TEGONAL_SCRIPTS_VERSION" exitIfArgIsNotVersion "$version" "$versionParamPatternLong" exitIfArgIsNotFunction "$beforePrFn" "$beforePrFnParamPatternLong" + exitIfPathNamedIsOutsideOfCurrentDir "$projectsRootDir" "$projectsRootDirParamPatternLong" exitIfGitHasChanges + local -a afterVersionHookArgs + addLocalVarMatchingParamNamesToArgs afterVersionHookParams afterVersionHookArgs + logInfo "prepare next dev cycle for version $version" local -r devVersion="$version-SNAPSHOT" updateVersionCommonSteps \ "$forReleaseParamPatternLong" false \ - "$versionParamPatternLong" "$devVersion" \ - "$projectsRootDirParamPatternLong" "$projectsRootDir" \ - "$additionalPatternParamPatternLong" "$additionalPattern" + "${afterVersionHookArgs[@]}" \ + "$versionParamPatternLong" "$devVersion" executeIfFunctionNameDefined "$afterVersionUpdateHook" "$afterVersionUpdateHookParamPatternLong" \ - "$versionParamPatternLong" "$version" \ - "$projectsRootDirParamPatternLong" "$projectsRootDir" \ - "$additionalPatternParamPatternLong" "$additionalPattern" + "${afterVersionHookArgs[@]}" # check if we accidentally have broken something, run formatting or whatever is done in beforePr "$beforePrFn" || return $? diff --git a/lib/tegonal-scripts/src/releasing/release-files-template.sh b/lib/tegonal-scripts/src/releasing/release-files-template.sh index d2ca9c4..e4435a8 100755 --- a/lib/tegonal-scripts/src/releasing/release-files-template.sh +++ b/lib/tegonal-scripts/src/releasing/release-files-template.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Releasing files based on conventions: @@ -75,7 +75,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -115,15 +115,16 @@ function releaseFilesTemplate() { parseArguments afterVersionHookParams "" "$TEGONAL_SCRIPTS_VERSION" "$@" || return $? exitIfNotAllArgumentsSet afterVersionHookParams "" "$TEGONAL_SCRIPTS_VERSION" + local -a afterVersionHookArgs + addLocalVarMatchingParamNamesToArgs afterVersionHookParams afterVersionHookArgs + updateVersionScripts \ "$versionParamPatternLong" "$version" \ "$additionalPatternParamPatternLong" "$additionalPattern" \ -d "$projectsRootDir/src" || return $? executeIfFunctionNameDefined "$release_files_afterVersionUpdateHook" "$afterVersionUpdateHookParamPatternLong" \ - "$versionParamPatternLong" "$version" \ - "$projectsRootDirParamPatternLong" "$projectsRootDir" \ - "$additionalPatternParamPatternLong" "$additionalPattern" + "${afterVersionHookArgs[@]}" } function releaseFilesTemplate_releaseHook() { diff --git a/lib/tegonal-scripts/src/releasing/release-template.sh b/lib/tegonal-scripts/src/releasing/release-template.sh index 37975b3..9ff0ae9 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Defines a release process template where some conventions are defined: @@ -80,7 +80,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -102,6 +102,10 @@ function releaseTemplate() { exitIfArgIsNotFunction "$releaseHook" "$releaseHookParamPatternLong" exitIfArgIsNotFunction "$beforePrFn" "$beforePrFnParamPatternLong" exitIfArgIsNotFunction "$prepareNextDevCycleFn" "$prepareNextDevCycleFnParamPatternLong" + exitIfPathNamedIsOutsideOfCurrentDir "$projectsRootDir" "$projectsRootDirParamPatternLong" + + local -a afterVersionHookArgs + addLocalVarMatchingParamNamesToArgs afterVersionHookParams afterVersionHookArgs preReleaseCheckGit \ "$versionParamPatternLong" "$version" \ @@ -112,14 +116,10 @@ function releaseTemplate() { updateVersionCommonSteps \ "$forReleaseParamPatternLong" true \ - "$versionParamPatternLong" "$version" \ - "$projectsRootDirParamPatternLong" "$projectsRootDir" \ - "$additionalPatternParamPatternLong" "$additionalPattern" + "${afterVersionHookArgs[@]}" executeIfFunctionNameDefined "$afterVersionUpdateHook" "$afterVersionUpdateHookParamPatternLong" \ - "$versionParamPatternLong" "$version" \ - "$projectsRootDirParamPatternLong" "$projectsRootDir" \ - "$additionalPatternParamPatternLong" "$additionalPattern" + "${afterVersionHookArgs[@]}" # run again since we made changes "$beforePrFn" || return $? @@ -137,13 +137,12 @@ function releaseTemplate() { git tag "$version" || die "could not create tag $version" fi - logInfo "Release completed, going to prepare next development cycle for %s by calling" "$nextVersion" \ - "$prepareNextDevCycleFn $versionParamPatternLong $nextVersion $additionalPatternParamPatternLong $additionalPattern $projectsRootDirParamPatternLong $projectsRootDir $beforePrFnParamPatternLong $beforePrFn" + logInfo "Release completed, going to prepare next development cycle for %s by calling %s" "$nextVersion" \ + "${afterVersionHookArgs[*]} $versionParamPatternLong $nextVersion $beforePrFnParamPatternLong $beforePrFn" "$prepareNextDevCycleFn" \ + "${afterVersionHookArgs[@]}" \ "$versionParamPatternLong" "$nextVersion" \ - "$additionalPatternParamPatternLong" "$additionalPattern" \ - "$projectsRootDirParamPatternLong" "$projectsRootDir" \ "$beforePrFnParamPatternLong" "$beforePrFn" || die "could not prepare next dev cycle for version %s" "$nextVersion" git push origin "$version" || die "could not push tag %s to origin" "$version" diff --git a/lib/tegonal-scripts/src/releasing/sbt-publish-to-sonatype.sh b/lib/tegonal-scripts/src/releasing/sbt-publish-to-sonatype.sh index f649933..52ac703 100755 --- a/lib/tegonal-scripts/src/releasing/sbt-publish-to-sonatype.sh +++ b/lib/tegonal-scripts/src/releasing/sbt-publish-to-sonatype.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Checks if (env) var SONATYPE_USER and SONATYPE_PW is set and if not ask the user to input them (via stdin). @@ -38,7 +38,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.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/sneak-peek-banner.sh b/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh index 9b4d36f..ed7374d 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Shows or hides the sneak peek banner @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.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 a48e84d..da9dd57 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Searches for ... as well as for @@ -36,7 +36,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.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 115a2f9..a7bc3dd 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: v5.0.0 +# Version: v5.2.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 || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -67,10 +67,11 @@ function updateVersionReadme() { parseArguments params "$examples" "$TEGONAL_SCRIPTS_VERSION" "$@" || return $? if ! [[ -v file ]]; then file="./README.md"; fi - if ! [[ -v additionalPattern ]]; then additionalPattern=""; fi + if ! [[ -v additionalPattern ]]; then additionalPattern="$additionalPatternDefaultArg"; fi exitIfNotAllArgumentsSet params "$examples" "$TEGONAL_SCRIPTS_VERSION" + [[ -f "$file" ]] || die "file not found (or not a regular file): %s" "$file" - echo "set version $version for Download badges and sneak peek banner in $file" + logInfo "set version $version for Download badges and sneak peek banner in $file" local -r versionWithoutLeadingV="${version:1}" @@ -81,7 +82,7 @@ function updateVersionReadme() { "$file" || returnDying "was not able to update the version in download badges and in the sneak peek banner" || return $? if [[ -n $additionalPattern ]]; then - echo "also going to search for $additionalPattern and replace with \${1}$version\${2}" + logInfo "also going to search for $additionalPattern and replace with \${1}$version\${2}" perl -0777 -i \ -pe "s/$additionalPattern/\${1}$version\${2}/g;" \ "$file" || returnDying "error during the additional replacement, see above" || return $? 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 e165d5a..cdaa2b2 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: v5.0.0 +# Version: v5.2.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 || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -75,7 +75,6 @@ function updateVersionCommonSteps() { parseArguments updateVersionCommonStepsParams "" "$TEGONAL_SCRIPTS_VERSION" "$@" || return $? source "$dir_of_tegonal_scripts/releasing/params/update-version-common-steps.default-args.source.sh" || traceAndDie "could not source update-version-common-steps.default-args.source.sh" exitIfNotAllArgumentsSet updateVersionCommonStepsParams "" "$TEGONAL_SCRIPTS_VERSION" - exitIfArgIsNotBoolean "$forRelease" "$forReleaseParamPatternLong" local -r projectsScriptsDir="$projectsRootDir/scripts" @@ -108,7 +107,10 @@ function updateVersionCommonSteps() { local -r templateDir="$projectsRootDir/./.github/ISSUE_TEMPLATE" if [[ -d "$templateDir" ]]; then - updateVersionIssueTemplates "$versionParamPatternLong" "$version" -d "$templateDir" + updateVersionIssueTemplates \ + "$versionParamPatternLong" "$version" \ + "$additionalPatternParamPatternLong" "$additionalPattern" \ + -d "$templateDir" || return $? fi fi } 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 3a9d1b9..c349171 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: v5.0.0 +# Version: v5.2.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 || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -69,29 +69,35 @@ function updateVersionIssueTemplates() { if ! [[ -v directory ]]; then directory="./.github/ISSUE_TEMPLATE"; fi if ! [[ -v additionalPattern ]]; then additionalPattern=""; fi exitIfNotAllArgumentsSet params "$examples" "$TEGONAL_SCRIPTS_VERSION" + exitIfArgIsNotVersion "$version" "$versionParamPatternLong" local where - if [[ -f $directory ]]; then + if [[ -d $directory ]]; then + where="directory $directory (and subdirectories)" + elif [[ -f $directory ]]; then where="file $directory" + elif [[ -e $directory ]]; then + die "the given --directory exists but is neither a directory nor a regular file, path was %s" "$directory" else - where="directory $directory (and subdirectories)" + die "the given --directory does not exist, was %s" "$directory" fi + echo "set version $version in issue templates in $where" if [[ -n $additionalPattern ]]; then echo "also going to search for $additionalPattern and replace with \${1}$version\${2}" fi - local script + local yaml find "$directory" '(' -name "*.yml" -o -name "*.yaml" ')' -print0 | - while read -r -d $'\0' script; do + while read -r -d $'\0' yaml; do perl -0777 -i \ -pe "s/(label:\s*Affected Version[\S\s]+placeholder:\s*)\"[^\"]+\"/\${1}\"$version\"/g;" \ - "$script" || returnDying "was not able to update the version in the issue templates" || return $? + "$yaml" || returnDying "was not able to update the version in the issue templates" || return $? if [[ -n $additionalPattern ]]; then perl -0777 -i \ -pe "s/$additionalPattern/\${1}$version\${2}/g;" \ - "$script" || returnDying "error during the additional replacement, see above" || return $? + "$yaml" || returnDying "error during the additional replacement, see above" || return $? fi done } diff --git a/lib/tegonal-scripts/src/releasing/update-version-scripts.sh b/lib/tegonal-scripts/src/releasing/update-version-scripts.sh index 649f19c..4be5e6f 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: v5.0.0 +# Version: v5.2.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 || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -67,16 +67,21 @@ function updateVersionScripts() { parseArguments params "$examples" "$TEGONAL_SCRIPTS_VERSION" "$@" || return $? if ! [[ -v directory ]]; then directory="./src"; fi - if ! [[ -v additionalPattern ]]; then additionalPattern=""; fi + if ! [[ -v additionalPattern ]]; then additionalPattern="$additionalPatternDefaultArg"; fi exitIfNotAllArgumentsSet params "$examples" "$TEGONAL_SCRIPTS_VERSION" local where - if [[ -f $directory ]]; then + if [[ -d $directory ]]; then + where="directory $directory (and subdirectories)" + elif [[ -f $directory ]]; then where="file $directory" + elif [[ -e $directory ]]; then + die "the given --directory exists but is neither a directory nor a regular file, path was %s" "$directory" else - where="directory $directory (and subdirectories)" + die "the given --directory does not exist, was %s" "$directory" fi - echo "set version $version in bash headers in $where" + + logInfo "set version %s in bash headers in %s" "$version" "$where" if [[ -n $additionalPattern ]]; then echo "also going to search for $additionalPattern and replace with \${1}$version\${2}" fi diff --git a/lib/tegonal-scripts/src/setup_tegonal_scripts.sh b/lib/tegonal-scripts/src/setup_tegonal_scripts.sh index b89bf92..edcc898 100644 --- a/lib/tegonal-scripts/src/setup_tegonal_scripts.sh +++ b/lib/tegonal-scripts/src/setup_tegonal_scripts.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.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 ccb56b1..c641b4e 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: v5.0.0 +# Version: v5.2.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 4f831bf..f2c335f 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: v5.0.0 +# Version: v5.2.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 96df887..2100211 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Functions to check declarations @@ -112,14 +112,8 @@ function checkArgIsArray() { # we are not failing (with || die...) on this line as the if will fail afterwards 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 - funcName=${FUNCNAME[2]} - fi - if [[ $funcName == "exitIfArgIsNotArrayOrIsEmpty" ]] || - [[ $funcName == "exitIfArgIsNotArrayOrIsNonEmpty" ]]; then - funcName=${FUNCNAME[3]} - fi + local funcName + funcName=$(getCallerFuncNameButIgnore "exitIfArgIsNotArray" "exitIfArgIsNotArrayOrIsEmpty" "exitIfArgIsNotArrayOrIsNonEmpty") traceAndReturnDying "the passed array \033[0;36m%s\033[0m is broken.\nThe %s argument to %s needs to be a non-associative array, given:\n%s" \ "${!checkArgIsArray_arr}" "$argNumberOrName" "$funcName" "$arrayDefinition" fi @@ -182,10 +176,8 @@ function checkArgIsArrayWithTuples() { exitIfArgIsNotFunction "$describeTupleFn" "$argNumberOrName" fi - local funcName=${FUNCNAME[1]} - if [[ $funcName == "exitIfArgIsNotArrayWithTuples" ]]; then - funcName=${FUNCNAME[2]} - fi + local funcName + funcName=$(getCallerFuncNameButIgnore "exitIfArgIsNotArrayWithTuples") local arrayDefinition arrayDefinition=$(recursiveDeclareP checkArgIsArrayWithTuples_paramArr) || traceAndDie "could not get array definition of %s" "${!checkArgIsArrayWithTuples_paramArr}" @@ -249,10 +241,8 @@ function checkArgIsFunction() { if ! declare -F "$name" >/dev/null; then local declareP declareP=$(declare -p "$name" || printf "failure: \033[0;36m%s\033[0m is not a variable\n" "$name") - local funcName=${FUNCNAME[1]} - if [[ $funcName == "exitIfArgIsNotFunction" ]]; then - funcName=${FUNCNAME[2]} - fi + local funcName + funcName=$(getCallerFuncNameButIgnore "exitIfArgIsNotFunction") traceAndReturnDying "the %s argument to %s needs to be a function/command, \033[0;36m%s\033[0m isn't one\nMaybe it is the name of a variable storing the name of a function?\nFollowing the output of: declare -p %s\n%s" \ "$argNumberOrName" "$funcName" "$name" "$name" "$declareP" fi @@ -269,10 +259,9 @@ function checkArgIsBoolean() { parseFnArgs params "$@" || return $? if ! [[ $value =~ ^(true|false)$ ]]; then - local funcName=${FUNCNAME[1]} - if [[ $funcName == "exitIfArgIsNotBoolean" ]]; then - funcName=${FUNCNAME[2]} - fi + local funcName + funcName=$(getCallerFuncNameButIgnore "exitIfArgIsNotBoolean") + traceAndReturnDying "the %s argument to %s needs to be a boolean (either true or false), %s isn't one" \ "$argNumberOrName" "$funcName" "$value" fi @@ -296,10 +285,9 @@ function checkArgIsVersion() { parseFnArgs params "$@" || return $? if ! [[ "$value" =~ $versionRegex ]]; then - local funcName=${FUNCNAME[1]} - if [[ $funcName == "exitIfArgIsNotVersion" ]]; then - funcName=${FUNCNAME[2]} - fi + local funcName + funcName=$(getCallerFuncNameButIgnore "exitIfArgIsNotVersion") + traceAndReturnDying "the %s argument to %s needs to match vX.Y.Z(-RC...) was %s" \ "$argNumberOrName" "$funcName" "$value" fi @@ -370,3 +358,43 @@ function checkPathNamedIsInsideOf() { function exitIfPathNamedIsOutsideOf() { checkPathNamedIsInsideOf "$@" || exit $? } + +function exitIfPathNamedIsOutsideOfCurrentDir() { + if ! [[ -v currentDir ]]; then + local currentDir + currentDir=$(pwd) || die "could not determine currentDir, maybe it does not exist anymore?" + local -r currentDir + fi + checkPathNamedIsInsideOf "$@" "$currentDir" || exit $? +} + +getCallerFuncNameButIgnore() { + local -a skipNames=("$@") + # 0 is getCallerFuncNameButIgnore itself, 1 is its caller and we want to get the caller of the caller + local index=2 + local funcName skip name + + while ((index < ${#FUNCNAME[@]})); do + funcName=${FUNCNAME[$index]} + skip=false + + if [[ $funcName == "source" ]]; then + skip=true + else + for name in "${skipNames[@]}"; do + if [[ $funcName == "$name" ]]; then + skip=true + break + fi + done + fi + + if [[ $skip == false ]]; then + echo "$funcName" + return 0 + fi + ((++index)) + done + + echo "" +} diff --git a/lib/tegonal-scripts/src/utility/cleanups.sh b/lib/tegonal-scripts/src/utility/cleanups.sh index 16fa868..9de2f34 100644 --- a/lib/tegonal-scripts/src/utility/cleanups.sh +++ b/lib/tegonal-scripts/src/utility/cleanups.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Functions which help in doing cleanup in e.g. scripts/cleanup-on-push-to-main.sh diff --git a/lib/tegonal-scripts/src/utility/date-utils.sh b/lib/tegonal-scripts/src/utility/date-utils.sh index b26662b..8024f46 100644 --- a/lib/tegonal-scripts/src/utility/date-utils.sh +++ b/lib/tegonal-scripts/src/utility/date-utils.sh @@ -5,7 +5,7 @@ # / __/ -_) _ `/ _ \/ _ \/ _ `/ / It is licensed under Apache License 2.0 # \__/\__/\_, /\___/_//_/\_,_/_/ Please report bugs and contribute back your improvements # /___/ -# Version: v5.0.0 +# Version: v5.2.0 # ####### Description ############# # diff --git a/lib/tegonal-scripts/src/utility/execute-if-defined.sh b/lib/tegonal-scripts/src/utility/execute-if-defined.sh index 9aa9063..300de33 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: v5.0.0 +# Version: v5.2.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 bd91c73..292f1a5 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: v5.0.0 +# Version: v5.2.0 # ####### Description ############# # @@ -133,7 +133,7 @@ function hasRemoteTag() { local output literalTag output=$(git ls-remote -t "$remote") || die "the following command failed (see above): git ls-remote -t \"$remote\"" literalTag=$(escapeRegex "refs/tags/$tag") || die "was not able to escape the following for regex: %s" "refs/tags/$tag" - grep -q -E "$literalTag\$" <<<"$output" + grep -q -E -e "$literalTag\$" <<<"$output" } function remoteTagsSorted() { @@ -158,7 +158,7 @@ function latestRemoteTag() { local -r remote=${1:-"origin"} local -r tagFilter=${2:-".*"} local tag - tag=$(remoteTagsSorted "$remote" | grep -P "$tagFilter" | tail -n 1) || die "could not get remote tags sorted for remote %s, see above" "$remote" + tag=$(remoteTagsSorted "$remote" | grep -P -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 e0829f7..5b8db3c 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: v5.0.0 +# Version: v5.2.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 4076d75..df4418c 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # utility function dealing with fetching files via http @@ -29,7 +29,7 @@ set -euo pipefail shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v5.0.0' +export TEGONAL_SCRIPTS_VERSION='v5.2.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 493b6ef..8878662 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # utility function dealing with Input/Output diff --git a/lib/tegonal-scripts/src/utility/log.sh b/lib/tegonal-scripts/src/utility/log.sh index c95b95b..af9bbee 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: v5.0.0 +# Version: v5.2.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 759b15a..f8e7ff9 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Intended to parse command line arguments. Provides a simple way to parse named arguments including a documentation diff --git a/lib/tegonal-scripts/src/utility/parse-commands.sh b/lib/tegonal-scripts/src/utility/parse-commands.sh index 3990483..a876da0 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: v5.0.0 +# Version: v5.2.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 54cc02d..8ad6481 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: v5.0.0 +# Version: v5.2.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 7ac8558..2d309da 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Utility functions for argument parser like function such as parse-args and parse-fn-args diff --git a/lib/tegonal-scripts/src/utility/recursive-declare-p.sh b/lib/tegonal-scripts/src/utility/recursive-declare-p.sh index ff0a237..df90a55 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: v5.0.0 +# Version: v5.2.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 cd90f7d..ecb50db 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Helper script to 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 9e95a20..699a3ef 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Helper script to replace a snippet in HTML based files (e.g. in a Markdown file). diff --git a/lib/tegonal-scripts/src/utility/secret-utils.sh b/lib/tegonal-scripts/src/utility/secret-utils.sh index cbb7498..2316140 100755 --- a/lib/tegonal-scripts/src/utility/secret-utils.sh +++ b/lib/tegonal-scripts/src/utility/secret-utils.sh @@ -5,7 +5,7 @@ # / __/ -_) _ `/ _ \/ _ \/ _ `/ / It is licensed under Apache License 2.0 # \__/\__/\_, /\___/_//_/\_,_/_/ Please report bugs and contribute back your improvements # /___/ -# Version: v5.0.0 +# Version: v5.2.0 # ####### Description ############# # diff --git a/lib/tegonal-scripts/src/utility/source-once.sh b/lib/tegonal-scripts/src/utility/source-once.sh index b6b7fca..a36c9b9 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: v5.0.0 +# Version: v5.2.0 ####### Description ############# # # Utility functions to source files but only if a certain guard is not defined. Sourcing happens inside the functions diff --git a/lib/tegonal-scripts/src/utility/string-utils.sh b/lib/tegonal-scripts/src/utility/string-utils.sh index 57756ba..bd30b7c 100644 --- a/lib/tegonal-scripts/src/utility/string-utils.sh +++ b/lib/tegonal-scripts/src/utility/string-utils.sh @@ -5,7 +5,7 @@ # / __/ -_) _ `/ _ \/ _ \/ _ `/ / It is licensed under Apache License 2.0 # \__/\__/\_, /\___/_//_/\_,_/_/ Please report bugs and contribute back your improvements # /___/ -# Version: v5.0.0 +# Version: v5.2.0 # ####### Description ############# # @@ -25,7 +25,7 @@ # # will output v4\.2\.0 # escapeRegex "v4.2.0" # -# # useful in combination with grep which does not support literal searches: +# # Useful with grep -E, which does not support \Q...\E for quoting literal strings: # # escapes to tegonal\+ # pattern=$(escapeRegex "tegonal+") # grep -E "$pattern" diff --git a/lib/tegonal-scripts/src/utility/update-bash-docu.sh b/lib/tegonal-scripts/src/utility/update-bash-docu.sh index 2cad968..36e1bd6 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: v5.0.0 +# Version: v5.2.0 # ####### Description ############# # From 24674f9d58e949360cb96f54dbb4079537a19b0e Mon Sep 17 00:00:00 2001 From: robstoll <5557885+robstoll@users.noreply.github.com> Date: Mon, 19 Oct 2026 12:07:22 +0000 Subject: [PATCH 2/2] update files of remote tegonal-scripts to version(s) v5.2.0 via gt --- ...version-update-hook.default-args.source.sh | 20 +++++ .../src/releasing/update-ref-in-repo-urls.sh | 74 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 lib/tegonal-scripts/src/releasing/params/after-version-update-hook.default-args.source.sh create mode 100755 lib/tegonal-scripts/src/releasing/update-ref-in-repo-urls.sh diff --git a/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.default-args.source.sh b/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.default-args.source.sh new file mode 100644 index 0000000..8973c6f --- /dev/null +++ b/lib/tegonal-scripts/src/releasing/params/after-version-update-hook.default-args.source.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2034,SC2168 +# +# __ __ +# / /____ ___ ____ ___ ___ _/ / This script is provided to you by https://github.com/tegonal/scripts +# / __/ -_) _ `/ _ \/ _ \/ _ `/ / Copyright 2022 Tegonal Genossenschaft +# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 +# /___/ Please report bugs and contribute back your improvements +# +# Version: v5.2.0 +####### Description ############# +# +# Defines default args for ...params-definition.source.sh for files which use the same arguments but allow optional +# parameters (the afterVersionUpdateHook as such should not) +# +################################### + +if ! [[ -v projectsRootDir ]]; then projectsRootDir=$(realpath ".") || die "could not determine realpath of ."; fi +# shellcheck disable=SC2154 # defined in common-constants which we assume is sourced when this file is sourced +if ! [[ -v additionalPattern ]]; then additionalPattern="$additionalPatternDefaultArg"; fi diff --git a/lib/tegonal-scripts/src/releasing/update-ref-in-repo-urls.sh b/lib/tegonal-scripts/src/releasing/update-ref-in-repo-urls.sh new file mode 100755 index 0000000..b6db56b --- /dev/null +++ b/lib/tegonal-scripts/src/releasing/update-ref-in-repo-urls.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# +# __ __ +# / /____ ___ ____ ___ ___ _/ / This script is provided to you by https://github.com/tegonal/scripts +# / __/ -_) _ `/ _ \/ _ \/ _ `/ / Copyright 2022 Tegonal Genossenschaft +# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 +# /___/ Please report bugs and contribute back your improvements +# +# Version: v5.2.0 +####### Description ############# +# +# Searches for /slug/ and replaces it with /slug/ +# +####### Usage ################### +# +# #!/usr/bin/env bash +# set -euo pipefail +# shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } +# # Assumes tegonal's scripts were fetched with gt - adjust location accordingly +# dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/../lib/tegonal-scripts/src" +# source "$dir_of_tegonal_scripts/setup_tegonal_scripts.sh" "$dir_of_tegonal_scripts" +# +# # replaces all urls matching https://github.com/tegonal/scripts/(blob|tree)/main/... +# # with https://github.com/tegonal/scripts/$1/v1.5.0/... in README.md +# "$dir_of_tegonal_scripts/releasing/update-ref-in-repo-urls.sh" \ +# --repo-url 'https://github.com/tegonal/scripts/' \ +# --from-ref main --to-ref v1.5.0 +# +# # if you use it in combination with other files, then you might want to source it instead +# sourceOnce "$dir_of_tegonal_scripts/releasing/update-ref-in-repo-urls.sh" +# +# # replaces all urls matching https://gitlab.com/foo/bar/-/(blob|tree)/v1.5.0/... +# # with https://gitlab.com/foo/bar/-/$1/develop/... in README.md +# updateRefInRepoUrls \ +# --repo-url 'https://gitlab.com/foo/bar/' \ +# --from-ref v1.5.0 --to-ref develop +# +################################### +set -euo pipefail +shopt -s inherit_errexit || { echo >&2 "please update to bash 5, see errors above" && exit 1; } +unset CDPATH +export TEGONAL_SCRIPTS_VERSION='v5.2.0' + +if ! [[ -v dir_of_tegonal_scripts ]]; then + dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." + source "$dir_of_tegonal_scripts/setup_tegonal_scripts.sh" "$dir_of_tegonal_scripts" +fi +sourceOnce "$dir_of_tegonal_scripts/utility/parse-args.sh" + +function updateRefInRepoUrls() { + source "$dir_of_tegonal_scripts/releasing/common-constants.source.sh" || traceAndDie "could not source common-constants.source.sh" + + local fromRef toRef repoUrl file + # shellcheck disable=SC2034 # is passed by name to parseArguments + local -ra params=( + repoUrl "$repoUrlParamPattern" "$repoUrlParamDocu" + fromRef '--from-ref' 'The ref to search for (e.g. main or a tag such as v1.2.0)' + toRef '--to-ref' 'The ref which replaces --from-ref' + file '-f|--file' '(optional) the file where search & replace shall be done -- default: ./README.md' + ) + + parseArguments params "" "$TEGONAL_SCRIPTS_VERSION" "$@" || return $? + if ! [[ -v file ]]; then file="./README.md"; fi + exitIfNotAllArgumentsSet params "" "$TEGONAL_SCRIPTS_VERSION" + [[ -f "$file" ]] || die "file not found (or not a regular file): %s" "$file" + + logInfo "update ref %s with ref %s in repo urls %s" "$fromRef" "$toRef" "$repoUrl" + + # gitlab has /-/ after the repos name + REPO_URL="${repoUrl%/}" FROM_REF="$fromRef" TO_REF="$toRef" \ + perl -0777 -i -pe 's{(\Q$ENV{REPO_URL}\E(/-)?/[\w.-]+/)\Q$ENV{FROM_REF}\E(?!\.?[\w-])}{$1$ENV{TO_REF}}g' "$file" +} +${__SOURCED__:+return} +updateRefInRepoUrls "$@"