extractCompilerVersionFromLockContent parses the gh-aw-metadata JSON comment from a lock file and returns the compiler_version field value. Returns empty string if not found or on parse error.
(content string)
| 182 | // from a lock file and returns the compiler_version field value. |
| 183 | // Returns empty string if not found or on parse error. |
| 184 | func extractCompilerVersionFromLockContent(content string) string { |
| 185 | meta, _, err := workflow.ExtractMetadataFromLockFile(content) |
| 186 | if err != nil || meta == nil { |
| 187 | return "" |
| 188 | } |
| 189 | return meta.CompilerVersion |
| 190 | } |
| 191 | |
| 192 | // formatCurrentVersionSuffix formats a version string for inline display, |
| 193 | // e.g. ", compiler: v1.2.3". Returns an empty string when version is empty. |
no test coverage detected