Skip to content

Commit 61ba03e

Browse files
authored
[release-1.16] MANUAL Upgrade some dependencies (#174)
* Use "dompurify": "^3.2.4" Signed-off-by: Ali Ok <[email protected]> * Use "@octokit/plugin-paginate-rest": "11.4.1" Signed-off-by: Ali Ok <[email protected]> * Use "@octokit/endpoint": "10.1.3" Signed-off-by: Ali Ok <[email protected]> * Update knative/hack version Signed-off-by: Ali Ok <[email protected]> --------- Signed-off-by: Ali Ok <[email protected]>
1 parent 70f1136 commit 61ba03e

File tree

7 files changed

+96
-63
lines changed

7 files changed

+96
-63
lines changed

backstage/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
},
4444
"resolutions": {
4545
"@types/react": "^17",
46-
"@types/react-dom": "^17"
46+
"@types/react-dom": "^17",
47+
"dompurify": "^3.2.4",
48+
"@octokit/plugin-paginate-rest": "11.4.1",
49+
"@octokit/endpoint": "10.1.3"
4750
},
4851
"prettier": "@spotify/prettier-config",
4952
"lint-staged": {

backstage/yarn.lock

Lines changed: 64 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7015,14 +7015,13 @@
70157015
before-after-hook "^2.2.0"
70167016
universal-user-agent "^6.0.0"
70177017

7018-
"@octokit/endpoint@^7.0.0":
7019-
version "7.0.6"
7020-
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.6.tgz#791f65d3937555141fb6c08f91d618a7d645f1e2"
7021-
integrity sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==
7018+
"@octokit/endpoint@10.1.3", "@octokit/endpoint@^7.0.0":
7019+
version "10.1.3"
7020+
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-10.1.3.tgz#bfe8ff2ec213eb4216065e77654bfbba0fc6d4de"
7021+
integrity sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==
70227022
dependencies:
7023-
"@octokit/types" "^9.0.0"
7024-
is-plain-object "^5.0.0"
7025-
universal-user-agent "^6.0.0"
7023+
"@octokit/types" "^13.6.2"
7024+
universal-user-agent "^7.0.2"
70267025

70277026
"@octokit/graphql-schema@^13.7.0":
70287027
version "13.10.0"
@@ -7082,18 +7081,22 @@
70827081
resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-18.1.1.tgz#09bdfdabfd8e16d16324326da5148010d765f009"
70837082
integrity sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==
70847083

7084+
"@octokit/openapi-types@^23.0.1":
7085+
version "23.0.1"
7086+
resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-23.0.1.tgz#3721646ecd36b596ddb12650e0e89d3ebb2dd50e"
7087+
integrity sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==
7088+
70857089
"@octokit/[email protected]":
70867090
version "6.0.1"
70877091
resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437"
70887092
integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==
70897093

7090-
"@octokit/plugin-paginate-rest@^6.0.0", "@octokit/plugin-paginate-rest@^6.1.0", "@octokit/plugin-paginate-rest@^6.1.2":
7091-
version "6.1.2"
7092-
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz#f86456a7a1fe9e58fec6385a85cf1b34072341f8"
7093-
integrity sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==
7094+
"@octokit/plugin-paginate-rest@11.4.1", "@octokit/plugin-paginate-rest@^6.0.0", "@octokit/plugin-paginate-rest@^6.1.0", "@octokit/plugin-paginate-rest@^6.1.2":
7095+
version "11.4.1"
7096+
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.1.tgz#2ad42378683143c59ced0f091404be354e753aa0"
7097+
integrity sha512-GHQGdIv6Y/I+QzYbQWLVvL6bZhDhCJcwnL381vnX82lpJy4brA3/jRwYN5Lsmc57UhjBG9vH1KvyxgqLYZZGPQ==
70947098
dependencies:
7095-
"@octokit/tsconfig" "^1.0.2"
7096-
"@octokit/types" "^9.2.3"
7099+
"@octokit/types" "^13.7.0"
70977100

70987101
"@octokit/plugin-request-log@^1.0.4":
70997102
version "1.0.4"
@@ -7164,26 +7167,28 @@
71647167
"@octokit/plugin-request-log" "^1.0.4"
71657168
"@octokit/plugin-rest-endpoint-methods" "^7.1.2"
71667169

7167-
"@octokit/tsconfig@^1.0.2":
7168-
version "1.0.2"
7169-
resolved "https://registry.yarnpkg.com/@octokit/tsconfig/-/tsconfig-1.0.2.tgz#59b024d6f3c0ed82f00d08ead5b3750469125af7"
7170-
integrity sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==
7171-
71727170
"@octokit/types@^10.0.0":
71737171
version "10.0.0"
71747172
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-10.0.0.tgz#7ee19c464ea4ada306c43f1a45d444000f419a4a"
71757173
integrity sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==
71767174
dependencies:
71777175
"@octokit/openapi-types" "^18.0.0"
71787176

7177+
"@octokit/types@^13.6.2", "@octokit/types@^13.7.0":
7178+
version "13.8.0"
7179+
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-13.8.0.tgz#3815885e5abd16ed9ffeea3dced31d37ce3f8a0a"
7180+
integrity sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==
7181+
dependencies:
7182+
"@octokit/openapi-types" "^23.0.1"
7183+
71797184
"@octokit/types@^6.8.2":
71807185
version "6.41.0"
71817186
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04"
71827187
integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==
71837188
dependencies:
71847189
"@octokit/openapi-types" "^12.11.0"
71857190

7186-
"@octokit/types@^9.0.0", "@octokit/types@^9.2.2", "@octokit/types@^9.2.3":
7191+
"@octokit/types@^9.0.0", "@octokit/types@^9.2.2":
71877192
version "9.3.2"
71887193
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.3.2.tgz#3f5f89903b69f6a2d196d78ec35f888c0013cac5"
71897194
integrity sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==
@@ -10181,7 +10186,7 @@
1018110186
resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c"
1018210187
integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==
1018310188

10184-
"@types/trusted-types@*":
10189+
"@types/trusted-types@*", "@types/trusted-types@^2.0.7":
1018510190
version "2.0.7"
1018610191
resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11"
1018710192
integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==
@@ -13799,15 +13804,12 @@ domhandler@^5.0.2, domhandler@^5.0.3:
1379913804
dependencies:
1380013805
domelementtype "^2.3.0"
1380113806

13802-
dompurify@=3.0.6:
13803-
version "3.0.6"
13804-
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.6.tgz#925ebd576d54a9531b5d76f0a5bef32548351dae"
13805-
integrity sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==
13806-
13807-
dompurify@^2.2.7, dompurify@^2.2.9:
13808-
version "2.4.7"
13809-
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.7.tgz#277adeb40a2c84be2d42a8bcd45f582bfa4d0cfc"
13810-
integrity sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==
13807+
dompurify@=3.0.6, dompurify@^2.2.7, dompurify@^2.2.9, dompurify@^3.2.4:
13808+
version "3.2.4"
13809+
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.4.tgz#af5a5a11407524431456cf18836c55d13441cd8e"
13810+
integrity sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg==
13811+
optionalDependencies:
13812+
"@types/trusted-types" "^2.0.7"
1381113813

1381213814
domutils@^2.5.2, domutils@^2.8.0:
1381313815
version "2.8.0"
@@ -23604,7 +23606,16 @@ string-length@^4.0.1:
2360423606
char-regex "^1.0.2"
2360523607
strip-ansi "^6.0.0"
2360623608

23607-
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
23609+
"string-width-cjs@npm:string-width@^4.2.0":
23610+
version "4.2.3"
23611+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
23612+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
23613+
dependencies:
23614+
emoji-regex "^8.0.0"
23615+
is-fullwidth-code-point "^3.0.0"
23616+
strip-ansi "^6.0.1"
23617+
23618+
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
2360823619
version "4.2.3"
2360923620
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
2361023621
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -23678,7 +23689,7 @@ string_decoder@~1.1.1:
2367823689
dependencies:
2367923690
safe-buffer "~5.1.0"
2368023691

23681-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
23692+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
2368223693
version "6.0.1"
2368323694
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
2368423695
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -23692,6 +23703,13 @@ [email protected]:
2369223703
dependencies:
2369323704
ansi-regex "^4.1.0"
2369423705

23706+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
23707+
version "6.0.1"
23708+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
23709+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
23710+
dependencies:
23711+
ansi-regex "^5.0.1"
23712+
2369523713
strip-ansi@^7.0.1:
2369623714
version "7.1.0"
2369723715
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -24855,6 +24873,11 @@ universal-user-agent@^6.0.0:
2485524873
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.1.tgz#15f20f55da3c930c57bddbf1734c6654d5fd35aa"
2485624874
integrity sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==
2485724875

24876+
universal-user-agent@^7.0.2:
24877+
version "7.0.2"
24878+
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-7.0.2.tgz#52e7d0e9b3dc4df06cc33cb2b9fd79041a54827e"
24879+
integrity sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==
24880+
2485824881
universalify@^0.1.0:
2485924882
version "0.1.2"
2486024883
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
@@ -25599,7 +25622,7 @@ wordwrap@^1.0.0:
2559925622
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
2560025623
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==
2560125624

25602-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
25625+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
2560325626
version "7.0.0"
2560425627
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
2560525628
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -25617,6 +25640,15 @@ wrap-ansi@^6.0.1:
2561725640
string-width "^4.1.0"
2561825641
strip-ansi "^6.0.0"
2561925642

25643+
wrap-ansi@^7.0.0:
25644+
version "7.0.0"
25645+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
25646+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
25647+
dependencies:
25648+
ansi-styles "^4.0.0"
25649+
string-width "^4.1.0"
25650+
strip-ansi "^6.0.0"
25651+
2562025652
wrap-ansi@^8.1.0:
2562125653
version "8.1.0"
2562225654
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
k8s.io/apimachinery v0.30.3
1212
k8s.io/client-go v0.30.3
1313
knative.dev/eventing v0.43.0
14-
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d
14+
knative.dev/hack v0.0.0-20250314171439-742e1e50da78
1515
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad
1616
knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364
1717
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,8 @@ k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1
803803
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
804804
knative.dev/eventing v0.43.0 h1:GELHZ0yYosMeV78l4alMsd7HJciEu6a3T2C5l7MPi3Y=
805805
knative.dev/eventing v0.43.0/go.mod h1:pdrF+bEUfRkNn9ifWXS7DoVj5W31gA5KQVd8iwplXUo=
806-
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d h1:aCfX7kwkvgGxXXGbso5tLqdwQmzBkJ9d+EIRwksKTvk=
807-
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
806+
knative.dev/hack v0.0.0-20250314171439-742e1e50da78 h1:K3cI9khmEm63uwnm2S6ZFq1r/nsJFDXtUHqPnyKdnCM=
807+
knative.dev/hack v0.0.0-20250314171439-742e1e50da78/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
808808
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad h1:Nrjtr2H168rJeamH4QdyLMV1lEKHejNhaj1ymgQMfLk=
809809
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad/go.mod h1:StJI72GWcm/iErmk4RqFJiOo8RLbVqPbHxUqeVwAzeo=
810810
knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364 h1:DIc+vbaFKOSGktPXJ1MaXIXoDjlmUIXQkHiZaPcYGbQ=

vendor/knative.dev/hack/infra-library.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ source "$(dirname "${BASH_SOURCE[0]:-$0}")/library.sh"
2121

2222
# Default Kubernetes version to use for GKE, if not overridden with
2323
# the `--cluster-version` parameter.
24-
readonly GKE_DEFAULT_CLUSTER_VERSION="1.28"
24+
readonly GKE_DEFAULT_CLUSTER_VERSION="1.31"
2525

2626
# Dumps the k8s api server metrics. Spins up a proxy, waits a little bit and
2727
# dumps the metrics to ${ARTIFACTS}/k8s.metrics.txt

vendor/knative.dev/hack/release.sh

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ RELEASE_NOTES=""
7575
RELEASE_BRANCH=""
7676
RELEASE_GCS_BUCKET="knative-nightly/${REPO_NAME}"
7777
RELEASE_DIR=""
78-
KO_FLAGS="-P --platform=all"
78+
export KO_FLAGS="-P --platform=all"
7979
VALIDATION_TESTS="./test/presubmit-tests.sh"
8080
ARTIFACTS_TO_PUBLISH=""
8181
FROM_NIGHTLY_RELEASE=""
@@ -90,11 +90,10 @@ export GOFLAGS="-ldflags=-s -ldflags=-w"
9090
export GITHUB_TOKEN=""
9191
readonly IMAGES_REFS_FILE="${IMAGES_REFS_FILE:-$(mktemp -d)/images_refs.txt}"
9292

93-
# Convenience function to run the hub tool.
94-
# Parameters: $1..$n - arguments to hub.
95-
function hub_tool() {
96-
# Pinned to SHA because of https://github.com/github/hub/issues/2517
97-
go_run github.com/github/hub/v2@363513a "$@"
93+
# Convenience function to run the GitHub CLI tool `gh`.
94+
# Parameters: $1..$n - arguments to gh.
95+
function gh_tool() {
96+
go_run github.com/cli/cli/v2/cmd/[email protected] "$@"
9897
}
9998

10099
# Shortcut to "git push" that handles authentication.
@@ -193,7 +192,7 @@ function prepare_dot_release() {
193192
# Support tags in two formats
194193
# - knative-v1.0.0
195194
# - v1.0.0
196-
releases="$(hub_tool release | cut -d '-' -f2)"
195+
releases="$(gh_tool release list --json tagName --jq '.[].tagName' | cut -d '-' -f2)"
197196
echo "Current releases are: ${releases}"
198197
[[ $? -eq 0 ]] || abort "cannot list releases"
199198
# If --release-branch passed, restrict to that release
@@ -218,7 +217,7 @@ function prepare_dot_release() {
218217
# Ensure there are new commits in the branch, otherwise we don't create a new release
219218
setup_branch
220219
# Use the original tag (ie. potentially with a knative- prefix) when determining the last version commit sha
221-
local github_tag="$(hub_tool release | grep "${last_version}")"
220+
local github_tag="$(gh_tool release list --json tagName --jq '.[].tagName' | grep "${last_version}")"
222221
local last_release_commit="$(git rev-list -n 1 "${github_tag}")"
223222
local last_release_commit_filtered="$(git rev-list --invert-grep --grep "\[skip-dot-release\]" -n 1 "${github_tag}")"
224223
local release_branch_commit="$(git rev-list -n 1 upstream/"${RELEASE_BRANCH}")"
@@ -239,7 +238,7 @@ function prepare_dot_release() {
239238
# If --release-notes not used, copy from the latest release
240239
if [[ -z "${RELEASE_NOTES}" ]]; then
241240
RELEASE_NOTES="$(mktemp)"
242-
hub_tool release show -f "%b" "${github_tag}" > "${RELEASE_NOTES}"
241+
gh_tool release view "${github_tag}" --json "body" --jq '.body' > "${RELEASE_NOTES}"
243242
echo "Release notes from ${last_version} copied to ${RELEASE_NOTES}"
244243
fi
245244
}
@@ -640,18 +639,12 @@ function set_latest_to_highest_semver() {
640639

641640
local last_version release_id # don't combine with assignment else $? will be 0
642641

643-
last_version="$(hub_tool -p release | cut -d'-' -f2 | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$'| sort -r -V | head -1)"
642+
last_version="$(gh_tool release list --json tagName --jq '.[].tagName' | cut -d'-' -f2 | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$'| sort -r -V | head -1)"
644643
if ! [[ $? -eq 0 ]]; then
645644
abort "cannot list releases"
646645
fi
647-
648-
release_id="$(hub_tool api "/repos/${ORG_NAME}/${REPO_NAME}/releases/tags/knative-${last_version}" | jq .id)"
649-
if [[ $? -ne 0 ]]; then
650-
abort "cannot get relase id from github"
651-
fi
652-
653-
hub_tool api --method PATCH "/repos/${ORG_NAME}/${REPO_NAME}/releases/$release_id" \
654-
-F make_latest=true > /dev/null || abort "error setting $last_version to 'latest'"
646+
647+
gh_tool release edit "knative-${last_version}" --latest > /dev/null || abort "error setting $last_version to 'latest'"
655648
echo "Github release ${last_version} set as 'latest'"
656649
}
657650

@@ -742,12 +735,14 @@ function publish_to_github() {
742735
local description="$(mktemp)"
743736
local attachments_dir="$(mktemp -d)"
744737
local commitish=""
738+
local target_branch=""
745739
local github_tag="knative-${TAG}"
746740

747741
# Copy files to a separate dir
742+
# shellcheck disable=SC2068
748743
for artifact in $@; do
749744
cp ${artifact} "${attachments_dir}"/
750-
attachments+=("--attach=${artifact}#$(basename ${artifact})")
745+
attachments+=("${artifact}#$(basename ${artifact})")
751746
done
752747
echo -e "${title}\n" > "${description}"
753748
if [[ -n "${RELEASE_NOTES}" ]]; then
@@ -774,13 +769,16 @@ function publish_to_github() {
774769
git tag -a "${github_tag}" -m "${title}"
775770
git_push tag "${github_tag}"
776771

777-
[[ -n "${RELEASE_BRANCH}" ]] && commitish="--commitish=${RELEASE_BRANCH}"
772+
[[ -n "${RELEASE_BRANCH}" ]] && target_branch="--target=${RELEASE_BRANCH}"
778773
for i in {2..0}; do
779-
hub_tool release create \
780-
${attachments[@]} \
781-
--file="${description}" \
782-
"${commitish}" \
783-
"${github_tag}" && return 0
774+
# shellcheck disable=SC2068
775+
gh_tool release create \
776+
"${github_tag}" \
777+
--title "${title}" \
778+
--notes-file "${description}" \
779+
"${target_branch}" \
780+
${attachments[@]} && return 0
781+
784782
if [[ "${i}" -gt 0 ]]; then
785783
echo "Error publishing the release, retrying in 15s..."
786784
sleep 15

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ knative.dev/eventing/pkg/reconciler/testing/v1
10861086
knative.dev/eventing/pkg/reconciler/testing/v1beta2
10871087
knative.dev/eventing/pkg/tracing
10881088
knative.dev/eventing/pkg/utils
1089-
# knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d
1089+
# knative.dev/hack v0.0.0-20250314171439-742e1e50da78
10901090
## explicit; go 1.21
10911091
knative.dev/hack
10921092
# knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad

0 commit comments

Comments
 (0)