├── .editorconfig ├── .github └── workflows │ ├── release.yaml │ └── test.yaml ├── .gitmodules ├── LICENSE ├── README.md ├── _static ├── demo.gif └── logo.svg ├── gah ├── test ├── 00_utils.bats ├── 01_regexp_functions.bats ├── 02_github_api_functions.bats ├── fixtures │ └── releases │ │ ├── _error │ │ └── release.json │ │ ├── argocd │ │ └── release.json │ │ ├── fetch-release-files.sh │ │ ├── gh │ │ └── release.json │ │ ├── goss │ │ └── release.json │ │ ├── helm │ │ └── release.json │ │ ├── k9s │ │ └── release.json │ │ ├── kops │ │ └── release.json │ │ ├── sops │ │ └── release.json │ │ ├── terragrunt │ │ └── release.json │ │ ├── tofu │ │ └── release.json │ │ └── trufflehog │ │ └── release.json └── test_helper │ └── common.bash └── tools └── install.sh /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | max_line_length = 120 10 | tab_width = 4 11 | 12 | [{gah,*.sh,*.bash,*.bats}] 13 | indent_style = tab 14 | 15 | [*.md] 16 | indent_size = 2 17 | 18 | [*.yaml] 19 | indent_size = 2 20 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: 📦 Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | test: 10 | uses: ./.github/workflows/test.yaml 11 | 12 | release: 13 | needs: test 14 | runs-on: ubuntu-latest 15 | 16 | permissions: 17 | contents: write 18 | 19 | steps: 20 | - name: Get next version 21 | id: semver 22 | uses: ietf-tools/semver-action@v1 23 | with: 24 | token: ${{ github.token }} 25 | branch: ${{ github.ref_name }} 26 | noNewCommitBehavior: current 27 | noVersionBumpBehavior: patch 28 | 29 | - name: Checkout 30 | uses: actions/checkout@v4 31 | 32 | - name: Bump version 33 | uses: mingjun97/file-regex-replace@v1 34 | with: 35 | regex: '^VERSION="v?[0-9\.]+"' 36 | replacement: 'VERSION="${{ steps.semver.outputs.next }}"' 37 | include: 'gah' 38 | flags: 'gm' 39 | 40 | - name: Commit and push 41 | uses: EndBug/add-and-commit@v9 42 | with: 43 | add: gah 44 | message: "version: Update to ${{ steps.semver.outputs.next }} [skip ci]" 45 | author_name: github-actions[bot] 46 | author_email: github-actions[bot]@users.noreply.github.com 47 | 48 | - name: Create Changelog 49 | id: changelog 50 | uses: requarks/changelog-action@v1 51 | with: 52 | token: ${{ github.token }} 53 | fromTag: ${{ github.ref_name }} 54 | toTag: ${{ steps.semver.outputs.current }} 55 | writeToFile: false 56 | excludeTypes: build,docs,style,version 57 | includeInvalidCommits: true 58 | 59 | - name: Release 60 | uses: ncipollo/release-action@v1 61 | with: 62 | token: ${{ github.token }} 63 | tag: ${{ steps.semver.outputs.next }} 64 | body: ${{ steps.changelog.outputs.changes }} 65 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: 🧪 Test 2 | 3 | on: 4 | workflow_call: 5 | push: 6 | branches-ignore: 7 | - master 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v4 15 | with: 16 | submodules: true 17 | 18 | - name: Test 19 | shell: bash 20 | run: ./test/bats/bin/bats ./test 21 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test/bats"] 2 | path = test/bats 3 | url = https://github.com/bats-core/bats-core.git 4 | [submodule "test/test_helper/bats-support"] 5 | path = test/test_helper/bats-support 6 | url = https://github.com/bats-core/bats-support.git 7 | [submodule "test/test_helper/bats-assert"] 8 | path = test/test_helper/bats-assert 9 | url = https://github.com/bats-core/bats-assert.git 10 | [submodule "test/test_helper/bats-mock"] 11 | path = test/test_helper/bats-mock 12 | url = https://github.com/buildkite-plugins/bats-mock.git 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![gah! logo](./_static/logo.svg) 2 | 3 | `gah` is an GitHub Releases app installer, that **DOES NOT REQUIRE SUDO**! It is a simple bash script that downloads the latest release of an app from GitHub and installs it in `~/.local/bin`. It is designed to be used with apps that are distributed as a single binary file. 4 | 5 | Features: 6 | 7 | - Downloads the latest or given release of an app from GitHub 8 | - Automatically selects matching binary for the current platform 9 | 10 | - Supported OS: Linux and MacOS 11 | - Supported architectures: x64 and ARM64 12 | 13 | - Supports multiple matching apps in a single GitHub Release 14 | - Supports archived (`.zip`, `.tar.gz`, `.tar.bz2`, `.tar.xz`) and single binary releases 15 | - Has own base of predefined aliases for GitHub repositories (PRs are welcome!) 16 | 17 | ## Installation 18 | 19 | ```bash 20 | bash -c "$(curl -fsSL https://raw.githubusercontent.com/marverix/gah/refs/heads/master/tools/install.sh)" 21 | ``` 22 | 23 | ## Usage 24 | 25 | ![gah demo](./_static/demo.gif) 26 | 27 | Type `gah help` to see the list of available commands. 28 | 29 | ```text 30 | gah 31 | install [--tag=] [--use-default-names] 32 | aliases 33 | help 34 | version 35 | ``` 36 | 37 | ### Using known aliases 38 | 39 | `gah` has a predefined set of aliases for some popular apps. You can use these aliases to install the apps without specifying the full GitHub repository name. 40 | To see the list of available aliases, type `gah aliases show`. 41 | 42 | The file `db.json` with aliases is located in [db branch](https://github.com/marverix/gah/blob/db/db.json). Feel free to add your own aliases or suggest new ones by creating a pull request. 43 | 44 | The file is cached locally for 24h. 45 | 46 | ### Specifying the tag 47 | 48 | You can specify the tag of the release you want to install. If you don't specify a tag, the latest release will be installed. 49 | 50 | ```bash 51 | gah install getsops/sops --tag=v3.10.2 52 | ``` 53 | 54 | ### Unattended mode 55 | 56 | `gah` will try to detect if your terminal supports input or not. To force this behavior you can either use the `--unattended` flag or set env var `UNATTENDED=true`. 57 | This will skip the confirmation prompt and install the app without asking for any input. 58 | 59 | ```bash 60 | gah install getsops/sops --unattended 61 | ``` 62 | 63 | or 64 | 65 | ```bash 66 | export UNATTENDED=true 67 | gah install getsops/sops 68 | ``` 69 | 70 | ### Update gah 71 | 72 | ```sh 73 | gah update 74 | ``` 75 | 76 | ## Examples 77 | 78 | ### Install latest version of gh (GitHub CLI) 79 | 80 | ```bash 81 | gah install gh 82 | ``` 83 | 84 | ### Install specific version of argocd 85 | 86 | ```bash 87 | gah install argocd v2.0.3 88 | ``` 89 | 90 | ### Install an app that is not in the predefined aliases 91 | 92 | ```bash 93 | gah install hashicorp/vagrant 94 | ``` 95 | 96 | ## Configuration 97 | 98 | Here is the list of supported environment variables: 99 | 100 | Name | Description | Default 101 | ---|---|--- 102 | `GAH_INSTALL_DIR` | The directory where the gah will install your applications. This directory must be in your `PATH` environment variable. | `~/.local/bin`, for superuser it will be `/usr/local/bin` 103 | `GAH_CACHE_DIR` | The directory where cache will be stored. | `~/.cache/gah` 104 | 105 | ## License 106 | 107 | gah is licensed under the GPL-3.0 License. See [LICENSE](./LICENSE) for the full license text. 108 | -------------------------------------------------------------------------------- /_static/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marverix/gah/d1a9ca2900df2ec9ebe8cc48ba7f7cce7520db71/_static/demo.gif -------------------------------------------------------------------------------- /_static/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | gah logo 17 | 19 | 21 | 26 | 30 | 34 | 35 | 36 | 38 | 39 | 41 | gah logo 42 | 04.12.2024 43 | 44 | 45 | Marek Sierociński 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /gah: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # gah! Get App Homie! 4 | # 5 | # @author Marek `marverix` Sierociński 6 | # @license GNU GPLv3 7 | 8 | # Pipeline mode 9 | set -e 10 | 11 | #-------------------------------------------------- 12 | #region Constants 13 | 14 | VERSION="v1.2.0" 15 | HELP_STRING="Type 'gah help' to show help." 16 | 17 | if [ ! -t 0 ]; then 18 | UNATTENDED="true" 19 | fi 20 | 21 | if [[ -z "$GAH_CACHE_DIR" ]]; then 22 | GAH_CACHE_DIR="$HOME/.cache/gah" 23 | fi 24 | 25 | if [[ -z "$GAH_INSTALL_DIR" ]]; then 26 | if [[ "$EUID" -ne 0 ]]; then 27 | GAH_INSTALL_DIR="$HOME/.local/bin" 28 | else 29 | GAH_INSTALL_DIR="/usr/local/bin" 30 | fi 31 | fi 32 | 33 | GAH_DB_FILE="$GAH_CACHE_DIR/db.json" 34 | 35 | #endregion 36 | #-------------------------------------------------- 37 | #region Variables 38 | 39 | tmp_dir="" 40 | 41 | #endregion 42 | #-------------------------------------------------- 43 | #region Utils 44 | 45 | function print_blue() { 46 | echo -e "\033[0;34m$1\033[0m" 47 | } 48 | 49 | function print_green() { 50 | echo -e "\033[0;32m$1\033[0m" 51 | } 52 | 53 | function print_yellow() { 54 | echo -e "\033[0;33m$1\033[0m" 55 | } 56 | 57 | function throw_error() { 58 | echo -e "\033[0;31mError: $2\033[0m" >&2 59 | exit $1 60 | } 61 | 62 | function print_debug() { 63 | if [[ "$DEBUG" == "true" ]]; then 64 | echo -e "[DEBUG] $1" >&2 65 | fi 66 | } 67 | 68 | function cleanup() { 69 | if [[ -n "$tmp_dir" && -d "$tmp_dir" ]]; then 70 | rm -fr "$tmp_dir" 71 | fi 72 | } 73 | 74 | #endregion 75 | #-------------------------------------------------- 76 | #region RegExp functions 77 | 78 | EXT_ZIP="\.zip" 79 | EXT_TAR="\.tar\.gz|\.tar\.xz|\.tar\.bz2" 80 | EXT_ALL_ARCHIVES="$EXT_ZIP|$EXT_TAR" 81 | 82 | REGEXP_EXT_ZIP=".+(${EXT_ZIP})$" 83 | REGEXP_EXT_TAR=".+(${EXT_TAR})$" 84 | 85 | REGEXP_SKIP_FILES="^(license|readme|changelog).*|.*\.(md|txt)$" 86 | 87 | function get_os() { 88 | print_debug "Checking OS type" 89 | case $(uname -s) in 90 | Linux*) echo "linux" ;; 91 | Darwin*) echo "macos" ;; 92 | *) echo "NOT_SUPPORTED" ;; 93 | esac 94 | } 95 | 96 | function get_os_regexp_part() { 97 | case $(get_os) in 98 | linux) echo '[._-](unknown[._-])?(linux|linux-gnu|linux-musl)' ;; 99 | macos) echo '[._-](apple[._-])?(darwin|macos)' ;; 100 | *) throw_error 10 "Your OS type is not supported" ;; 101 | esac 102 | } 103 | 104 | function get_arch() { 105 | print_debug "Checking CPU architecture" 106 | case $(uname -m) in 107 | x86_64|amd64) echo "amd64" ;; 108 | arm64|aarch64|armv8) echo "arm64" ;; 109 | *) echo "NOT_SUPPORTED" ;; 110 | esac 111 | } 112 | 113 | function get_arch_regexp_part() { 114 | case $(get_arch) in 115 | amd64) echo '[._-](amd64|x86_64|universal)' ;; 116 | arm64) echo '[._-](arm64|aarch64|universal)' ;; 117 | *) throw_error 11 "Your CPU/OS architecture is not supported" ;; 118 | esac 119 | } 120 | 121 | function get_filename_regexp() { 122 | local name_regexp_part='([a-z][a-z0-9_-]+?)' 123 | local version_regexp_part='([_-]v?[0-9.]+)?' 124 | local os_regexp_part=$(get_os_regexp_part) 125 | local arch_regexp_part=$(get_arch_regexp_part) 126 | 127 | local regexp="${name_regexp_part}${version_regexp_part}" 128 | regexp+="(${os_regexp_part}${arch_regexp_part}|${arch_regexp_part}${os_regexp_part})" 129 | regexp+="(${EXT_ALL_ARCHIVES})?" 130 | echo "$regexp" 131 | } 132 | 133 | function get_name_regexp() { 134 | echo "^$(get_filename_regexp)\$" 135 | } 136 | 137 | function get_md_url_regexp() { 138 | echo "\(https:\/\/[a-z0-9.\/]+\/$(get_filename_regexp)\)" 139 | } 140 | 141 | #endregion 142 | #-------------------------------------------------- 143 | #region GitHub API functions 144 | 145 | function get_fetch_release_info_url() { 146 | local suffix="latest" 147 | if [[ -n "$2" && "$2" != "latest" ]]; then 148 | suffix="tags/$2" 149 | fi 150 | 151 | echo "https://api.github.com/repos/$1/releases/$suffix" 152 | } 153 | 154 | function fetch_release_info() { 155 | local url=$(get_fetch_release_info_url "$1" "$2") 156 | print_debug "Fetching release information from: $url" 157 | 158 | curl -s "$url" > release.json 159 | 160 | local err_status=$(jq -r '.status' release.json) 161 | print_debug "Error status: $err_status" 162 | 163 | if [[ "$err_status" != "null" ]]; then 164 | throw_error 13 "Couldn't fetch release information.\nResponse from GitHub API: [$err_status] $(jq -r '.message' release.json)" 165 | fi 166 | 167 | local release_name=$(jq -r '.name' release.json) 168 | print_green "Found release: $release_name" 169 | } 170 | 171 | function find_download_url() { 172 | local release_json="$1" 173 | 174 | # First try to find the matching file in the assets 175 | local regexp=$(get_name_regexp) 176 | local found="false" 177 | 178 | print_debug "Regexp: $regexp" 179 | 180 | for name in $(jq -r '.assets[].name' "$release_json"); do 181 | local lower_name=$(echo "$name" | tr '[A-Z]' '[a-z]') 182 | if [[ "$lower_name" =~ $regexp ]]; then 183 | print_debug " $name ... Match!" 184 | found="true" 185 | jq -r --arg name "$name" '.assets[] | select(.name == $name) | .browser_download_url' "$release_json" 186 | else 187 | print_debug " $name ... Doesn't match" 188 | fi 189 | done 190 | 191 | # If asset matched, return 192 | if [[ "$found" == "true" ]]; then 193 | return 194 | fi 195 | 196 | # If no asset matched, try to find the download URL in the release body 197 | print_debug "No asset matched, trying to find download URL in the release body" 198 | 199 | regexp=$(get_md_url_regexp) 200 | print_debug "URL Regexp: $regexp" 201 | 202 | jq -r '.body' "$release_json" | while read -r line; do 203 | lower_line=$(echo "$line" | tr '[A-Z]' '[a-z]') 204 | if [[ "$lower_line" =~ $regexp ]]; then 205 | print_debug " $line ... Match!" 206 | line="${BASH_REMATCH[0]}" 207 | line=${line:1} 208 | line=${line::-1} 209 | echo $line 210 | else 211 | print_debug " $line ... Doesn't match" 212 | fi 213 | done 214 | } 215 | 216 | #endregion 217 | #-------------------------------------------------- 218 | #region DB functions 219 | 220 | function fetch_db() { 221 | print_debug "Fetching DB" 222 | curl -s "https://raw.githubusercontent.com/marverix/gah/refs/heads/db/db.json" > "$GAH_DB_FILE" 223 | } 224 | 225 | function get_db_path() { 226 | if [[ ! -f "$GAH_DB_FILE" ]] || test "$(find "$GAH_DB_FILE" -mmin +1440)"; then 227 | fetch_db 228 | fi 229 | 230 | echo "$GAH_DB_FILE" 231 | } 232 | 233 | function get_known_alias() { 234 | jq -r --arg x "$1" '.aliases[$x]' "$(get_db_path)" 235 | } 236 | 237 | #endregion 238 | #-------------------------------------------------- 239 | #region Other functions 240 | 241 | function semver_to_number() { 242 | if [[ "$1" =~ ^v ]]; then 243 | local version=${1:1} 244 | else 245 | local version="$1" 246 | fi 247 | local major=$(echo "$version" | cut -d '.' -f 1) 248 | local minor=$(echo "$version" | cut -d '.' -f 2) 249 | local patch=$(echo "$version" | cut -d '.' -f 3) 250 | echo $((major * 1000000 + minor * 1000 + patch)) 251 | } 252 | 253 | #endregion 254 | #-------------------------------------------------- 255 | #region Command functions 256 | 257 | function command_help() { 258 | echo "gah" 259 | echo " install [--tag=] [--use-default-names]" 260 | echo " aliases " 261 | echo " update" 262 | echo " help" 263 | echo " version" 264 | exit 0 265 | } 266 | 267 | function command_version() { 268 | echo "gah $VERSION" 269 | exit 0 270 | } 271 | 272 | function command_install() { 273 | # Create temporary directory 274 | tmp_dir=$(mktemp -d) 275 | 276 | # Change to temporary directory 277 | cd $tmp_dir 278 | 279 | local repo="$1" 280 | local tag="$2" 281 | 282 | # Fetch the release information 283 | print_blue "Fetching release info for: $repo [$tag]" 284 | fetch_release_info "$repo" "$tag" 285 | 286 | # Find the download URL 287 | local download_url=$(find_download_url "$tmp_dir/release.json") 288 | print_debug "Download URL:\n$download_url" 289 | 290 | # Check if several download URLs were found 291 | if [[ $(echo "$download_url" | wc -l) -gt 1 ]]; then 292 | print_yellow "Several download URLs were found which match your OS and arch." 293 | 294 | if [[ "$UNATTENDED" == "true" ]]; then 295 | # Select the first one 296 | download_url=$(echo "$download_url" | head -n 1) 297 | print_yellow "Unattended mode, so using the first download URL: $download_url" 298 | 299 | else 300 | print_yellow "Please select one:" 301 | select url in $download_url; do 302 | download_url=$url 303 | break 304 | done 305 | 306 | if [[ -z "$download_url" ]]; then 307 | throw_error 14 "No download URL was selected" 308 | fi 309 | 310 | fi 311 | fi 312 | 313 | # Get a filename 314 | local filename=$(basename "$download_url") 315 | 316 | # Download the file 317 | print_blue "Downloading: $filename" 318 | curl -L --progress-bar -o "$filename" "$download_url" 319 | 320 | # Extract if needed 321 | if [[ "$filename" =~ $REGEXP_EXT_TAR ]]; then 322 | print_blue "Extracting: $filename" 323 | tar -xf "$filename" 324 | 325 | elif [[ "$filename" =~ $REGEXP_EXT_ZIP ]]; then 326 | print_blue "Extracting: $filename" 327 | unzip -q "$filename" 328 | 329 | else 330 | print_debug "Does not look like supported archive - no need to extract" 331 | chmod +x "$filename" 332 | fi 333 | 334 | for bin_file in $(find . -type f -executable); do 335 | local file_name=$(basename "$bin_file") 336 | local lower_file_name=$(echo "$file_name" | tr '[A-Z]' '[a-z]') 337 | 338 | if [[ "$lower_file_name" =~ $REGEXP_SKIP_FILES ]]; then 339 | print_debug "Skipping: $file_name" 340 | continue 341 | fi 342 | 343 | local regexp=$(get_name_regexp) 344 | if [[ "$file_name" =~ $regexp ]]; then 345 | file_name="${BASH_REMATCH[1]}" 346 | fi 347 | 348 | print_blue "Installing: $file_name" 349 | 350 | if [[ "$UNATTENDED" == "true" ]]; then 351 | print_yellow "Using default name: $file_name" 352 | else 353 | print_yellow "Give a new name or keep '$file_name'? (Leave empty to keep the same)" 354 | read -p "New name: " new_name 355 | if [[ -n "$new_name" ]]; then 356 | file_name="$new_name" 357 | fi 358 | fi 359 | 360 | mv "$bin_file" "$GAH_INSTALL_DIR/$file_name" 361 | print_green "Installed: $file_name" 362 | done 363 | 364 | print_green "Done!" 365 | } 366 | 367 | function command_aliases_show() { 368 | echo "Known aliases:" 369 | jq -r '.aliases' "$(get_db_path)" 370 | } 371 | 372 | function command_aliases_refresh() { 373 | print_blue "Refreshing aliases" 374 | fetch_db 375 | print_green "Done!" 376 | } 377 | 378 | function command_update() { 379 | local gah_repo="marverix/gah" 380 | local script_realpath=$(realpath "$0") 381 | 382 | # Check if user has write permissions script_realpath 383 | if [[ ! -w "$script_realpath" ]]; then 384 | throw_error 15 "You don't have write permissions to $script_realpath.\nPlease run the script with sudo or change the permissions." 385 | fi 386 | 387 | # Check gah latest tag 388 | print_blue "Checking latest gah release..." 389 | local tag=$(curl -s "$(get_fetch_release_info_url $gah_repo)" | jq -r '.tag_name') 390 | 391 | # Compare versions 392 | local new_number=$(semver_to_number "$tag") 393 | local current_number=$(semver_to_number "$VERSION") 394 | if [[ "$new_number" -le "$current_number" ]]; then 395 | print_yellow "You are already using the latest version ($VERSION)." 396 | print_green "Done!" 397 | exit 0 398 | else 399 | print_yellow "Updating from $VERSION to $tag" 400 | fi 401 | 402 | # Download gah! script 403 | curl -sL https://raw.githubusercontent.com/$gah_repo/refs/tags/$tag/gah -o "$script_realpath" 404 | chmod +x "$script_realpath" 405 | print_green "OK" 406 | 407 | print_green "Done!" 408 | } 409 | 410 | #endregion 411 | #-------------------------------------------------- 412 | 413 | function main() { 414 | # Initialize 415 | mkdir -p "$GAH_CACHE_DIR" 416 | 417 | # Handle commands 418 | if [[ -z "$1" || "$1" == "help" ]]; then 419 | command_help 420 | 421 | elif [[ "$1" == "version" ]]; then 422 | command_version 423 | 424 | elif [[ "$1" == "install" ]]; then 425 | if [[ -z "$2" ]]; then 426 | throw_error 1 "Please provide either repo in format 'owner/repo_name' or known alias.\n$HELP_STRING" 427 | 428 | elif [[ "$2" == *"/"* ]]; then 429 | if [[ "$2" =~ ^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$ ]]; then 430 | repo="$2" 431 | else 432 | throw_error 2 "Given string '$2' is not in format 'owner/repo_name'.\n$HELP_STRING" 433 | fi 434 | 435 | elif [[ "$(get_known_alias $2)" != "null" ]]; then 436 | repo="$(get_known_alias $2)" 437 | 438 | else 439 | throw_error 3 "Given string '$2' is not a known alias.\nTo see known aliases type 'gah aliases show'." 440 | fi 441 | 442 | # Default values for optional parameters 443 | local tag="latest" 444 | 445 | # Parse optional parameters 446 | while [[ $# -gt 0 ]]; do 447 | case "$3" in 448 | --tag=*) 449 | tag="${3#--tag=}" 450 | shift 1 451 | ;; 452 | --unattended) 453 | UNATTENDED="true" 454 | shift 1 455 | ;; 456 | *) 457 | break 458 | ;; 459 | esac 460 | done 461 | 462 | # Use the parsed tag and default_names 463 | command_install "$repo" "$tag" 464 | 465 | elif [[ "$1" == "aliases" ]]; then 466 | if [[ "$2" == "show" ]]; then 467 | command_aliases_show 468 | 469 | elif [[ "$2" == "refresh" ]]; then 470 | command_aliases_refresh 471 | 472 | else 473 | throw_error 4 "Unknown subcommand.\n$HELP_STRING" 474 | fi 475 | 476 | elif [[ "$1" == "update" ]]; then 477 | command_update 478 | 479 | else 480 | throw_error 5 "Unknown command '$1'.\n$HELP_STRING" 481 | fi 482 | } 483 | 484 | if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then 485 | # The script is being executed directly 486 | trap cleanup EXIT ERR SIGINT SIGTERM 487 | main "$@" 488 | fi 489 | -------------------------------------------------------------------------------- /test/00_utils.bats: -------------------------------------------------------------------------------- 1 | load "test_helper/bats-support/load" 2 | load "test_helper/bats-assert/load" 3 | load "test_helper/bats-mock/stub" 4 | load "test_helper/common" 5 | load "$DIR/gah" 6 | 7 | setup() { 8 | common_setup 9 | DEBUG="" 10 | } 11 | 12 | teardown() { 13 | common_teardown 14 | } 15 | 16 | @test "get_os should print the OS" { 17 | run get_os 18 | 19 | assert_output "linux" 20 | } 21 | 22 | @test "get_arch should print the architecture" { 23 | run get_arch 24 | 25 | assert_output "amd64" 26 | } 27 | -------------------------------------------------------------------------------- /test/01_regexp_functions.bats: -------------------------------------------------------------------------------- 1 | load "test_helper/bats-support/load" 2 | load "test_helper/bats-assert/load" 3 | load "test_helper/bats-mock/stub" 4 | load "test_helper/common" 5 | load "$DIR/gah" 6 | 7 | setup() { 8 | common_setup 9 | DEBUG="" 10 | } 11 | 12 | teardown() { 13 | common_teardown 14 | 15 | unstub uname || true 16 | } 17 | 18 | @test "get_os should support Linux" { 19 | stub uname "-s : echo 'Linux'" 20 | run get_os 21 | 22 | assert_success 23 | assert_output "linux" 24 | } 25 | 26 | @test "get_os should support Linux-any-other" { 27 | stub uname "-s : echo 'Linux-any-other'" 28 | run get_os 29 | 30 | assert_success 31 | assert_output "linux" 32 | } 33 | 34 | @test "get_os should support Darwin" { 35 | stub uname "-s : echo 'Darwin 19.6.0'" 36 | run get_os 37 | 38 | assert_success 39 | assert_output "macos" 40 | } 41 | 42 | @test "get_os should support Darwin X.Y.Z" { 43 | stub uname "-s : echo 'Darwin X.Y.Z'" 44 | run get_os 45 | 46 | assert_success 47 | assert_output "macos" 48 | } 49 | 50 | @test "get_os should not support any other OS type" { 51 | stub uname "-s : echo 'FreeBSD'" 52 | run get_os 53 | 54 | assert_output "NOT_SUPPORTED" 55 | } 56 | 57 | @test "get_os_regexp_part should return proper string for linux" { 58 | stub uname "-s : echo 'Linux-gnu'" 59 | run get_os_regexp_part 60 | 61 | assert_success 62 | assert_output '[._-](unknown[._-])?(linux|linux-gnu|linux-musl)' 63 | } 64 | 65 | @test "get_os_regexp_part should return proper string for macos" { 66 | stub uname "-s : echo 'Darwin 19.6.0'" 67 | run get_os_regexp_part 68 | 69 | assert_success 70 | assert_output '[._-](apple[._-])?(darwin|macos)' 71 | } 72 | 73 | @test "get_os_regexp_part should exit with error code" { 74 | stub uname "-s : echo 'FreeBSD'" 75 | run get_os_regexp_part 76 | 77 | assert_failure 10 78 | assert_output --partial 'Error: Your OS type is not supported' 79 | } 80 | 81 | @test "get_arch should support x86_64" { 82 | stub uname "-m : echo 'x86_64'" 83 | run get_arch 84 | 85 | assert_success 86 | assert_output "amd64" 87 | } 88 | 89 | @test "get_arch should support amd64" { 90 | stub uname "-m : echo 'amd64'" 91 | run get_arch 92 | 93 | assert_success 94 | assert_output "amd64" 95 | } 96 | 97 | @test "get_arch should support arm64" { 98 | stub uname "-m : echo 'arm64'" 99 | run get_arch 100 | 101 | assert_success 102 | assert_output "arm64" 103 | } 104 | 105 | @test "get_arch should support aarch64" { 106 | stub uname "-m : echo 'aarch64'" 107 | run get_arch 108 | 109 | assert_success 110 | assert_output "arm64" 111 | } 112 | 113 | @test "get_arch should support armv8" { 114 | stub uname "-m : echo 'armv8'" 115 | run get_arch 116 | 117 | assert_success 118 | assert_output "arm64" 119 | } 120 | 121 | @test "get_arch should not support any other architecture" { 122 | stub uname "-m : echo 'x86'" 123 | run get_arch 124 | 125 | assert_output "NOT_SUPPORTED" 126 | } 127 | 128 | @test "get_arch_regexp_part should return proper string for amd64 architecture" { 129 | stub uname "-m : echo 'amd64'" 130 | run get_arch_regexp_part 131 | 132 | assert_success 133 | assert_output '[._-](amd64|x86_64|universal)' 134 | } 135 | 136 | @test "get_arch_regexp_part should return proper string for arm64 architecture" { 137 | stub uname "-m : echo 'armv8'" 138 | run get_arch_regexp_part 139 | 140 | assert_success 141 | assert_output '[._-](arm64|aarch64|universal)' 142 | } 143 | 144 | @test "get_arch_regexp_part should exit with error code" { 145 | stub uname "-m : echo 'x86'" 146 | run get_arch_regexp_part 147 | 148 | assert_failure 11 149 | assert_output --partial 'Error: Your CPU/OS architecture is not supported' 150 | } 151 | 152 | @test "get_filename_regexp should return proper string for linux/amd64" { 153 | stub uname \ 154 | "-s : echo 'Linux'" \ 155 | "-m : echo 'x86_64'" 156 | 157 | run get_filename_regexp 158 | 159 | assert_success 160 | assert_output '([a-z][a-z0-9_-]+?)([_-]v?[0-9.]+)?([._-](unknown[._-])?(linux|linux-gnu|linux-musl)[._-](amd64|x86_64|universal)|[._-](amd64|x86_64|universal)[._-](unknown[._-])?(linux|linux-gnu|linux-musl))(\.zip|\.tar\.gz|\.tar\.xz|\.tar\.bz2)?' 161 | } 162 | 163 | @test "get_filename_regexp should return proper string for linux/arm64" { 164 | stub uname \ 165 | "-s : echo 'Linux-gnu'" \ 166 | "-m : echo 'aarch64'" 167 | 168 | run get_filename_regexp 169 | 170 | assert_success 171 | assert_output '([a-z][a-z0-9_-]+?)([_-]v?[0-9.]+)?([._-](unknown[._-])?(linux|linux-gnu|linux-musl)[._-](arm64|aarch64|universal)|[._-](arm64|aarch64|universal)[._-](unknown[._-])?(linux|linux-gnu|linux-musl))(\.zip|\.tar\.gz|\.tar\.xz|\.tar\.bz2)?' 172 | } 173 | 174 | @test "get_filename_regexp should return proper string for macos/amd64" { 175 | stub uname \ 176 | "-s : echo 'Darwin'" \ 177 | "-m : echo 'amd64'" 178 | 179 | run get_filename_regexp 180 | 181 | assert_success 182 | assert_output '([a-z][a-z0-9_-]+?)([_-]v?[0-9.]+)?([._-](apple[._-])?(darwin|macos)[._-](amd64|x86_64|universal)|[._-](amd64|x86_64|universal)[._-](apple[._-])?(darwin|macos))(\.zip|\.tar\.gz|\.tar\.xz|\.tar\.bz2)?' 183 | } 184 | 185 | @test "get_filename_regexp should return proper string for macos/arm64" { 186 | stub uname \ 187 | "-s : echo 'Darwin 19.0.1'" \ 188 | "-m : echo 'arm64'" 189 | 190 | run get_filename_regexp 191 | 192 | assert_success 193 | assert_output '([a-z][a-z0-9_-]+?)([_-]v?[0-9.]+)?([._-](apple[._-])?(darwin|macos)[._-](arm64|aarch64|universal)|[._-](arm64|aarch64|universal)[._-](apple[._-])?(darwin|macos))(\.zip|\.tar\.gz|\.tar\.xz|\.tar\.bz2)?' 194 | } 195 | -------------------------------------------------------------------------------- /test/02_github_api_functions.bats: -------------------------------------------------------------------------------- 1 | load "test_helper/bats-support/load" 2 | load "test_helper/bats-assert/load" 3 | load "test_helper/bats-mock/stub" 4 | load "test_helper/common" 5 | load "$DIR/gah" 6 | 7 | setup() { 8 | common_setup 9 | } 10 | 11 | teardown() { 12 | common_teardown 13 | 14 | if [[ -n "$TEST_TEMP_DIR" && -d "$TEST_TEMP_DIR" ]]; then 15 | rm -rf "$TEST_TEMP_DIR" 16 | TEST_TEMP_DIR="" 17 | fi 18 | 19 | unstub uname || true 20 | unstub curl || true 21 | } 22 | 23 | @test "get_fetch_release_info_url should print the correct URL if no version is provided" { 24 | run get_fetch_release_info_url "abc/def" "" 25 | 26 | assert_success 27 | assert_output "https://api.github.com/repos/abc/def/releases/latest" 28 | } 29 | 30 | @test "get_fetch_release_info_url should print the correct URL if a version is latest" { 31 | run get_fetch_release_info_url "abc/def" "latest" 32 | 33 | assert_success 34 | assert_output "https://api.github.com/repos/abc/def/releases/latest" 35 | } 36 | 37 | @test "get_fetch_release_info_url should print the correct URL if a version is provided" { 38 | run get_fetch_release_info_url "abc/def" "v1.2.3" 39 | 40 | assert_success 41 | assert_output "https://api.github.com/repos/abc/def/releases/tags/v1.2.3" 42 | } 43 | 44 | @test "fetch_release_info should save the release info to a file" { 45 | stub curl "-s * : cat '$DIR/test/fixtures/releases/argocd/release.json'" 46 | 47 | TEST_TEMP_DIR=$(mktemp -d) 48 | cd "$TEST_TEMP_DIR" 49 | 50 | run fetch_release_info 51 | 52 | assert_success 53 | assert [ -f "release.json" ] 54 | } 55 | 56 | @test "fetch_release_info should print an error message if the release info cannot be fetched" { 57 | stub curl "-s * : cat '$DIR/test/fixtures/releases/_error/release.json'" 58 | 59 | TEST_TEMP_DIR=$(mktemp -d) 60 | cd "$TEST_TEMP_DIR" 61 | 62 | run fetch_release_info 63 | 64 | assert_failure 13 65 | assert_output --partial "Error: Couldn't fetch release information." 66 | assert_output --partial "Response from GitHub API: [419] I'm a teapot" 67 | } 68 | 69 | # --- argocd tests --- 70 | 71 | @test "find_download_url should print match for the correct asset [argocd/linux/amd64]" { 72 | stub uname \ 73 | "-s : echo 'Linux'" \ 74 | "-m : echo 'x86_64'" 75 | 76 | DEBUG="" 77 | run find_download_url "$DIR/test/fixtures/releases/argocd/release.json" 78 | 79 | assert_success 80 | assert_output "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-linux-amd64" 81 | } 82 | 83 | @test "find_download_url should print match for the correct asset [argocd/linux/arm64]" { 84 | stub uname \ 85 | "-s : echo 'Linux'" \ 86 | "-m : echo 'aarch64'" 87 | 88 | DEBUG="" 89 | run find_download_url "$DIR/test/fixtures/releases/argocd/release.json" 90 | 91 | assert_success 92 | assert_output "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-linux-arm64" 93 | } 94 | 95 | @test "find_download_url should print match for the correct asset [argocd/macos/amd64]" { 96 | stub uname \ 97 | "-s : echo 'Darwin'" \ 98 | "-m : echo 'x86_64'" 99 | 100 | DEBUG="" 101 | run find_download_url "$DIR/test/fixtures/releases/argocd/release.json" 102 | 103 | assert_success 104 | assert_output "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-darwin-amd64" 105 | } 106 | 107 | @test "find_download_url should print match for the correct asset [argocd/macos/arm64]" { 108 | stub uname \ 109 | "-s : echo 'Darwin'" \ 110 | "-m : echo 'aarch64'" 111 | 112 | DEBUG="" 113 | run find_download_url "$DIR/test/fixtures/releases/argocd/release.json" 114 | 115 | assert_success 116 | assert_output "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-darwin-arm64" 117 | } 118 | 119 | # --- gh tests --- 120 | 121 | @test "find_download_url should print match for the correct asset [gh/linux/amd64]" { 122 | stub uname \ 123 | "-s : echo 'Linux'" \ 124 | "-m : echo 'x86_64'" 125 | 126 | DEBUG="" 127 | run find_download_url "$DIR/test/fixtures/releases/gh/release.json" 128 | 129 | assert_success 130 | assert_output "https://github.com/cli/cli/releases/download/v2.63.0/gh_2.63.0_linux_amd64.tar.gz" 131 | } 132 | 133 | @test "find_download_url should print match for the correct asset [gh/linux/arm64]" { 134 | stub uname \ 135 | "-s : echo 'Linux'" \ 136 | "-m : echo 'aarch64'" 137 | 138 | DEBUG="" 139 | run find_download_url "$DIR/test/fixtures/releases/gh/release.json" 140 | 141 | assert_success 142 | assert_output "https://github.com/cli/cli/releases/download/v2.63.0/gh_2.63.0_linux_arm64.tar.gz" 143 | } 144 | 145 | @test "find_download_url should print match for the correct asset [gh/macos/amd64]" { 146 | stub uname \ 147 | "-s : echo 'Darwin'" \ 148 | "-m : echo 'x86_64'" 149 | 150 | DEBUG="" 151 | run find_download_url "$DIR/test/fixtures/releases/gh/release.json" 152 | 153 | assert_success 154 | assert_output "https://github.com/cli/cli/releases/download/v2.63.0/gh_2.63.0_macOS_amd64.zip" 155 | } 156 | 157 | @test "find_download_url should print match for the correct asset [gh/macos/arm64]" { 158 | stub uname \ 159 | "-s : echo 'Darwin'" \ 160 | "-m : echo 'aarch64'" 161 | 162 | DEBUG="" 163 | run find_download_url "$DIR/test/fixtures/releases/gh/release.json" 164 | 165 | assert_success 166 | assert_output "https://github.com/cli/cli/releases/download/v2.63.0/gh_2.63.0_macOS_arm64.zip" 167 | } 168 | 169 | # --- goss tests --- 170 | 171 | @test "find_download_url should print match for the correct asset [goss/linux/amd64]" { 172 | stub uname \ 173 | "-s : echo 'Linux'" \ 174 | "-m : echo 'x86_64'" 175 | 176 | DEBUG="" 177 | run find_download_url "$DIR/test/fixtures/releases/goss/release.json" 178 | 179 | assert_success 180 | assert_output "https://github.com/goss-org/goss/releases/download/v0.4.9/goss-linux-amd64" 181 | } 182 | 183 | @test "find_download_url should print match for the correct asset [goss/linux/arm64]" { 184 | stub uname \ 185 | "-s : echo 'Linux'" \ 186 | "-m : echo 'aarch64'" 187 | 188 | DEBUG="" 189 | run find_download_url "$DIR/test/fixtures/releases/goss/release.json" 190 | 191 | assert_success 192 | assert_output "https://github.com/goss-org/goss/releases/download/v0.4.9/goss-linux-arm64" 193 | } 194 | 195 | @test "find_download_url should print match for the correct asset [goss/macos/amd64]" { 196 | stub uname \ 197 | "-s : echo 'Darwin'" \ 198 | "-m : echo 'x86_64'" 199 | 200 | DEBUG="" 201 | run find_download_url "$DIR/test/fixtures/releases/goss/release.json" 202 | 203 | assert_success 204 | assert_output "https://github.com/goss-org/goss/releases/download/v0.4.9/goss-darwin-amd64" 205 | } 206 | 207 | @test "find_download_url should print match for the correct asset [goss/macos/arm64]" { 208 | stub uname \ 209 | "-s : echo 'Darwin'" \ 210 | "-m : echo 'aarch64'" 211 | 212 | DEBUG="" 213 | run find_download_url "$DIR/test/fixtures/releases/goss/release.json" 214 | 215 | assert_success 216 | assert_output "https://github.com/goss-org/goss/releases/download/v0.4.9/goss-darwin-arm64" 217 | } 218 | 219 | # --- helm tests --- 220 | 221 | @test "find_download_url should print match for the correct asset [helm/linux/amd64]" { 222 | stub uname \ 223 | "-s : echo 'Linux'" \ 224 | "-m : echo 'x86_64'" \ 225 | "-s : echo 'Linux'" \ 226 | "-m : echo 'x86_64'" 227 | 228 | DEBUG="" 229 | run find_download_url "$DIR/test/fixtures/releases/helm/release.json" 230 | 231 | assert_success 232 | assert_output "https://get.helm.sh/helm-v3.16.3-linux-amd64.tar.gz" 233 | } 234 | 235 | @test "find_download_url should print match for the correct asset [helm/linux/arm64]" { 236 | stub uname \ 237 | "-s : echo 'Linux'" \ 238 | "-m : echo 'aarch64'" \ 239 | "-s : echo 'Linux'" \ 240 | "-m : echo 'aarch64'" 241 | 242 | DEBUG="" 243 | run find_download_url "$DIR/test/fixtures/releases/helm/release.json" 244 | 245 | assert_success 246 | assert_output "https://get.helm.sh/helm-v3.16.3-linux-arm64.tar.gz" 247 | } 248 | 249 | @test "find_download_url should print match for the correct asset [helm/macos/amd64]" { 250 | stub uname \ 251 | "-s : echo 'Darwin'" \ 252 | "-m : echo 'x86_64'" \ 253 | "-s : echo 'Darwin'" \ 254 | "-m : echo 'x86_64'" 255 | 256 | DEBUG="" 257 | run find_download_url "$DIR/test/fixtures/releases/helm/release.json" 258 | 259 | assert_success 260 | assert_output "https://get.helm.sh/helm-v3.16.3-darwin-amd64.tar.gz" 261 | } 262 | 263 | @test "find_download_url should print match for the correct asset [helm/macos/arm64]" { 264 | stub uname \ 265 | "-s : echo 'Darwin'" \ 266 | "-m : echo 'aarch64'" \ 267 | "-s : echo 'Darwin'" \ 268 | "-m : echo 'aarch64'" 269 | 270 | DEBUG="" 271 | run find_download_url "$DIR/test/fixtures/releases/helm/release.json" 272 | 273 | assert_success 274 | assert_output "https://get.helm.sh/helm-v3.16.3-darwin-arm64.tar.gz" 275 | } 276 | 277 | # --- k9s tests --- 278 | 279 | @test "find_download_url should print match for the correct asset [k9s/linux/amd64]" { 280 | stub uname \ 281 | "-s : echo 'Linux'" \ 282 | "-m : echo 'x86_64'" 283 | 284 | DEBUG="" 285 | run find_download_url "$DIR/test/fixtures/releases/k9s/release.json" 286 | 287 | assert_success 288 | assert_output "https://github.com/derailed/k9s/releases/download/v0.32.7/k9s_Linux_amd64.tar.gz" 289 | } 290 | 291 | @test "find_download_url should print match for the correct asset [k9s/linux/arm64]" { 292 | stub uname \ 293 | "-s : echo 'Linux'" \ 294 | "-m : echo 'aarch64'" 295 | 296 | DEBUG="" 297 | run find_download_url "$DIR/test/fixtures/releases/k9s/release.json" 298 | 299 | assert_success 300 | assert_output "https://github.com/derailed/k9s/releases/download/v0.32.7/k9s_Linux_arm64.tar.gz" 301 | } 302 | 303 | @test "find_download_url should print match for the correct asset [k9s/macos/amd64]" { 304 | stub uname \ 305 | "-s : echo 'Darwin'" \ 306 | "-m : echo 'x86_64'" 307 | 308 | DEBUG="" 309 | run find_download_url "$DIR/test/fixtures/releases/k9s/release.json" 310 | 311 | assert_success 312 | assert_output "https://github.com/derailed/k9s/releases/download/v0.32.7/k9s_Darwin_amd64.tar.gz" 313 | } 314 | 315 | @test "find_download_url should print match for the correct asset [k9s/macos/arm64]" { 316 | stub uname \ 317 | "-s : echo 'Darwin'" \ 318 | "-m : echo 'aarch64'" 319 | 320 | DEBUG="" 321 | run find_download_url "$DIR/test/fixtures/releases/k9s/release.json" 322 | 323 | assert_success 324 | assert_output "https://github.com/derailed/k9s/releases/download/v0.32.7/k9s_Darwin_arm64.tar.gz" 325 | } 326 | 327 | # --- kops tests --- 328 | 329 | @test "find_download_url should print match for the correct asset [kops/linux/amd64]" { 330 | stub uname \ 331 | "-s : echo 'Linux'" \ 332 | "-m : echo 'x86_64'" 333 | 334 | DEBUG="" 335 | run find_download_url "$DIR/test/fixtures/releases/kops/release.json" 336 | 337 | assert_success 338 | assert_output "https://github.com/kubernetes/kops/releases/download/v1.30.2/channels-linux-amd64 339 | https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-linux-amd64 340 | https://github.com/kubernetes/kops/releases/download/v1.30.2/nodeup-linux-amd64 341 | https://github.com/kubernetes/kops/releases/download/v1.30.2/protokube-linux-amd64" 342 | } 343 | 344 | @test "find_download_url should print match for the correct asset [kops/linux/arm64]" { 345 | stub uname \ 346 | "-s : echo 'Linux'" \ 347 | "-m : echo 'aarch64'" 348 | 349 | DEBUG="" 350 | run find_download_url "$DIR/test/fixtures/releases/kops/release.json" 351 | 352 | assert_success 353 | assert_output "https://github.com/kubernetes/kops/releases/download/v1.30.2/channels-linux-arm64 354 | https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-linux-arm64 355 | https://github.com/kubernetes/kops/releases/download/v1.30.2/nodeup-linux-arm64 356 | https://github.com/kubernetes/kops/releases/download/v1.30.2/protokube-linux-arm64" 357 | } 358 | 359 | @test "find_download_url should print match for the correct asset [kops/macos/amd64]" { 360 | stub uname \ 361 | "-s : echo 'Darwin'" \ 362 | "-m : echo 'x86_64'" 363 | 364 | DEBUG="" 365 | run find_download_url "$DIR/test/fixtures/releases/kops/release.json" 366 | 367 | assert_success 368 | assert_output "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-darwin-amd64" 369 | } 370 | 371 | @test "find_download_url should print match for the correct asset [kops/macos/arm64]" { 372 | stub uname \ 373 | "-s : echo 'Darwin'" \ 374 | "-m : echo 'aarch64'" 375 | 376 | DEBUG="" 377 | run find_download_url "$DIR/test/fixtures/releases/kops/release.json" 378 | 379 | assert_success 380 | assert_output "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-darwin-arm64" 381 | } 382 | 383 | # --- terragrunt tests --- 384 | 385 | @test "find_download_url should print match for the correct asset [terragrunt/linux/amd64]" { 386 | stub uname \ 387 | "-s : echo 'Linux'" \ 388 | "-m : echo 'x86_64'" 389 | 390 | DEBUG="" 391 | run find_download_url "$DIR/test/fixtures/releases/terragrunt/release.json" 392 | 393 | assert_success 394 | assert_output "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_linux_amd64" 395 | } 396 | 397 | @test "find_download_url should print match for the correct asset [terragrunt/linux/arm64]" { 398 | stub uname \ 399 | "-s : echo 'Linux'" \ 400 | "-m : echo 'aarch64'" 401 | 402 | DEBUG="" 403 | run find_download_url "$DIR/test/fixtures/releases/terragrunt/release.json" 404 | 405 | assert_success 406 | assert_output "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_linux_arm64" 407 | } 408 | 409 | @test "find_download_url should print match for the correct asset [terragrunt/macos/amd64]" { 410 | stub uname \ 411 | "-s : echo 'Darwin'" \ 412 | "-m : echo 'x86_64'" 413 | 414 | DEBUG="" 415 | run find_download_url "$DIR/test/fixtures/releases/terragrunt/release.json" 416 | 417 | assert_success 418 | assert_output "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_darwin_amd64" 419 | } 420 | 421 | @test "find_download_url should print match for the correct asset [terragrunt/macos/arm64]" { 422 | stub uname \ 423 | "-s : echo 'Darwin'" \ 424 | "-m : echo 'aarch64'" 425 | 426 | DEBUG="" 427 | run find_download_url "$DIR/test/fixtures/releases/terragrunt/release.json" 428 | 429 | assert_success 430 | assert_output "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_darwin_arm64" 431 | } 432 | 433 | # --- trufflehog tests --- 434 | 435 | @test "find_download_url should print match for the correct asset [trufflehog/linux/amd64]" { 436 | stub uname \ 437 | "-s : echo 'Linux'" \ 438 | "-m : echo 'x86_64'" 439 | 440 | DEBUG="" 441 | run find_download_url "$DIR/test/fixtures/releases/trufflehog/release.json" 442 | 443 | assert_success 444 | assert_output "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_linux_amd64.tar.gz" 445 | } 446 | 447 | @test "find_download_url should print match for the correct asset [trufflehog/linux/arm64]" { 448 | stub uname \ 449 | "-s : echo 'Linux'" \ 450 | "-m : echo 'aarch64'" 451 | 452 | DEBUG="" 453 | run find_download_url "$DIR/test/fixtures/releases/trufflehog/release.json" 454 | 455 | assert_success 456 | assert_output "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_linux_arm64.tar.gz" 457 | } 458 | 459 | @test "find_download_url should print match for the correct asset [trufflehog/macos/amd64]" { 460 | stub uname \ 461 | "-s : echo 'Darwin'" \ 462 | "-m : echo 'x86_64'" 463 | 464 | DEBUG="" 465 | run find_download_url "$DIR/test/fixtures/releases/trufflehog/release.json" 466 | 467 | assert_success 468 | assert_output "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_darwin_amd64.tar.gz" 469 | } 470 | 471 | @test "find_download_url should print match for the correct asset [trufflehog/macos/arm64]" { 472 | stub uname \ 473 | "-s : echo 'Darwin'" \ 474 | "-m : echo 'aarch64'" 475 | 476 | DEBUG="" 477 | run find_download_url "$DIR/test/fixtures/releases/trufflehog/release.json" 478 | 479 | assert_success 480 | assert_output "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_darwin_arm64.tar.gz" 481 | } 482 | 483 | # --- sops tests --- 484 | 485 | @test "find_download_url should print match for the correct asset [sops/linux/amd64]" { 486 | stub uname \ 487 | "-s : echo 'Linux'" \ 488 | "-m : echo 'x86_64'" 489 | 490 | DEBUG="" 491 | run find_download_url "$DIR/test/fixtures/releases/sops/release.json" 492 | 493 | assert_success 494 | assert_output "https://github.com/getsops/sops/releases/download/v3.10.2/sops-v3.10.2.linux.amd64" 495 | } 496 | 497 | @test "find_download_url should print match for the correct asset [sops/linux/arm64]" { 498 | stub uname \ 499 | "-s : echo 'Linux'" \ 500 | "-m : echo 'aarch64'" 501 | 502 | DEBUG="" 503 | run find_download_url "$DIR/test/fixtures/releases/sops/release.json" 504 | 505 | assert_success 506 | assert_output "https://github.com/getsops/sops/releases/download/v3.10.2/sops-v3.10.2.linux.arm64" 507 | } 508 | 509 | @test "find_download_url should print match for the correct asset [sops/macos/amd64]" { 510 | stub uname \ 511 | "-s : echo 'Darwin'" \ 512 | "-m : echo 'x86_64'" 513 | 514 | DEBUG="" 515 | run find_download_url "$DIR/test/fixtures/releases/sops/release.json" 516 | 517 | assert_success 518 | assert_output "https://github.com/getsops/sops/releases/download/v3.10.2/sops-v3.10.2.darwin.amd64" 519 | } 520 | 521 | @test "find_download_url should print match for the correct asset [sops/macos/arm64]" { 522 | stub uname \ 523 | "-s : echo 'Darwin'" \ 524 | "-m : echo 'aarch64'" 525 | 526 | DEBUG="" 527 | run find_download_url "$DIR/test/fixtures/releases/sops/release.json" 528 | 529 | assert_success 530 | assert_output "https://github.com/getsops/sops/releases/download/v3.10.2/sops-v3.10.2.darwin.arm64" 531 | } 532 | -------------------------------------------------------------------------------- /test/fixtures/releases/_error/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 419, 3 | "message": "I'm a teapot" 4 | } 5 | -------------------------------------------------------------------------------- /test/fixtures/releases/argocd/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/186475222", 3 | "assets_url": "https://api.github.com/repos/argoproj/argo-cd/releases/186475222/assets", 4 | "upload_url": "https://uploads.github.com/repos/argoproj/argo-cd/releases/186475222/assets{?name,label}", 5 | "html_url": "https://github.com/argoproj/argo-cd/releases/tag/v2.13.1", 6 | "id": 186475222, 7 | "author": { 8 | "login": "github-actions[bot]", 9 | "id": 41898282, 10 | "node_id": "MDM6Qm90NDE4OTgyODI=", 11 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 12 | "gravatar_id": "", 13 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 14 | "html_url": "https://github.com/apps/github-actions", 15 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 16 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 17 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 18 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 19 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 20 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 21 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 22 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 23 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 24 | "type": "Bot", 25 | "user_view_type": "public", 26 | "site_admin": false 27 | }, 28 | "node_id": "RE_kwDOBzS60s4LHWLW", 29 | "tag_name": "v2.13.1", 30 | "target_commitish": "master", 31 | "name": "v2.13.1", 32 | "draft": false, 33 | "prerelease": false, 34 | "created_at": "2024-11-20T15:45:30Z", 35 | "published_at": "2024-11-20T17:11:22Z", 36 | "assets": [ 37 | { 38 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877377", 39 | "id": 207877377, 40 | "node_id": "RA_kwDOBzS60s4MY_UB", 41 | "name": "argocd-cli.intoto.jsonl", 42 | "label": "", 43 | "uploader": { 44 | "login": "github-actions[bot]", 45 | "id": 41898282, 46 | "node_id": "MDM6Qm90NDE4OTgyODI=", 47 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 48 | "gravatar_id": "", 49 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 50 | "html_url": "https://github.com/apps/github-actions", 51 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 52 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 53 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 54 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 55 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 56 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 57 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 58 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 59 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 60 | "type": "Bot", 61 | "user_view_type": "public", 62 | "site_admin": false 63 | }, 64 | "content_type": "application/octet-stream", 65 | "state": "uploaded", 66 | "size": 16438, 67 | "download_count": 794, 68 | "created_at": "2024-11-20T17:12:11Z", 69 | "updated_at": "2024-11-20T17:12:11Z", 70 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-cli.intoto.jsonl" 71 | }, 72 | { 73 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877212", 74 | "id": 207877212, 75 | "node_id": "RA_kwDOBzS60s4MY_Rc", 76 | "name": "argocd-darwin-amd64", 77 | "label": "", 78 | "uploader": { 79 | "login": "github-actions[bot]", 80 | "id": 41898282, 81 | "node_id": "MDM6Qm90NDE4OTgyODI=", 82 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 83 | "gravatar_id": "", 84 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 85 | "html_url": "https://github.com/apps/github-actions", 86 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 87 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 88 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 89 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 90 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 91 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 92 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 93 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 94 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 95 | "type": "Bot", 96 | "user_view_type": "public", 97 | "site_admin": false 98 | }, 99 | "content_type": "application/octet-stream", 100 | "state": "uploaded", 101 | "size": 189603936, 102 | "download_count": 139, 103 | "created_at": "2024-11-20T17:11:14Z", 104 | "updated_at": "2024-11-20T17:11:18Z", 105 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-darwin-amd64" 106 | }, 107 | { 108 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877215", 109 | "id": 207877215, 110 | "node_id": "RA_kwDOBzS60s4MY_Rf", 111 | "name": "argocd-darwin-arm64", 112 | "label": "", 113 | "uploader": { 114 | "login": "github-actions[bot]", 115 | "id": 41898282, 116 | "node_id": "MDM6Qm90NDE4OTgyODI=", 117 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 118 | "gravatar_id": "", 119 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 120 | "html_url": "https://github.com/apps/github-actions", 121 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 122 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 123 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 124 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 125 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 126 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 127 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 128 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 129 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 130 | "type": "Bot", 131 | "user_view_type": "public", 132 | "site_admin": false 133 | }, 134 | "content_type": "application/octet-stream", 135 | "state": "uploaded", 136 | "size": 186402146, 137 | "download_count": 182, 138 | "created_at": "2024-11-20T17:11:18Z", 139 | "updated_at": "2024-11-20T17:11:21Z", 140 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-darwin-arm64" 141 | }, 142 | { 143 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877213", 144 | "id": 207877213, 145 | "node_id": "RA_kwDOBzS60s4MY_Rd", 146 | "name": "argocd-linux-amd64", 147 | "label": "", 148 | "uploader": { 149 | "login": "github-actions[bot]", 150 | "id": 41898282, 151 | "node_id": "MDM6Qm90NDE4OTgyODI=", 152 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 153 | "gravatar_id": "", 154 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 155 | "html_url": "https://github.com/apps/github-actions", 156 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 157 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 158 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 159 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 160 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 161 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 162 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 163 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 164 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 165 | "type": "Bot", 166 | "user_view_type": "public", 167 | "site_admin": false 168 | }, 169 | "content_type": "application/octet-stream", 170 | "state": "uploaded", 171 | "size": 187100598, 172 | "download_count": 97621, 173 | "created_at": "2024-11-20T17:11:14Z", 174 | "updated_at": "2024-11-20T17:11:18Z", 175 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-linux-amd64" 176 | }, 177 | { 178 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877217", 179 | "id": 207877217, 180 | "node_id": "RA_kwDOBzS60s4MY_Rh", 181 | "name": "argocd-linux-arm64", 182 | "label": "", 183 | "uploader": { 184 | "login": "github-actions[bot]", 185 | "id": 41898282, 186 | "node_id": "MDM6Qm90NDE4OTgyODI=", 187 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 188 | "gravatar_id": "", 189 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 190 | "html_url": "https://github.com/apps/github-actions", 191 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 192 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 193 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 194 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 195 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 196 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 197 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 198 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 199 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 200 | "type": "Bot", 201 | "user_view_type": "public", 202 | "site_admin": false 203 | }, 204 | "content_type": "application/octet-stream", 205 | "state": "uploaded", 206 | "size": 182480533, 207 | "download_count": 2681, 208 | "created_at": "2024-11-20T17:11:18Z", 209 | "updated_at": "2024-11-20T17:11:21Z", 210 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-linux-arm64" 211 | }, 212 | { 213 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877216", 214 | "id": 207877216, 215 | "node_id": "RA_kwDOBzS60s4MY_Rg", 216 | "name": "argocd-linux-ppc64le", 217 | "label": "", 218 | "uploader": { 219 | "login": "github-actions[bot]", 220 | "id": 41898282, 221 | "node_id": "MDM6Qm90NDE4OTgyODI=", 222 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 223 | "gravatar_id": "", 224 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 225 | "html_url": "https://github.com/apps/github-actions", 226 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 227 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 228 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 229 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 230 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 231 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 232 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 233 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 234 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 235 | "type": "Bot", 236 | "user_view_type": "public", 237 | "site_admin": false 238 | }, 239 | "content_type": "application/octet-stream", 240 | "state": "uploaded", 241 | "size": 185634221, 242 | "download_count": 15, 243 | "created_at": "2024-11-20T17:11:18Z", 244 | "updated_at": "2024-11-20T17:11:22Z", 245 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-linux-ppc64le" 246 | }, 247 | { 248 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877210", 249 | "id": 207877210, 250 | "node_id": "RA_kwDOBzS60s4MY_Ra", 251 | "name": "argocd-linux-s390x", 252 | "label": "", 253 | "uploader": { 254 | "login": "github-actions[bot]", 255 | "id": 41898282, 256 | "node_id": "MDM6Qm90NDE4OTgyODI=", 257 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 258 | "gravatar_id": "", 259 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 260 | "html_url": "https://github.com/apps/github-actions", 261 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 262 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 263 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 264 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 265 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 266 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 267 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 268 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 269 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 270 | "type": "Bot", 271 | "user_view_type": "public", 272 | "site_admin": false 273 | }, 274 | "content_type": "application/octet-stream", 275 | "state": "uploaded", 276 | "size": 192973930, 277 | "download_count": 26, 278 | "created_at": "2024-11-20T17:11:14Z", 279 | "updated_at": "2024-11-20T17:11:18Z", 280 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-linux-s390x" 281 | }, 282 | { 283 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877905", 284 | "id": 207877905, 285 | "node_id": "RA_kwDOBzS60s4MY_cR", 286 | "name": "argocd-sbom.intoto.jsonl", 287 | "label": "", 288 | "uploader": { 289 | "login": "github-actions[bot]", 290 | "id": 41898282, 291 | "node_id": "MDM6Qm90NDE4OTgyODI=", 292 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 293 | "gravatar_id": "", 294 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 295 | "html_url": "https://github.com/apps/github-actions", 296 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 297 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 298 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 299 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 300 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 301 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 302 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 303 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 304 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 305 | "type": "Bot", 306 | "user_view_type": "public", 307 | "site_admin": false 308 | }, 309 | "content_type": "application/octet-stream", 310 | "state": "uploaded", 311 | "size": 15486, 312 | "download_count": 20, 313 | "created_at": "2024-11-20T17:15:45Z", 314 | "updated_at": "2024-11-20T17:15:45Z", 315 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-sbom.intoto.jsonl" 316 | }, 317 | { 318 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877211", 319 | "id": 207877211, 320 | "node_id": "RA_kwDOBzS60s4MY_Rb", 321 | "name": "argocd-windows-amd64.exe", 322 | "label": "", 323 | "uploader": { 324 | "login": "github-actions[bot]", 325 | "id": 41898282, 326 | "node_id": "MDM6Qm90NDE4OTgyODI=", 327 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 328 | "gravatar_id": "", 329 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 330 | "html_url": "https://github.com/apps/github-actions", 331 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 332 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 333 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 334 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 335 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 336 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 337 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 338 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 339 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 340 | "type": "Bot", 341 | "user_view_type": "public", 342 | "site_admin": false 343 | }, 344 | "content_type": "application/x-ms-dos-executable", 345 | "state": "uploaded", 346 | "size": 189144064, 347 | "download_count": 755, 348 | "created_at": "2024-11-20T17:11:14Z", 349 | "updated_at": "2024-11-20T17:11:17Z", 350 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/argocd-windows-amd64.exe" 351 | }, 352 | { 353 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877218", 354 | "id": 207877218, 355 | "node_id": "RA_kwDOBzS60s4MY_Ri", 356 | "name": "cli_checksums.txt", 357 | "label": "", 358 | "uploader": { 359 | "login": "github-actions[bot]", 360 | "id": 41898282, 361 | "node_id": "MDM6Qm90NDE4OTgyODI=", 362 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 363 | "gravatar_id": "", 364 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 365 | "html_url": "https://github.com/apps/github-actions", 366 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 367 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 368 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 369 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 370 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 371 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 372 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 373 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 374 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 375 | "type": "Bot", 376 | "user_view_type": "public", 377 | "site_admin": false 378 | }, 379 | "content_type": "text/plain; charset=utf-8", 380 | "state": "uploaded", 381 | "size": 605, 382 | "download_count": 305, 383 | "created_at": "2024-11-20T17:11:18Z", 384 | "updated_at": "2024-11-20T17:11:18Z", 385 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/cli_checksums.txt" 386 | }, 387 | { 388 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/assets/207877811", 389 | "id": 207877811, 390 | "node_id": "RA_kwDOBzS60s4MY_az", 391 | "name": "sbom.tar.gz", 392 | "label": "", 393 | "uploader": { 394 | "login": "github-actions[bot]", 395 | "id": 41898282, 396 | "node_id": "MDM6Qm90NDE4OTgyODI=", 397 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 398 | "gravatar_id": "", 399 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 400 | "html_url": "https://github.com/apps/github-actions", 401 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 402 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 403 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 404 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 405 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 406 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 407 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 408 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 409 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 410 | "type": "Bot", 411 | "user_view_type": "public", 412 | "site_admin": false 413 | }, 414 | "content_type": "application/gzip", 415 | "state": "uploaded", 416 | "size": 357581, 417 | "download_count": 21, 418 | "created_at": "2024-11-20T17:14:56Z", 419 | "updated_at": "2024-11-20T17:14:56Z", 420 | "browser_download_url": "https://github.com/argoproj/argo-cd/releases/download/v2.13.1/sbom.tar.gz" 421 | } 422 | ], 423 | "tarball_url": "https://api.github.com/repos/argoproj/argo-cd/tarball/v2.13.1", 424 | "zipball_url": "https://api.github.com/repos/argoproj/argo-cd/zipball/v2.13.1", 425 | "body": "## Quick Start\n\n### Non-HA:\n\n```shell\nkubectl create namespace argocd\nkubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.13.1/manifests/install.yaml\n```\n\n### HA:\n\n```shell\nkubectl create namespace argocd\nkubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.13.1/manifests/ha/install.yaml\n```\n\n## Release Signatures and Provenance\n\nAll Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets) on how to verify.\n\n\n## Upgrading\n\nIf upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation.\n\n## Changelog\n### Features\n* 6a8cb6eff098ef6db623126fa0d93dcaa2f54bef: feat: option to disable writing k8s events(#18205) (#18441) (#20788) (@Jack-R-lantern)\n### Bug fixes\n* 449e6939b2a729bba32d11f055d7c6067a44b9cc: fix(pkce): 20202 Backport PKCE auth flow fix for basehref and reauth (#20675) (@austin5219)\n* 68606c6caf058f7c4f2ecdbb4381d2cba40aa249: fix: Fix repeated 403 due to app namespace being undefined (#20699) (#20819) (#20860) (@gcp-cherry-pick-bot[bot])\n* 99aab9a5f3812f2f4089ce6982d4764145271f78: fix: check for source position when --show-params is set (#20682) (#20689) (@gcp-cherry-pick-bot[bot])\n* d03ccf305c60f7305a076e4b3c1c28e1749ba6c9: fix: disable automaxprocs logging (#20069) - cherry-pick 2.13 (#20718) (@pasha-codefresh)\n### Other work\n* 7f45c9e09398b1d8e65ad9fdf1dab2dd2c1532d7: chore: Don't degrade PDB on InsufficientPods (#20171) (#20665) (#20694) (@gcp-cherry-pick-bot[bot])\n\n**Full Changelog**: https://github.com/argoproj/argo-cd/compare/v2.13.0...v2.13.1\n\n\n\n", 426 | "reactions": { 427 | "url": "https://api.github.com/repos/argoproj/argo-cd/releases/186475222/reactions", 428 | "total_count": 5, 429 | "+1": 0, 430 | "-1": 0, 431 | "laugh": 0, 432 | "hooray": 5, 433 | "confused": 0, 434 | "heart": 0, 435 | "rocket": 0, 436 | "eyes": 0 437 | }, 438 | "mentions_count": 3 439 | } 440 | -------------------------------------------------------------------------------- /test/fixtures/releases/fetch-release-files.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) 4 | source "$SCRIPT_DIR/../../../gah" 5 | 6 | while IFS= read -r -d '' directory; do 7 | dir_name=$(basename "$directory") 8 | echo "Processing $dir_name" 9 | 10 | if [[ "$dir_name" == _* ]]; then 11 | continue 12 | fi 13 | 14 | cd "$directory" 15 | if [[ -f "release.json" ]]; then 16 | echo "release.json already exists in $directory - skipping" 17 | continue 18 | fi 19 | 20 | repo=$(get_known_alias "$dir_name") 21 | echo "Fetching release info for $repo" 22 | fetch_release_info "$repo" 23 | 24 | done < <(find "$SCRIPT_DIR" -mindepth 1 -maxdepth 1 -type d -print0) 25 | -------------------------------------------------------------------------------- /test/fixtures/releases/kops/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "url": "https://api.github.com/repos/kubernetes/kops/releases/187574005", 3 | "assets_url": "https://api.github.com/repos/kubernetes/kops/releases/187574005/assets", 4 | "upload_url": "https://uploads.github.com/repos/kubernetes/kops/releases/187574005/assets{?name,label}", 5 | "html_url": "https://github.com/kubernetes/kops/releases/tag/v1.30.2", 6 | "id": 187574005, 7 | "author": { 8 | "login": "rifelpet", 9 | "id": 1455650, 10 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 11 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 12 | "gravatar_id": "", 13 | "url": "https://api.github.com/users/rifelpet", 14 | "html_url": "https://github.com/rifelpet", 15 | "followers_url": "https://api.github.com/users/rifelpet/followers", 16 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 17 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 18 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 19 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 20 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 21 | "repos_url": "https://api.github.com/users/rifelpet/repos", 22 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 23 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 24 | "type": "User", 25 | "user_view_type": "public", 26 | "site_admin": false 27 | }, 28 | "node_id": "RE_kwDOA7NwS84LLib1", 29 | "tag_name": "v1.30.2", 30 | "target_commitish": "cfae6a7f4def06f5f5824efdc252ffb8eb549b9f", 31 | "name": "v1.30.2", 32 | "draft": false, 33 | "prerelease": false, 34 | "created_at": "2024-11-26T05:29:23Z", 35 | "published_at": "2024-11-27T01:26:19Z", 36 | "assets": [ 37 | { 38 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209209363", 39 | "id": 209209363, 40 | "node_id": "RA_kwDOA7NwS84MeEgT", 41 | "name": "channels-linux-amd64", 42 | "label": "", 43 | "uploader": { 44 | "login": "rifelpet", 45 | "id": 1455650, 46 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 47 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 48 | "gravatar_id": "", 49 | "url": "https://api.github.com/users/rifelpet", 50 | "html_url": "https://github.com/rifelpet", 51 | "followers_url": "https://api.github.com/users/rifelpet/followers", 52 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 53 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 54 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 55 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 56 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 57 | "repos_url": "https://api.github.com/users/rifelpet/repos", 58 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 59 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 60 | "type": "User", 61 | "user_view_type": "public", 62 | "site_admin": false 63 | }, 64 | "content_type": "application/octet-stream", 65 | "state": "uploaded", 66 | "size": 226849508, 67 | "download_count": 6, 68 | "created_at": "2024-11-26T16:06:57Z", 69 | "updated_at": "2024-11-26T16:08:58Z", 70 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/channels-linux-amd64" 71 | }, 72 | { 73 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209209664", 74 | "id": 209209664, 75 | "node_id": "RA_kwDOA7NwS84MeElA", 76 | "name": "channels-linux-amd64.sha256", 77 | "label": "", 78 | "uploader": { 79 | "login": "rifelpet", 80 | "id": 1455650, 81 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 82 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 83 | "gravatar_id": "", 84 | "url": "https://api.github.com/users/rifelpet", 85 | "html_url": "https://github.com/rifelpet", 86 | "followers_url": "https://api.github.com/users/rifelpet/followers", 87 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 88 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 89 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 90 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 91 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 92 | "repos_url": "https://api.github.com/users/rifelpet/repos", 93 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 94 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 95 | "type": "User", 96 | "user_view_type": "public", 97 | "site_admin": false 98 | }, 99 | "content_type": "application/octet-stream", 100 | "state": "uploaded", 101 | "size": 65, 102 | "download_count": 1, 103 | "created_at": "2024-11-26T16:08:58Z", 104 | "updated_at": "2024-11-26T16:08:58Z", 105 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/channels-linux-amd64.sha256" 106 | }, 107 | { 108 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209209666", 109 | "id": 209209666, 110 | "node_id": "RA_kwDOA7NwS84MeElC", 111 | "name": "channels-linux-arm64", 112 | "label": "", 113 | "uploader": { 114 | "login": "rifelpet", 115 | "id": 1455650, 116 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 117 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 118 | "gravatar_id": "", 119 | "url": "https://api.github.com/users/rifelpet", 120 | "html_url": "https://github.com/rifelpet", 121 | "followers_url": "https://api.github.com/users/rifelpet/followers", 122 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 123 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 124 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 125 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 126 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 127 | "repos_url": "https://api.github.com/users/rifelpet/repos", 128 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 129 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 130 | "type": "User", 131 | "user_view_type": "public", 132 | "site_admin": false 133 | }, 134 | "content_type": "application/octet-stream", 135 | "state": "uploaded", 136 | "size": 218313570, 137 | "download_count": 2, 138 | "created_at": "2024-11-26T16:08:59Z", 139 | "updated_at": "2024-11-26T16:10:34Z", 140 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/channels-linux-arm64" 141 | }, 142 | { 143 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209210118", 144 | "id": 209210118, 145 | "node_id": "RA_kwDOA7NwS84MeEsG", 146 | "name": "channels-linux-arm64.sha256", 147 | "label": "", 148 | "uploader": { 149 | "login": "rifelpet", 150 | "id": 1455650, 151 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 152 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 153 | "gravatar_id": "", 154 | "url": "https://api.github.com/users/rifelpet", 155 | "html_url": "https://github.com/rifelpet", 156 | "followers_url": "https://api.github.com/users/rifelpet/followers", 157 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 158 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 159 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 160 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 161 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 162 | "repos_url": "https://api.github.com/users/rifelpet/repos", 163 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 164 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 165 | "type": "User", 166 | "user_view_type": "public", 167 | "site_admin": false 168 | }, 169 | "content_type": "application/octet-stream", 170 | "state": "uploaded", 171 | "size": 65, 172 | "download_count": 1, 173 | "created_at": "2024-11-26T16:10:35Z", 174 | "updated_at": "2024-11-26T16:10:35Z", 175 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/channels-linux-arm64.sha256" 176 | }, 177 | { 178 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209206913", 179 | "id": 209206913, 180 | "node_id": "RA_kwDOA7NwS84MeD6B", 181 | "name": "kops-darwin-amd64", 182 | "label": "", 183 | "uploader": { 184 | "login": "rifelpet", 185 | "id": 1455650, 186 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 187 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 188 | "gravatar_id": "", 189 | "url": "https://api.github.com/users/rifelpet", 190 | "html_url": "https://github.com/rifelpet", 191 | "followers_url": "https://api.github.com/users/rifelpet/followers", 192 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 193 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 194 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 195 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 196 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 197 | "repos_url": "https://api.github.com/users/rifelpet/repos", 198 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 199 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 200 | "type": "User", 201 | "user_view_type": "public", 202 | "site_admin": false 203 | }, 204 | "content_type": "application/octet-stream", 205 | "state": "uploaded", 206 | "size": 258903488, 207 | "download_count": 13, 208 | "created_at": "2024-11-26T15:52:52Z", 209 | "updated_at": "2024-11-26T15:54:48Z", 210 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-darwin-amd64" 211 | }, 212 | { 213 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209207202", 214 | "id": 209207202, 215 | "node_id": "RA_kwDOA7NwS84MeD-i", 216 | "name": "kops-darwin-amd64.sha256", 217 | "label": "", 218 | "uploader": { 219 | "login": "rifelpet", 220 | "id": 1455650, 221 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 222 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 223 | "gravatar_id": "", 224 | "url": "https://api.github.com/users/rifelpet", 225 | "html_url": "https://github.com/rifelpet", 226 | "followers_url": "https://api.github.com/users/rifelpet/followers", 227 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 228 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 229 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 230 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 231 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 232 | "repos_url": "https://api.github.com/users/rifelpet/repos", 233 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 234 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 235 | "type": "User", 236 | "user_view_type": "public", 237 | "site_admin": false 238 | }, 239 | "content_type": "application/octet-stream", 240 | "state": "uploaded", 241 | "size": 65, 242 | "download_count": 3, 243 | "created_at": "2024-11-26T15:54:48Z", 244 | "updated_at": "2024-11-26T15:54:48Z", 245 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-darwin-amd64.sha256" 246 | }, 247 | { 248 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209207203", 249 | "id": 209207203, 250 | "node_id": "RA_kwDOA7NwS84MeD-j", 251 | "name": "kops-darwin-arm64", 252 | "label": "", 253 | "uploader": { 254 | "login": "rifelpet", 255 | "id": 1455650, 256 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 257 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 258 | "gravatar_id": "", 259 | "url": "https://api.github.com/users/rifelpet", 260 | "html_url": "https://github.com/rifelpet", 261 | "followers_url": "https://api.github.com/users/rifelpet/followers", 262 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 263 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 264 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 265 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 266 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 267 | "repos_url": "https://api.github.com/users/rifelpet/repos", 268 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 269 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 270 | "type": "User", 271 | "user_view_type": "public", 272 | "site_admin": false 273 | }, 274 | "content_type": "application/octet-stream", 275 | "state": "uploaded", 276 | "size": 250715026, 277 | "download_count": 13, 278 | "created_at": "2024-11-26T15:54:49Z", 279 | "updated_at": "2024-11-26T15:56:26Z", 280 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-darwin-arm64" 281 | }, 282 | { 283 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209207468", 284 | "id": 209207468, 285 | "node_id": "RA_kwDOA7NwS84MeECs", 286 | "name": "kops-darwin-arm64.sha256", 287 | "label": "", 288 | "uploader": { 289 | "login": "rifelpet", 290 | "id": 1455650, 291 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 292 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 293 | "gravatar_id": "", 294 | "url": "https://api.github.com/users/rifelpet", 295 | "html_url": "https://github.com/rifelpet", 296 | "followers_url": "https://api.github.com/users/rifelpet/followers", 297 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 298 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 299 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 300 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 301 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 302 | "repos_url": "https://api.github.com/users/rifelpet/repos", 303 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 304 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 305 | "type": "User", 306 | "user_view_type": "public", 307 | "site_admin": false 308 | }, 309 | "content_type": "application/octet-stream", 310 | "state": "uploaded", 311 | "size": 65, 312 | "download_count": 3, 313 | "created_at": "2024-11-26T15:56:26Z", 314 | "updated_at": "2024-11-26T15:56:26Z", 315 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-darwin-arm64.sha256" 316 | }, 317 | { 318 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209207469", 319 | "id": 209207469, 320 | "node_id": "RA_kwDOA7NwS84MeECt", 321 | "name": "kops-linux-amd64", 322 | "label": "", 323 | "uploader": { 324 | "login": "rifelpet", 325 | "id": 1455650, 326 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 327 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 328 | "gravatar_id": "", 329 | "url": "https://api.github.com/users/rifelpet", 330 | "html_url": "https://github.com/rifelpet", 331 | "followers_url": "https://api.github.com/users/rifelpet/followers", 332 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 333 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 334 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 335 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 336 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 337 | "repos_url": "https://api.github.com/users/rifelpet/repos", 338 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 339 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 340 | "type": "User", 341 | "user_view_type": "public", 342 | "site_admin": false 343 | }, 344 | "content_type": "application/octet-stream", 345 | "state": "uploaded", 346 | "size": 250286063, 347 | "download_count": 9742, 348 | "created_at": "2024-11-26T15:56:26Z", 349 | "updated_at": "2024-11-26T15:58:05Z", 350 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-linux-amd64" 351 | }, 352 | { 353 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209207824", 354 | "id": 209207824, 355 | "node_id": "RA_kwDOA7NwS84MeEIQ", 356 | "name": "kops-linux-amd64.sha256", 357 | "label": "", 358 | "uploader": { 359 | "login": "rifelpet", 360 | "id": 1455650, 361 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 362 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 363 | "gravatar_id": "", 364 | "url": "https://api.github.com/users/rifelpet", 365 | "html_url": "https://github.com/rifelpet", 366 | "followers_url": "https://api.github.com/users/rifelpet/followers", 367 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 368 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 369 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 370 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 371 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 372 | "repos_url": "https://api.github.com/users/rifelpet/repos", 373 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 374 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 375 | "type": "User", 376 | "user_view_type": "public", 377 | "site_admin": false 378 | }, 379 | "content_type": "application/octet-stream", 380 | "state": "uploaded", 381 | "size": 65, 382 | "download_count": 17, 383 | "created_at": "2024-11-26T15:58:06Z", 384 | "updated_at": "2024-11-26T15:58:06Z", 385 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-linux-amd64.sha256" 386 | }, 387 | { 388 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209207825", 389 | "id": 209207825, 390 | "node_id": "RA_kwDOA7NwS84MeEIR", 391 | "name": "kops-linux-arm64", 392 | "label": "", 393 | "uploader": { 394 | "login": "rifelpet", 395 | "id": 1455650, 396 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 397 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 398 | "gravatar_id": "", 399 | "url": "https://api.github.com/users/rifelpet", 400 | "html_url": "https://github.com/rifelpet", 401 | "followers_url": "https://api.github.com/users/rifelpet/followers", 402 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 403 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 404 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 405 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 406 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 407 | "repos_url": "https://api.github.com/users/rifelpet/repos", 408 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 409 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 410 | "type": "User", 411 | "user_view_type": "public", 412 | "site_admin": false 413 | }, 414 | "content_type": "application/octet-stream", 415 | "state": "uploaded", 416 | "size": 240944834, 417 | "download_count": 44, 418 | "created_at": "2024-11-26T15:58:06Z", 419 | "updated_at": "2024-11-26T15:59:41Z", 420 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-linux-arm64" 421 | }, 422 | { 423 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208087", 424 | "id": 209208087, 425 | "node_id": "RA_kwDOA7NwS84MeEMX", 426 | "name": "kops-linux-arm64.sha256", 427 | "label": "", 428 | "uploader": { 429 | "login": "rifelpet", 430 | "id": 1455650, 431 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 432 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 433 | "gravatar_id": "", 434 | "url": "https://api.github.com/users/rifelpet", 435 | "html_url": "https://github.com/rifelpet", 436 | "followers_url": "https://api.github.com/users/rifelpet/followers", 437 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 438 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 439 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 440 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 441 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 442 | "repos_url": "https://api.github.com/users/rifelpet/repos", 443 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 444 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 445 | "type": "User", 446 | "user_view_type": "public", 447 | "site_admin": false 448 | }, 449 | "content_type": "application/octet-stream", 450 | "state": "uploaded", 451 | "size": 65, 452 | "download_count": 10, 453 | "created_at": "2024-11-26T15:59:41Z", 454 | "updated_at": "2024-11-26T15:59:41Z", 455 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-linux-arm64.sha256" 456 | }, 457 | { 458 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208089", 459 | "id": 209208089, 460 | "node_id": "RA_kwDOA7NwS84MeEMZ", 461 | "name": "kops-windows-amd64", 462 | "label": "", 463 | "uploader": { 464 | "login": "rifelpet", 465 | "id": 1455650, 466 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 467 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 468 | "gravatar_id": "", 469 | "url": "https://api.github.com/users/rifelpet", 470 | "html_url": "https://github.com/rifelpet", 471 | "followers_url": "https://api.github.com/users/rifelpet/followers", 472 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 473 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 474 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 475 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 476 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 477 | "repos_url": "https://api.github.com/users/rifelpet/repos", 478 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 479 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 480 | "type": "User", 481 | "user_view_type": "public", 482 | "site_admin": false 483 | }, 484 | "content_type": "application/x-msdownload", 485 | "state": "uploaded", 486 | "size": 253044224, 487 | "download_count": 28, 488 | "created_at": "2024-11-26T15:59:41Z", 489 | "updated_at": "2024-11-26T16:01:29Z", 490 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-windows-amd64" 491 | }, 492 | { 493 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208521", 494 | "id": 209208521, 495 | "node_id": "RA_kwDOA7NwS84MeETJ", 496 | "name": "kops-windows-amd64.sha256", 497 | "label": "", 498 | "uploader": { 499 | "login": "rifelpet", 500 | "id": 1455650, 501 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 502 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 503 | "gravatar_id": "", 504 | "url": "https://api.github.com/users/rifelpet", 505 | "html_url": "https://github.com/rifelpet", 506 | "followers_url": "https://api.github.com/users/rifelpet/followers", 507 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 508 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 509 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 510 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 511 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 512 | "repos_url": "https://api.github.com/users/rifelpet/repos", 513 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 514 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 515 | "type": "User", 516 | "user_view_type": "public", 517 | "site_admin": false 518 | }, 519 | "content_type": "application/octet-stream", 520 | "state": "uploaded", 521 | "size": 65, 522 | "download_count": 31, 523 | "created_at": "2024-11-26T16:01:29Z", 524 | "updated_at": "2024-11-26T16:01:29Z", 525 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/kops-windows-amd64.sha256" 526 | }, 527 | { 528 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208524", 529 | "id": 209208524, 530 | "node_id": "RA_kwDOA7NwS84MeETM", 531 | "name": "nodeup-linux-amd64", 532 | "label": "", 533 | "uploader": { 534 | "login": "rifelpet", 535 | "id": 1455650, 536 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 537 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 538 | "gravatar_id": "", 539 | "url": "https://api.github.com/users/rifelpet", 540 | "html_url": "https://github.com/rifelpet", 541 | "followers_url": "https://api.github.com/users/rifelpet/followers", 542 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 543 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 544 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 545 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 546 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 547 | "repos_url": "https://api.github.com/users/rifelpet/repos", 548 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 549 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 550 | "type": "User", 551 | "user_view_type": "public", 552 | "site_admin": false 553 | }, 554 | "content_type": "application/octet-stream", 555 | "state": "uploaded", 556 | "size": 210740332, 557 | "download_count": 10, 558 | "created_at": "2024-11-26T16:01:30Z", 559 | "updated_at": "2024-11-26T16:03:06Z", 560 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/nodeup-linux-amd64" 561 | }, 562 | { 563 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208733", 564 | "id": 209208733, 565 | "node_id": "RA_kwDOA7NwS84MeEWd", 566 | "name": "nodeup-linux-amd64.sha256", 567 | "label": "", 568 | "uploader": { 569 | "login": "rifelpet", 570 | "id": 1455650, 571 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 572 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 573 | "gravatar_id": "", 574 | "url": "https://api.github.com/users/rifelpet", 575 | "html_url": "https://github.com/rifelpet", 576 | "followers_url": "https://api.github.com/users/rifelpet/followers", 577 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 578 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 579 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 580 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 581 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 582 | "repos_url": "https://api.github.com/users/rifelpet/repos", 583 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 584 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 585 | "type": "User", 586 | "user_view_type": "public", 587 | "site_admin": false 588 | }, 589 | "content_type": "application/octet-stream", 590 | "state": "uploaded", 591 | "size": 65, 592 | "download_count": 4, 593 | "created_at": "2024-11-26T16:03:07Z", 594 | "updated_at": "2024-11-26T16:03:07Z", 595 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/nodeup-linux-amd64.sha256" 596 | }, 597 | { 598 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208734", 599 | "id": 209208734, 600 | "node_id": "RA_kwDOA7NwS84MeEWe", 601 | "name": "nodeup-linux-arm64", 602 | "label": "", 603 | "uploader": { 604 | "login": "rifelpet", 605 | "id": 1455650, 606 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 607 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 608 | "gravatar_id": "", 609 | "url": "https://api.github.com/users/rifelpet", 610 | "html_url": "https://github.com/rifelpet", 611 | "followers_url": "https://api.github.com/users/rifelpet/followers", 612 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 613 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 614 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 615 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 616 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 617 | "repos_url": "https://api.github.com/users/rifelpet/repos", 618 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 619 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 620 | "type": "User", 621 | "user_view_type": "public", 622 | "site_admin": false 623 | }, 624 | "content_type": "application/octet-stream", 625 | "state": "uploaded", 626 | "size": 202522100, 627 | "download_count": 1, 628 | "created_at": "2024-11-26T16:03:07Z", 629 | "updated_at": "2024-11-26T16:04:37Z", 630 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/nodeup-linux-arm64" 631 | }, 632 | { 633 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208988", 634 | "id": 209208988, 635 | "node_id": "RA_kwDOA7NwS84MeEac", 636 | "name": "nodeup-linux-arm64.sha256", 637 | "label": "", 638 | "uploader": { 639 | "login": "rifelpet", 640 | "id": 1455650, 641 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 642 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 643 | "gravatar_id": "", 644 | "url": "https://api.github.com/users/rifelpet", 645 | "html_url": "https://github.com/rifelpet", 646 | "followers_url": "https://api.github.com/users/rifelpet/followers", 647 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 648 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 649 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 650 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 651 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 652 | "repos_url": "https://api.github.com/users/rifelpet/repos", 653 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 654 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 655 | "type": "User", 656 | "user_view_type": "public", 657 | "site_admin": false 658 | }, 659 | "content_type": "application/octet-stream", 660 | "state": "uploaded", 661 | "size": 65, 662 | "download_count": 2, 663 | "created_at": "2024-11-26T16:04:37Z", 664 | "updated_at": "2024-11-26T16:04:37Z", 665 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/nodeup-linux-arm64.sha256" 666 | }, 667 | { 668 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209208989", 669 | "id": 209208989, 670 | "node_id": "RA_kwDOA7NwS84MeEad", 671 | "name": "protokube-linux-amd64", 672 | "label": "", 673 | "uploader": { 674 | "login": "rifelpet", 675 | "id": 1455650, 676 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 677 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 678 | "gravatar_id": "", 679 | "url": "https://api.github.com/users/rifelpet", 680 | "html_url": "https://github.com/rifelpet", 681 | "followers_url": "https://api.github.com/users/rifelpet/followers", 682 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 683 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 684 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 685 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 686 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 687 | "repos_url": "https://api.github.com/users/rifelpet/repos", 688 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 689 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 690 | "type": "User", 691 | "user_view_type": "public", 692 | "site_admin": false 693 | }, 694 | "content_type": "application/octet-stream", 695 | "state": "uploaded", 696 | "size": 152174946, 697 | "download_count": 4, 698 | "created_at": "2024-11-26T16:04:38Z", 699 | "updated_at": "2024-11-26T16:05:50Z", 700 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/protokube-linux-amd64" 701 | }, 702 | { 703 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209209202", 704 | "id": 209209202, 705 | "node_id": "RA_kwDOA7NwS84MeEdy", 706 | "name": "protokube-linux-amd64.sha256", 707 | "label": "", 708 | "uploader": { 709 | "login": "rifelpet", 710 | "id": 1455650, 711 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 712 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 713 | "gravatar_id": "", 714 | "url": "https://api.github.com/users/rifelpet", 715 | "html_url": "https://github.com/rifelpet", 716 | "followers_url": "https://api.github.com/users/rifelpet/followers", 717 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 718 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 719 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 720 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 721 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 722 | "repos_url": "https://api.github.com/users/rifelpet/repos", 723 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 724 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 725 | "type": "User", 726 | "user_view_type": "public", 727 | "site_admin": false 728 | }, 729 | "content_type": "application/octet-stream", 730 | "state": "uploaded", 731 | "size": 65, 732 | "download_count": 2, 733 | "created_at": "2024-11-26T16:05:50Z", 734 | "updated_at": "2024-11-26T16:05:51Z", 735 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/protokube-linux-amd64.sha256" 736 | }, 737 | { 738 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209209203", 739 | "id": 209209203, 740 | "node_id": "RA_kwDOA7NwS84MeEdz", 741 | "name": "protokube-linux-arm64", 742 | "label": "", 743 | "uploader": { 744 | "login": "rifelpet", 745 | "id": 1455650, 746 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 747 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 748 | "gravatar_id": "", 749 | "url": "https://api.github.com/users/rifelpet", 750 | "html_url": "https://github.com/rifelpet", 751 | "followers_url": "https://api.github.com/users/rifelpet/followers", 752 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 753 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 754 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 755 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 756 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 757 | "repos_url": "https://api.github.com/users/rifelpet/repos", 758 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 759 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 760 | "type": "User", 761 | "user_view_type": "public", 762 | "site_admin": false 763 | }, 764 | "content_type": "application/octet-stream", 765 | "state": "uploaded", 766 | "size": 146235423, 767 | "download_count": 1, 768 | "created_at": "2024-11-26T16:05:51Z", 769 | "updated_at": "2024-11-26T16:06:56Z", 770 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/protokube-linux-arm64" 771 | }, 772 | { 773 | "url": "https://api.github.com/repos/kubernetes/kops/releases/assets/209209359", 774 | "id": 209209359, 775 | "node_id": "RA_kwDOA7NwS84MeEgP", 776 | "name": "protokube-linux-arm64.sha256", 777 | "label": "", 778 | "uploader": { 779 | "login": "rifelpet", 780 | "id": 1455650, 781 | "node_id": "MDQ6VXNlcjE0NTU2NTA=", 782 | "avatar_url": "https://avatars.githubusercontent.com/u/1455650?v=4", 783 | "gravatar_id": "", 784 | "url": "https://api.github.com/users/rifelpet", 785 | "html_url": "https://github.com/rifelpet", 786 | "followers_url": "https://api.github.com/users/rifelpet/followers", 787 | "following_url": "https://api.github.com/users/rifelpet/following{/other_user}", 788 | "gists_url": "https://api.github.com/users/rifelpet/gists{/gist_id}", 789 | "starred_url": "https://api.github.com/users/rifelpet/starred{/owner}{/repo}", 790 | "subscriptions_url": "https://api.github.com/users/rifelpet/subscriptions", 791 | "organizations_url": "https://api.github.com/users/rifelpet/orgs", 792 | "repos_url": "https://api.github.com/users/rifelpet/repos", 793 | "events_url": "https://api.github.com/users/rifelpet/events{/privacy}", 794 | "received_events_url": "https://api.github.com/users/rifelpet/received_events", 795 | "type": "User", 796 | "user_view_type": "public", 797 | "site_admin": false 798 | }, 799 | "content_type": "application/octet-stream", 800 | "state": "uploaded", 801 | "size": 65, 802 | "download_count": 2, 803 | "created_at": "2024-11-26T16:06:56Z", 804 | "updated_at": "2024-11-26T16:06:56Z", 805 | "browser_download_url": "https://github.com/kubernetes/kops/releases/download/v1.30.2/protokube-linux-arm64.sha256" 806 | } 807 | ], 808 | "tarball_url": "https://api.github.com/repos/kubernetes/kops/tarball/v1.30.2", 809 | "zipball_url": "https://api.github.com/repos/kubernetes/kops/zipball/v1.30.2", 810 | "body": "Release v1.30.2\r\n\r\n## What's Changed\r\n* Automated cherry pick of #16779: versionbump: update golang to 1.22.6\r\n#16826: Update Go to v1.22.7 by @hakman in https://github.com/kubernetes/kops/pull/16827\r\n* Automated cherry pick of #16818: Conditionally set TF aws_s3_object SSE and ACLs by @rifelpet in https://github.com/kubernetes/kops/pull/16830\r\n* Automated cherry pick of #16831: Disable node-problem-detector containerd and kubelet checks by @hakman in https://github.com/kubernetes/kops/pull/16832\r\n* Automated cherry pick of #16853: fix(cluster-autoscaler): add missing permission\r\n#16855: correct hubble tls file names as mapped from secret by @hakman in https://github.com/kubernetes/kops/pull/16856\r\n* Automated cherry pick of #16857: Suppress request logging for IMDS within Route53 client by @rifelpet in https://github.com/kubernetes/kops/pull/16858\r\n* Automated cherry pick of #16879: Ignore blackhole NAT routes\r\n#16868: aws: Update VPC CNI to v1.18.5 by @hakman in https://github.com/kubernetes/kops/pull/16881\r\n* Automated cherry pick of #16883: Update containerd to v1.7.22 by @hakman in https://github.com/kubernetes/kops/pull/16884\r\n* Automated cherry pick of #16887: Fix awsup default and DescribeTag max retries by @hakman in https://github.com/kubernetes/kops/pull/16891\r\n* Automated cherry pick of #16909: Use a different healthcheck port for AWS CSI controller by @rifelpet in https://github.com/kubernetes/kops/pull/16910\r\n* Automated cherry pick of #16560: Bump nvidia-driver-535-server by @hakman in https://github.com/kubernetes/kops/pull/16926\r\n* Automated cherry pick of #16915: dns: Update coredns to v1.11.3 by @hakman in https://github.com/kubernetes/kops/pull/16927\r\n* Automated cherry pick of #16918: API Server: memory management related flags by @hakman in https://github.com/kubernetes/kops/pull/16928\r\n* Automated cherry pick of #16949: chore(upup): bump aws-cni to 1.18.6 by @moshevayner in https://github.com/kubernetes/kops/pull/16950\r\n* Automated cherry pick of #16948: openstack: add external dns support by @rifelpet in https://github.com/kubernetes/kops/pull/16957\r\n* Automated cherry pick of #16765: Allocate more resources to cloudbuild by @rifelpet in https://github.com/kubernetes/kops/pull/16959\r\n* Release 1.30.2 by @rifelpet in https://github.com/kubernetes/kops/pull/16960\r\n\r\n\r\n**Full Changelog**: https://github.com/kubernetes/kops/compare/v1.30.1...v1.30.2", 811 | "reactions": { 812 | "url": "https://api.github.com/repos/kubernetes/kops/releases/187574005/reactions", 813 | "total_count": 2, 814 | "+1": 0, 815 | "-1": 0, 816 | "laugh": 0, 817 | "hooray": 2, 818 | "confused": 0, 819 | "heart": 0, 820 | "rocket": 0, 821 | "eyes": 0 822 | }, 823 | "mentions_count": 3 824 | } 825 | -------------------------------------------------------------------------------- /test/fixtures/releases/terragrunt/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/188105842", 3 | "assets_url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/188105842/assets", 4 | "upload_url": "https://uploads.github.com/repos/gruntwork-io/terragrunt/releases/188105842/assets{?name,label}", 5 | "html_url": "https://github.com/gruntwork-io/terragrunt/releases/tag/v0.69.3", 6 | "id": 188105842, 7 | "author": { 8 | "login": "levkohimins", 9 | "id": 62853952, 10 | "node_id": "MDQ6VXNlcjYyODUzOTUy", 11 | "avatar_url": "https://avatars.githubusercontent.com/u/62853952?v=4", 12 | "gravatar_id": "", 13 | "url": "https://api.github.com/users/levkohimins", 14 | "html_url": "https://github.com/levkohimins", 15 | "followers_url": "https://api.github.com/users/levkohimins/followers", 16 | "following_url": "https://api.github.com/users/levkohimins/following{/other_user}", 17 | "gists_url": "https://api.github.com/users/levkohimins/gists{/gist_id}", 18 | "starred_url": "https://api.github.com/users/levkohimins/starred{/owner}{/repo}", 19 | "subscriptions_url": "https://api.github.com/users/levkohimins/subscriptions", 20 | "organizations_url": "https://api.github.com/users/levkohimins/orgs", 21 | "repos_url": "https://api.github.com/users/levkohimins/repos", 22 | "events_url": "https://api.github.com/users/levkohimins/events{/privacy}", 23 | "received_events_url": "https://api.github.com/users/levkohimins/received_events", 24 | "type": "User", 25 | "user_view_type": "public", 26 | "site_admin": false 27 | }, 28 | "node_id": "RE_kwDOA4w8Zc4LNkRy", 29 | "tag_name": "v0.69.3", 30 | "target_commitish": "main", 31 | "name": "v0.69.3", 32 | "draft": false, 33 | "prerelease": false, 34 | "created_at": "2024-11-28T21:22:57Z", 35 | "published_at": "2024-11-28T21:27:36Z", 36 | "assets": [ 37 | { 38 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741745", 39 | "id": 209741745, 40 | "node_id": "RA_kwDOA4w8Zc4MgGex", 41 | "name": "SHA256SUMS", 42 | "label": "", 43 | "uploader": { 44 | "login": "gruntwork-ci", 45 | "id": 17789764, 46 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 47 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 48 | "gravatar_id": "", 49 | "url": "https://api.github.com/users/gruntwork-ci", 50 | "html_url": "https://github.com/gruntwork-ci", 51 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 52 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 53 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 54 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 55 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 56 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 57 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 58 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 59 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 60 | "type": "User", 61 | "user_view_type": "public", 62 | "site_admin": false 63 | }, 64 | "content_type": "application/x-executable", 65 | "state": "uploaded", 66 | "size": 633, 67 | "download_count": 1595, 68 | "created_at": "2024-11-28T21:34:32Z", 69 | "updated_at": "2024-11-28T21:34:32Z", 70 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/SHA256SUMS" 71 | }, 72 | { 73 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741746", 74 | "id": 209741746, 75 | "node_id": "RA_kwDOA4w8Zc4MgGey", 76 | "name": "terragrunt_darwin_amd64", 77 | "label": "", 78 | "uploader": { 79 | "login": "gruntwork-ci", 80 | "id": 17789764, 81 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 82 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 83 | "gravatar_id": "", 84 | "url": "https://api.github.com/users/gruntwork-ci", 85 | "html_url": "https://github.com/gruntwork-ci", 86 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 87 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 88 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 89 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 90 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 91 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 92 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 93 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 94 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 95 | "type": "User", 96 | "user_view_type": "public", 97 | "site_admin": false 98 | }, 99 | "content_type": "application/x-executable", 100 | "state": "uploaded", 101 | "size": 102270624, 102 | "download_count": 98, 103 | "created_at": "2024-11-28T21:34:32Z", 104 | "updated_at": "2024-11-28T21:34:34Z", 105 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_darwin_amd64" 106 | }, 107 | { 108 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741753", 109 | "id": 209741753, 110 | "node_id": "RA_kwDOA4w8Zc4MgGe5", 111 | "name": "terragrunt_darwin_arm64", 112 | "label": "", 113 | "uploader": { 114 | "login": "gruntwork-ci", 115 | "id": 17789764, 116 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 117 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 118 | "gravatar_id": "", 119 | "url": "https://api.github.com/users/gruntwork-ci", 120 | "html_url": "https://github.com/gruntwork-ci", 121 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 122 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 123 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 124 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 125 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 126 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 127 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 128 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 129 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 130 | "type": "User", 131 | "user_view_type": "public", 132 | "site_admin": false 133 | }, 134 | "content_type": "application/x-executable", 135 | "state": "uploaded", 136 | "size": 98999760, 137 | "download_count": 277, 138 | "created_at": "2024-11-28T21:34:34Z", 139 | "updated_at": "2024-11-28T21:34:36Z", 140 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_darwin_arm64" 141 | }, 142 | { 143 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741762", 144 | "id": 209741762, 145 | "node_id": "RA_kwDOA4w8Zc4MgGfC", 146 | "name": "terragrunt_linux_386", 147 | "label": "", 148 | "uploader": { 149 | "login": "gruntwork-ci", 150 | "id": 17789764, 151 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 152 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 153 | "gravatar_id": "", 154 | "url": "https://api.github.com/users/gruntwork-ci", 155 | "html_url": "https://github.com/gruntwork-ci", 156 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 157 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 158 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 159 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 160 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 161 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 162 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 163 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 164 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 165 | "type": "User", 166 | "user_view_type": "public", 167 | "site_admin": false 168 | }, 169 | "content_type": "application/x-executable", 170 | "state": "uploaded", 171 | "size": 92595065, 172 | "download_count": 37, 173 | "created_at": "2024-11-28T21:34:37Z", 174 | "updated_at": "2024-11-28T21:34:38Z", 175 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_linux_386" 176 | }, 177 | { 178 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741765", 179 | "id": 209741765, 180 | "node_id": "RA_kwDOA4w8Zc4MgGfF", 181 | "name": "terragrunt_linux_amd64", 182 | "label": "", 183 | "uploader": { 184 | "login": "gruntwork-ci", 185 | "id": 17789764, 186 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 187 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 188 | "gravatar_id": "", 189 | "url": "https://api.github.com/users/gruntwork-ci", 190 | "html_url": "https://github.com/gruntwork-ci", 191 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 192 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 193 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 194 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 195 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 196 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 197 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 198 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 199 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 200 | "type": "User", 201 | "user_view_type": "public", 202 | "site_admin": false 203 | }, 204 | "content_type": "application/x-executable", 205 | "state": "uploaded", 206 | "size": 99859165, 207 | "download_count": 9500, 208 | "created_at": "2024-11-28T21:34:38Z", 209 | "updated_at": "2024-11-28T21:34:40Z", 210 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_linux_amd64" 211 | }, 212 | { 213 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741770", 214 | "id": 209741770, 215 | "node_id": "RA_kwDOA4w8Zc4MgGfK", 216 | "name": "terragrunt_linux_arm64", 217 | "label": "", 218 | "uploader": { 219 | "login": "gruntwork-ci", 220 | "id": 17789764, 221 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 222 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 223 | "gravatar_id": "", 224 | "url": "https://api.github.com/users/gruntwork-ci", 225 | "html_url": "https://github.com/gruntwork-ci", 226 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 227 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 228 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 229 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 230 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 231 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 232 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 233 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 234 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 235 | "type": "User", 236 | "user_view_type": "public", 237 | "site_admin": false 238 | }, 239 | "content_type": "application/x-executable", 240 | "state": "uploaded", 241 | "size": 96803029, 242 | "download_count": 658, 243 | "created_at": "2024-11-28T21:34:41Z", 244 | "updated_at": "2024-11-28T21:34:42Z", 245 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_linux_arm64" 246 | }, 247 | { 248 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741783", 249 | "id": 209741783, 250 | "node_id": "RA_kwDOA4w8Zc4MgGfX", 251 | "name": "terragrunt_windows_386.exe", 252 | "label": "", 253 | "uploader": { 254 | "login": "gruntwork-ci", 255 | "id": 17789764, 256 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 257 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 258 | "gravatar_id": "", 259 | "url": "https://api.github.com/users/gruntwork-ci", 260 | "html_url": "https://github.com/gruntwork-ci", 261 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 262 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 263 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 264 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 265 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 266 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 267 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 268 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 269 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 270 | "type": "User", 271 | "user_view_type": "public", 272 | "site_admin": false 273 | }, 274 | "content_type": "application/x-executable", 275 | "state": "uploaded", 276 | "size": 94718976, 277 | "download_count": 56, 278 | "created_at": "2024-11-28T21:34:43Z", 279 | "updated_at": "2024-11-28T21:34:45Z", 280 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_windows_386.exe" 281 | }, 282 | { 283 | "url": "https://api.github.com/repos/gruntwork-io/terragrunt/releases/assets/209741784", 284 | "id": 209741784, 285 | "node_id": "RA_kwDOA4w8Zc4MgGfY", 286 | "name": "terragrunt_windows_amd64.exe", 287 | "label": "", 288 | "uploader": { 289 | "login": "gruntwork-ci", 290 | "id": 17789764, 291 | "node_id": "MDQ6VXNlcjE3Nzg5NzY0", 292 | "avatar_url": "https://avatars.githubusercontent.com/u/17789764?v=4", 293 | "gravatar_id": "", 294 | "url": "https://api.github.com/users/gruntwork-ci", 295 | "html_url": "https://github.com/gruntwork-ci", 296 | "followers_url": "https://api.github.com/users/gruntwork-ci/followers", 297 | "following_url": "https://api.github.com/users/gruntwork-ci/following{/other_user}", 298 | "gists_url": "https://api.github.com/users/gruntwork-ci/gists{/gist_id}", 299 | "starred_url": "https://api.github.com/users/gruntwork-ci/starred{/owner}{/repo}", 300 | "subscriptions_url": "https://api.github.com/users/gruntwork-ci/subscriptions", 301 | "organizations_url": "https://api.github.com/users/gruntwork-ci/orgs", 302 | "repos_url": "https://api.github.com/users/gruntwork-ci/repos", 303 | "events_url": "https://api.github.com/users/gruntwork-ci/events{/privacy}", 304 | "received_events_url": "https://api.github.com/users/gruntwork-ci/received_events", 305 | "type": "User", 306 | "user_view_type": "public", 307 | "site_admin": false 308 | }, 309 | "content_type": "application/x-executable", 310 | "state": "uploaded", 311 | "size": 101180416, 312 | "download_count": 200, 313 | "created_at": "2024-11-28T21:34:45Z", 314 | "updated_at": "2024-11-28T21:34:47Z", 315 | "browser_download_url": "https://github.com/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_windows_amd64.exe" 316 | } 317 | ], 318 | "tarball_url": "https://api.github.com/repos/gruntwork-io/terragrunt/tarball/v0.69.3", 319 | "zipball_url": "https://api.github.com/repos/gruntwork-io/terragrunt/zipball/v0.69.3", 320 | "body": "## What's Changed\r\n* Fixing an issue when `error_hook` processing only takes `stderr` into account and ignores `stdout` TF output.\r\n* Displaying stack trace only at log level `trace`, e.g. `--terragrunt-log-level trace`.\r\n\r\n**Full Changelog**: https://github.com/gruntwork-io/terragrunt/compare/v0.69.2...v0.69.3" 321 | } 322 | -------------------------------------------------------------------------------- /test/fixtures/releases/trufflehog/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/188543111", 3 | "assets_url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/188543111/assets", 4 | "upload_url": "https://uploads.github.com/repos/trufflesecurity/trufflehog/releases/188543111/assets{?name,label}", 5 | "html_url": "https://github.com/trufflesecurity/trufflehog/releases/tag/v3.84.2", 6 | "id": 188543111, 7 | "author": { 8 | "login": "ahrav", 9 | "id": 21311841, 10 | "node_id": "MDQ6VXNlcjIxMzExODQx", 11 | "avatar_url": "https://avatars.githubusercontent.com/u/21311841?v=4", 12 | "gravatar_id": "", 13 | "url": "https://api.github.com/users/ahrav", 14 | "html_url": "https://github.com/ahrav", 15 | "followers_url": "https://api.github.com/users/ahrav/followers", 16 | "following_url": "https://api.github.com/users/ahrav/following{/other_user}", 17 | "gists_url": "https://api.github.com/users/ahrav/gists{/gist_id}", 18 | "starred_url": "https://api.github.com/users/ahrav/starred{/owner}{/repo}", 19 | "subscriptions_url": "https://api.github.com/users/ahrav/subscriptions", 20 | "organizations_url": "https://api.github.com/users/ahrav/orgs", 21 | "repos_url": "https://api.github.com/users/ahrav/repos", 22 | "events_url": "https://api.github.com/users/ahrav/events{/privacy}", 23 | "received_events_url": "https://api.github.com/users/ahrav/received_events", 24 | "type": "User", 25 | "user_view_type": "public", 26 | "site_admin": false 27 | }, 28 | "node_id": "RE_kwDOBKIB4c4LPPCH", 29 | "tag_name": "v3.84.2", 30 | "target_commitish": "main", 31 | "name": "v3.84.2", 32 | "draft": false, 33 | "prerelease": false, 34 | "created_at": "2024-12-02T15:08:53Z", 35 | "published_at": "2024-12-02T17:57:50Z", 36 | "assets": [ 37 | { 38 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543584", 39 | "id": 210543584, 40 | "node_id": "RA_kwDOBKIB4c4MjKPg", 41 | "name": "trufflehog_3.84.2_checksums.txt", 42 | "label": "", 43 | "uploader": { 44 | "login": "github-actions[bot]", 45 | "id": 41898282, 46 | "node_id": "MDM6Qm90NDE4OTgyODI=", 47 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 48 | "gravatar_id": "", 49 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 50 | "html_url": "https://github.com/apps/github-actions", 51 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 52 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 53 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 54 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 55 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 56 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 57 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 58 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 59 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 60 | "type": "Bot", 61 | "user_view_type": "public", 62 | "site_admin": false 63 | }, 64 | "content_type": "text/plain; charset=utf-8", 65 | "state": "uploaded", 66 | "size": 624, 67 | "download_count": 127, 68 | "created_at": "2024-12-02T18:13:21Z", 69 | "updated_at": "2024-12-02T18:13:22Z", 70 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_checksums.txt" 71 | }, 72 | { 73 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543588", 74 | "id": 210543588, 75 | "node_id": "RA_kwDOBKIB4c4MjKPk", 76 | "name": "trufflehog_3.84.2_checksums.txt.pem", 77 | "label": "", 78 | "uploader": { 79 | "login": "github-actions[bot]", 80 | "id": 41898282, 81 | "node_id": "MDM6Qm90NDE4OTgyODI=", 82 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 83 | "gravatar_id": "", 84 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 85 | "html_url": "https://github.com/apps/github-actions", 86 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 87 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 88 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 89 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 90 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 91 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 92 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 93 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 94 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 95 | "type": "Bot", 96 | "user_view_type": "public", 97 | "site_admin": false 98 | }, 99 | "content_type": "application/x-x509-ca-cert", 100 | "state": "uploaded", 101 | "size": 3280, 102 | "download_count": 1, 103 | "created_at": "2024-12-02T18:13:22Z", 104 | "updated_at": "2024-12-02T18:13:22Z", 105 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_checksums.txt.pem" 106 | }, 107 | { 108 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543586", 109 | "id": 210543586, 110 | "node_id": "RA_kwDOBKIB4c4MjKPi", 111 | "name": "trufflehog_3.84.2_checksums.txt.sig", 112 | "label": "", 113 | "uploader": { 114 | "login": "github-actions[bot]", 115 | "id": 41898282, 116 | "node_id": "MDM6Qm90NDE4OTgyODI=", 117 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 118 | "gravatar_id": "", 119 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 120 | "html_url": "https://github.com/apps/github-actions", 121 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 122 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 123 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 124 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 125 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 126 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 127 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 128 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 129 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 130 | "type": "Bot", 131 | "user_view_type": "public", 132 | "site_admin": false 133 | }, 134 | "content_type": "application/pgp-signature", 135 | "state": "uploaded", 136 | "size": 96, 137 | "download_count": 1, 138 | "created_at": "2024-12-02T18:13:22Z", 139 | "updated_at": "2024-12-02T18:13:22Z", 140 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_checksums.txt.sig" 141 | }, 142 | { 143 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543583", 144 | "id": 210543583, 145 | "node_id": "RA_kwDOBKIB4c4MjKPf", 146 | "name": "trufflehog_3.84.2_darwin_amd64.tar.gz", 147 | "label": "", 148 | "uploader": { 149 | "login": "github-actions[bot]", 150 | "id": 41898282, 151 | "node_id": "MDM6Qm90NDE4OTgyODI=", 152 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 153 | "gravatar_id": "", 154 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 155 | "html_url": "https://github.com/apps/github-actions", 156 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 157 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 158 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 159 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 160 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 161 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 162 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 163 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 164 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 165 | "type": "Bot", 166 | "user_view_type": "public", 167 | "site_admin": false 168 | }, 169 | "content_type": "application/gzip", 170 | "state": "uploaded", 171 | "size": 38030994, 172 | "download_count": 13, 173 | "created_at": "2024-12-02T18:13:21Z", 174 | "updated_at": "2024-12-02T18:13:23Z", 175 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_darwin_amd64.tar.gz" 176 | }, 177 | { 178 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543581", 179 | "id": 210543581, 180 | "node_id": "RA_kwDOBKIB4c4MjKPd", 181 | "name": "trufflehog_3.84.2_darwin_arm64.tar.gz", 182 | "label": "", 183 | "uploader": { 184 | "login": "github-actions[bot]", 185 | "id": 41898282, 186 | "node_id": "MDM6Qm90NDE4OTgyODI=", 187 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 188 | "gravatar_id": "", 189 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 190 | "html_url": "https://github.com/apps/github-actions", 191 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 192 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 193 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 194 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 195 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 196 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 197 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 198 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 199 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 200 | "type": "Bot", 201 | "user_view_type": "public", 202 | "site_admin": false 203 | }, 204 | "content_type": "application/gzip", 205 | "state": "uploaded", 206 | "size": 35325780, 207 | "download_count": 137, 208 | "created_at": "2024-12-02T18:13:21Z", 209 | "updated_at": "2024-12-02T18:13:22Z", 210 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_darwin_arm64.tar.gz" 211 | }, 212 | { 213 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543564", 214 | "id": 210543564, 215 | "node_id": "RA_kwDOBKIB4c4MjKPM", 216 | "name": "trufflehog_3.84.2_linux_amd64.tar.gz", 217 | "label": "", 218 | "uploader": { 219 | "login": "github-actions[bot]", 220 | "id": 41898282, 221 | "node_id": "MDM6Qm90NDE4OTgyODI=", 222 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 223 | "gravatar_id": "", 224 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 225 | "html_url": "https://github.com/apps/github-actions", 226 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 227 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 228 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 229 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 230 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 231 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 232 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 233 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 234 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 235 | "type": "Bot", 236 | "user_view_type": "public", 237 | "site_admin": false 238 | }, 239 | "content_type": "application/gzip", 240 | "state": "uploaded", 241 | "size": 37309218, 242 | "download_count": 364, 243 | "created_at": "2024-12-02T18:13:11Z", 244 | "updated_at": "2024-12-02T18:13:21Z", 245 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_linux_amd64.tar.gz" 246 | }, 247 | { 248 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543562", 249 | "id": 210543562, 250 | "node_id": "RA_kwDOBKIB4c4MjKPK", 251 | "name": "trufflehog_3.84.2_linux_arm64.tar.gz", 252 | "label": "", 253 | "uploader": { 254 | "login": "github-actions[bot]", 255 | "id": 41898282, 256 | "node_id": "MDM6Qm90NDE4OTgyODI=", 257 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 258 | "gravatar_id": "", 259 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 260 | "html_url": "https://github.com/apps/github-actions", 261 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 262 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 263 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 264 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 265 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 266 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 267 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 268 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 269 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 270 | "type": "Bot", 271 | "user_view_type": "public", 272 | "site_admin": false 273 | }, 274 | "content_type": "application/gzip", 275 | "state": "uploaded", 276 | "size": 33607119, 277 | "download_count": 10, 278 | "created_at": "2024-12-02T18:13:11Z", 279 | "updated_at": "2024-12-02T18:13:20Z", 280 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_linux_arm64.tar.gz" 281 | }, 282 | { 283 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543563", 284 | "id": 210543563, 285 | "node_id": "RA_kwDOBKIB4c4MjKPL", 286 | "name": "trufflehog_3.84.2_windows_amd64.tar.gz", 287 | "label": "", 288 | "uploader": { 289 | "login": "github-actions[bot]", 290 | "id": 41898282, 291 | "node_id": "MDM6Qm90NDE4OTgyODI=", 292 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 293 | "gravatar_id": "", 294 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 295 | "html_url": "https://github.com/apps/github-actions", 296 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 297 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 298 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 299 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 300 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 301 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 302 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 303 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 304 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 305 | "type": "Bot", 306 | "user_view_type": "public", 307 | "site_admin": false 308 | }, 309 | "content_type": "application/gzip", 310 | "state": "uploaded", 311 | "size": 38121365, 312 | "download_count": 2, 313 | "created_at": "2024-12-02T18:13:11Z", 314 | "updated_at": "2024-12-02T18:13:21Z", 315 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_windows_amd64.tar.gz" 316 | }, 317 | { 318 | "url": "https://api.github.com/repos/trufflesecurity/trufflehog/releases/assets/210543561", 319 | "id": 210543561, 320 | "node_id": "RA_kwDOBKIB4c4MjKPJ", 321 | "name": "trufflehog_3.84.2_windows_arm64.tar.gz", 322 | "label": "", 323 | "uploader": { 324 | "login": "github-actions[bot]", 325 | "id": 41898282, 326 | "node_id": "MDM6Qm90NDE4OTgyODI=", 327 | "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", 328 | "gravatar_id": "", 329 | "url": "https://api.github.com/users/github-actions%5Bbot%5D", 330 | "html_url": "https://github.com/apps/github-actions", 331 | "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", 332 | "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", 333 | "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", 334 | "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", 335 | "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", 336 | "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", 337 | "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", 338 | "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", 339 | "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", 340 | "type": "Bot", 341 | "user_view_type": "public", 342 | "site_admin": false 343 | }, 344 | "content_type": "application/gzip", 345 | "state": "uploaded", 346 | "size": 33714653, 347 | "download_count": 1, 348 | "created_at": "2024-12-02T18:13:11Z", 349 | "updated_at": "2024-12-02T18:13:20Z", 350 | "browser_download_url": "https://github.com/trufflesecurity/trufflehog/releases/download/v3.84.2/trufflehog_3.84.2_windows_arm64.tar.gz" 351 | } 352 | ], 353 | "tarball_url": "https://api.github.com/repos/trufflesecurity/trufflehog/tarball/v3.84.2", 354 | "zipball_url": "https://api.github.com/repos/trufflesecurity/trufflehog/zipball/v3.84.2", 355 | "body": "## What's Changed\r\n* fix(deps): update module github.com/stretchr/testify to v1.10.0 by @renovate in https://github.com/trufflesecurity/trufflehog/pull/3659\r\n* Fix multiple package error in tests by @rgmz in https://github.com/trufflesecurity/trufflehog/pull/3661\r\n* [scan-9] Update enumeration logic by @0x1 in https://github.com/trufflesecurity/trufflehog/pull/3626\r\n* Add Scan method to SourceManager to scan a single SourceUnit by @mcastorina in https://github.com/trufflesecurity/trufflehog/pull/3650\r\n* fix(deps): update module github.com/couchbase/gocb/v2 to v2.9.3 by @renovate in https://github.com/trufflesecurity/trufflehog/pull/3682\r\n* chore(deps): update jaxxstorm/action-install-gh-release action to v1.14.0 by @renovate in https://github.com/trufflesecurity/trufflehog/pull/3672\r\n* [feat] - S3 metrics by @ahrav in https://github.com/trufflesecurity/trufflehog/pull/3577\r\n* fixed api flash detector by @kashifkhan0771 in https://github.com/trufflesecurity/trufflehog/pull/3666\r\n* Added pattern unit tests for detectors starting with the letters n through o by @nabeelalam in https://github.com/trufflesecurity/trufflehog/pull/3685\r\n* fix(deps): update module github.com/jedib0t/go-pretty/v6 to v6.6.3 by @renovate in https://github.com/trufflesecurity/trufflehog/pull/3690\r\n* Updated/fixed the function names of pattern tests for detectors n through o by @nabeelalam in https://github.com/trufflesecurity/trufflehog/pull/3691\r\n* fix(deps): update module github.com/wasilibs/go-re2 to v1.8.0 by @renovate in https://github.com/trufflesecurity/trufflehog/pull/3695\r\n* Added pattern unit tests for detectors starting with the letters p through q by @nabeelalam in https://github.com/trufflesecurity/trufflehog/pull/3710\r\n\r\n\r\n**Full Changelog**: https://github.com/trufflesecurity/trufflehog/compare/v3.84.1...v3.84.2", 356 | "mentions_count": 7 357 | } 358 | -------------------------------------------------------------------------------- /test/test_helper/common.bash: -------------------------------------------------------------------------------- 1 | DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." >/dev/null 2>&1 && pwd)" 2 | PATH="$DIR/..:$PATH" 3 | 4 | function common_setup() { 5 | DEBUG="true" 6 | } 7 | 8 | function common_teardown() { 9 | DEBUG="" 10 | } 11 | -------------------------------------------------------------------------------- /tools/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # gah! installer 4 | # 5 | # @author Marek `marverix` Sierociński 6 | # @license GNU GPLv3 7 | 8 | # Pipeline mode 9 | set -e 10 | 11 | # Configuration 12 | if [[ -z "$GAH_INSTALL_DIR" ]]; then 13 | if [[ $EUID -ne 0 ]]; then 14 | GAH_INSTALL_DIR="$HOME/.local/bin" 15 | else 16 | GAH_INSTALL_DIR="/usr/local/bin" 17 | fi 18 | fi 19 | 20 | #-------------------------------------------------- 21 | #region Utils 22 | function print_blue() { 23 | echo -e "\033[0;34m$1\033[0m" 24 | } 25 | 26 | function print_green() { 27 | echo -e "\033[0;32m$1\033[0m" 28 | } 29 | 30 | function print_yellow() { 31 | echo -e "\033[0;33m$1\033[0m" 32 | } 33 | 34 | function throw_error() { 35 | echo -e "\033[0;31mError: $2\033[0m" >&2 36 | exit $1 37 | } 38 | 39 | function require_command() { 40 | print_blue "Checking if $1 is installed..." 41 | if ! command -v $1 2>&1 >/dev/null; then 42 | throw_error 2 "$1 is not installed" 43 | fi 44 | print_green "OK" 45 | } 46 | 47 | #endregion 48 | #-------------------------------------------------- 49 | 50 | # Require that bash is at least 4.0 51 | print_blue "Checking if Bash 4.0 or higher is installed..." 52 | if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then 53 | throw_error 1 "Bash 4.0 or higher is required" 54 | fi 55 | print_green "OK" 56 | 57 | # Check if required commands are installed 58 | require_command tar 59 | require_command unzip 60 | require_command curl 61 | require_command jq 62 | 63 | # Ensure ~/.local/bin exists 64 | print_blue "Ensuring $GAH_INSTALL_DIR exists..." 65 | mkdir -p "$GAH_INSTALL_DIR" 66 | print_green "OK" 67 | 68 | # Check if ~/.local/bin is in PATH 69 | print_blue "Checking if $GAH_INSTALL_DIR is in PATH..." 70 | if [[ ":$PATH:" != *":$GAH_INSTALL_DIR:"* ]]; then 71 | print_yellow "WARNING: $GAH_INSTALL_DIR is not in PATH. gah will not work if $GAH_INSTALL_DIR is not in PATH." 72 | else 73 | print_green "OK, looks good!" 74 | fi 75 | 76 | # Check gah latest tag 77 | print_blue "Checking latest gah release..." 78 | tag=$(curl -s https://api.github.com/repos/marverix/gah/releases/latest | jq -r '.tag_name') 79 | print_green "OK, latest tag is $tag" 80 | 81 | # Download gah! script 82 | print_blue "Downloading gah $tag script..." 83 | curl -sL https://raw.githubusercontent.com/marverix/gah/refs/tags/$tag/gah -o "$GAH_INSTALL_DIR/gah" 84 | chmod +x "$GAH_INSTALL_DIR/gah" 85 | print_green "OK" 86 | 87 | print_green "Done!" 88 | --------------------------------------------------------------------------------