Skip to content

Commit

Permalink
fix: dirty check (#17)
Browse files Browse the repository at this point in the history
Signed-off-by: tkrop <[email protected]>
  • Loading branch information
tkrop committed Jan 9, 2024
1 parent 99e6e1d commit 2c212bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.ext
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
clean::
rm -rf __debug_bin*;
find -name "__debug_bin*" -exec rm -vrf {} \;;

bump::
@VERSION="$$(cat VERSION)"; \
Expand Down
6 changes: 6 additions & 0 deletions internal/make/make_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"strings"
Expand Down Expand Up @@ -863,11 +864,16 @@ func SetupMakeConfig(t test.Test, src string) {
t.Helper()

if dir, err := os.Executable(); err == nil {
// copy configuration repository.
dst := dir + ".config"
cmd := exec.Command("cp", "--recursive", src, dst)
out := &strings.Builder{}
cmd.Stdout, cmd.Stderr = out, out
require.NoError(t, cmd.Run(), "copying failed", dst, out.String())
// Make copy dirty to prevent sync with github.
cmd = exec.Command("touch", filepath.Join(dst, "dirty"))
cmd.Stdout, cmd.Stderr = out, out
require.NoError(t, cmd.Run(), "copying failed", dst, out.String())
} else {
require.NoError(t, err, "executable failed", dir)
}
Expand Down

0 comments on commit 2c212bb

Please sign in to comment.