Closed nathanmalishev closed 4 years ago
Hey @nathanmalishev, happy to help. I'm going to close the issue since it's not a problem with reflex.
CGO_ENABLED=0 GOOS=linux go build -o dist/handler/handler/approvedGet/approvedGet.go gitlab.com/code/olp_api/handler/approvedGet/
This command confuses me. Why do you want to build a binary that's named approvedGet.go
?
For doing what you want, would it be possible to use the dirname
command? This might be simpler than using sed for this. Here's a demo:
reflex -r '\.txt$' -- bash -c 'echo subs={} basename=$(basename {}) dirname=$(dirname {})'
If I run
mkdir x/y
touch x/y/z.txt
then reflex prints
[00] subs=x/y/z.txt basename=z.txt dirname=x/y
Hey there, This isn't an issue but i was hoping to get some advice. I currently have a golang repository consisting of lots of lambda functions. Currently when i make a change to one lambda function, i have to rebuild them all.
File structure being
I think I am extremely close, in rebuilding just one file when it's changed. But am having trouble getting
sed
to work. When i try my variations with sed, i often getsed: 1: "s|[^/]+|g": unterminated substitute in regular expression
{}
has the output ofhandler/approvedGet/approvedGet.go
, but i needhandler/approvedGet/
without the file name. For the commandCGO_ENABLED=0 GOOS=linux go build -o dist/handler/approvedGet/approvedGet.go gitlab.com/repo/code/handler/approvedGet/
A sed like
sed "s|[^/]+|g"
would work but i'm having trouble getting it to execute.I'm hoping to get to the point where i have both
{}
and another variable in the command without the filename, so i can easily rebuild just the files & packages that have been changed. Something like would be idealThanks