GetVersion returns the version of Task. By default, this is retrieved from the embedded version.txt file which is kept up-to-date by our release script. However, it can also be overridden at build time using: -ldflags="-X 'github.com/go-task/task/v3/internal/version.version=vX.X.X'".
()
| 46 | // However, it can also be overridden at build time using: |
| 47 | // -ldflags="-X 'github.com/go-task/task/v3/internal/version.version=vX.X.X'". |
| 48 | func GetVersion() string { |
| 49 | return version |
| 50 | } |
| 51 | |
| 52 | // GetVersionWithBuildInfo is the same as [GetVersion], but it also includes |
| 53 | // the commit hash and dirty status if available. This will only work when built |
no outgoing calls
no test coverage detected
searching dependent graphs…