myitcv / x

Mono-repo for all myitcv.io/... Go code
MIT License
104 stars 20 forks source link

_scripts: replace *.sh files with *.go equivalents #22

Open ghost opened 6 years ago

ghost commented 6 years ago

any chance you can convert the scripts to mage.go https://magefile.org/

makes running on all desktops ( ie windoze) way way easier.

Great helper script :) github.com/zvelo/zmage

here is a good example using it https://github.com/zvelo/cobratest

--

I use mage and vgo for everything and it really helped making cross platform stuff much cleaner and easier.

myitcv commented 6 years ago

I think I'll just replace _scripts/*.sh with plain .go files; because I have a load of helpers I'll then use via myitcv.io/cmd/pkgconcat. But thanks for raising the issue; it's on my TODO list.

ghost commented 6 years ago

that will do the trick.

pkgconcat is a funny beast. i se what is does but am curious how it came to be... ?

myitcv commented 6 years ago

Inspired by "A little copying is better than a little dependency." - https://www.youtube.com/watch?v=PAAkCSZUG1c&t=9m28s

It allows me to "template" programs without creating dependencies. And in some cases it is more natural to "copy" a package than use it as an import (e.g. https://godoc.org/github.com/codeskyblue/go-sh)

Unfortunately I found out after writing it (despite having Googled) that there is prior art:

https://godoc.org/golang.org/x/tools/cmd/bundle