Yeet those builds out!
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(cmd/yeet): show build method in --version (#20)

* docs(README): add contributor graph and repology info

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(cmd/yeet): show build method in --version

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>

authored by

Xe Iaso and committed by
GitHub
ca06ce7d d2acec62

+23 -2
+12
README.md
··· 57 57 ## Support 58 58 59 59 For support, please [subscribe to me on Patreon](https://patreon.com/cadey) and ask in the `#yeet` channel in the patron Discord. 60 + 61 + ## Packaging Status 62 + 63 + [![Packaging status](https://repology.org/badge/vertical-allrepos/yeet-js-build-tool.svg?columns=3)](https://repology.org/project/yeet-js-build-tool/versions) 64 + 65 + ## Contributors 66 + 67 + <a href="https://github.com/TecharoHQ/yeet/graphs/contributors"> 68 + <img src="https://contrib.rocks/image?repo=TecharoHQ/yeet" /> 69 + </a> 70 + 71 + Made with [contrib.rocks](https://contrib.rocks).
+4 -1
cmd/yeet/main.go
··· 127 127 flag.Parse() 128 128 129 129 if *version { 130 - fmt.Printf("yeet version %s\n", yeetver.Version) 130 + fmt.Printf("yeet version %s, built via %s\n", yeetver.Version, yeetver.BuildMethod) 131 131 return 132 132 } 133 133 ··· 156 156 } 157 157 return foutpath 158 158 }, 159 + "name": "debian", 159 160 }) 160 161 161 162 vm.Set("docker", map[string]any{ ··· 207 208 } 208 209 return foutpath 209 210 }, 211 + "name": "rpm", 210 212 }) 211 213 212 214 vm.Set("tarball", map[string]any{ ··· 217 219 } 218 220 return foutpath 219 221 }, 222 + "name": "tarball", 220 223 }) 221 224 222 225 vm.Set("yeet", map[string]any{
+6
yeet.go
··· 6 6 // This variable is set at build time using the -X linker flag. If not set, 7 7 // it defaults to "devel". 8 8 var Version = "devel" 9 + 10 + // BuildMethod contains the method used to build the yeet binary. 11 + // 12 + // This variable is set at build time using the -X linker flag. If not set, 13 + // it defaults to "go-build". 14 + var BuildMethod = "go-build"
+1 -1
yeetfile.js
··· 16 16 }, 17 17 18 18 build: ({ bin }) => { 19 - go.build("-o", `${bin}/yeet`, "./cmd/yeet"); 19 + $`go build -o ${bin}/yeet -ldflags '-s -w -extldflags "-static" -X "github.com/TecharoHQ/yeet.Version=${git.tag()}" -X "github.com/TecharoHQ/yeet.BuildMethod=${method.name}"' ./cmd/yeet`; 20 20 }, 21 21 }), 22 22 );