Jerrin Francis
3d86ace196
fix(cli): pin scaffolded go.mod to running vela binary's version ( #7097 )
...
`vela def init-module` hardcoded `require github.com/oam-dev/kubevela
v1.9.0` in the generated go.mod. Scaffolded modules pinned the wrong
SDK whenever the installed vela tool drifted from v1.9.0, forcing users
to hand-edit go.mod after scaffolding.
Add version.ModuleRequireVersion() which returns the build-time
VelaVersion when it is a valid semver and falls back to a pinned
default for dev builds where VelaVersion is "UNKNOWN" (plain `go
build`) or "master" (Makefile default) — both invalid semver that
would otherwise break `go mod tidy` in the scaffolded module.
Signed-off-by: Jerrin Francis <jerrinfrancis7@gmail.com >
2026-04-19 08:51:17 -07:00
..
2025-10-23 10:56:37 +01:00
2023-05-30 14:53:41 +08:00
2023-04-12 11:52:03 +08:00
2025-09-17 03:10:10 +08:00
2025-11-06 10:37:19 +00:00
2025-06-13 07:13:25 -07:00
2023-05-15 16:07:51 +08:00
2024-07-03 16:10:56 +08:00
2026-04-16 10:25:28 -07:00
2023-04-27 10:02:47 +08:00
2026-03-18 21:05:24 -07:00
2023-04-27 10:02:47 +08:00
2026-03-19 07:58:15 -07:00
2025-05-01 14:31:11 +05:30
2025-05-01 14:31:11 +05:30
2026-02-10 15:00:44 +00:00
2026-04-16 10:25:28 -07:00
2023-08-10 14:41:20 +08:00
2023-05-15 16:07:51 +08:00
2024-07-27 17:44:20 +08:00
2023-04-23 10:21:11 +08:00
2023-04-27 10:02:47 +08:00
2022-11-10 10:53:10 +08:00
2025-11-06 18:56:04 -08:00
2026-02-10 15:00:44 +00:00
2026-04-19 08:51:17 -07:00
2026-04-19 08:51:17 -07:00
2025-09-03 06:00:58 +08:00
2026-04-16 10:25:28 -07:00
2023-05-15 16:07:51 +08:00
2025-01-03 07:54:42 +08:00
2026-01-20 15:32:03 +00:00
2026-01-20 15:32:03 +00:00
2025-06-17 10:25:59 +08:00
2025-06-17 10:25:59 +08:00
2025-06-17 10:25:59 +08:00
2023-04-27 10:02:47 +08:00
2026-03-19 07:58:15 -07:00
2023-07-04 12:15:30 +08:00
2025-04-29 03:46:08 +08:00
2023-05-15 16:07:51 +08:00
2025-11-06 10:37:19 +00:00
2025-06-17 10:25:59 +08:00
2026-03-19 07:58:15 -07:00
2026-03-19 07:58:15 -07:00
2026-03-19 07:58:15 -07:00
2022-08-01 19:44:27 +08:00
2026-03-19 07:58:15 -07:00
2026-03-19 07:58:15 -07:00
2023-05-15 16:07:51 +08:00
2025-07-31 07:46:56 -07:00
2025-08-06 09:55:30 -07:00
2022-10-17 17:15:45 +08:00
2023-04-27 10:02:47 +08:00
2022-03-11 11:35:40 +08:00
2024-07-27 17:44:20 +08:00
2025-10-23 10:56:37 +01:00
2025-06-17 10:25:59 +08:00
2023-06-05 10:57:38 +08:00
2026-02-10 15:00:44 +00:00
2023-05-15 16:07:51 +08:00
2026-03-19 07:58:15 -07:00
2025-01-03 07:54:42 +08:00
2023-04-27 10:02:47 +08:00
2025-06-17 10:25:59 +08:00
2023-06-08 15:32:57 +08:00
2023-08-10 14:41:20 +08:00
2023-05-15 16:07:51 +08:00
2026-04-16 10:25:28 -07:00
2023-05-15 16:07:51 +08:00
2023-04-27 10:02:47 +08:00
2025-06-23 21:25:45 -07:00
2025-06-23 21:25:45 -07:00
2022-11-24 10:27:13 +08:00
2024-07-27 17:44:20 +08:00
2025-09-30 09:30:53 -07:00
2026-04-16 10:25:28 -07:00
2026-01-20 15:32:03 +00:00
2026-01-20 15:32:03 +00:00
2025-06-17 10:25:59 +08:00