Last 12 weeks · 0 commits
2 of 6 standards met
This piece does parse the version numbers ignoring any initial 'v' and splitting numbers at each "." or "-" The comparison works for semantic versioning as well as using git describe output. Some comparison examples: 'v1.2.3-22' > 'v1.2.3' 'v1.2.4' > 'v1.2.3' 'v2' > 'v1.2.3' 'v2' == '2' 'v2.0' == 'v2' 'v2.0.0.0.0' == 'v2'
Repository: tj/go-update. Description: Go package for auto-updating system-specific binaries via GitHub releases. Stars: 241, Forks: 22. Primary language: Go. Languages: Go (100%). License: MIT. Open PRs: 3, open issues: 2. Last activity: 5y ago. Community health: 42%. Top contributors: tj, dominicletz.
pretty typical stdlib stuff so it should be fine
In Windows we can't directly replace running binaries. It seems the previous fix attempt on this got lost. This code snippet makes the windows workaround explicit in code and moves the current binary to dst + ".old". I've tested this and use this in my fork on windows: https://github.com/diodechain/go-update