Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit 0468334

Browse files
committed
More repo renaming items
1 parent d447afc commit 0468334

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ RUN \
1717
GOARM=${TARGETVARIANT#v} CGO_ENABLED=0 go build .
1818

1919
FROM scratch
20-
COPY --from=build /go/src/github.com/deislabs/gnarly /
20+
COPY --from=build /go/src/github.com/deislabs/gnarly/gnarly /

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
TEST_COUNT ?= 1
22
TEST ?= go test -count=$(TEST_COUNT) $(TEST_FLAGS) $(if $(V),-v,)
33

4-
.PHONY: dockersource
5-
dockersource:
4+
.PHONY: gnarly
5+
gnarly:
66
CGO_ENABLED=0 go build $(if $(OUTPUT),-o $(OUTPUT)/$(@),) .
77

88
clean:
9-
rm dockersource
9+
rm gnarly
1010

1111
.PHONY: e2e
12-
e2e: dockersource
12+
e2e: gnarly
1313
$(TEST) ./test

docker.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const (
2828
pathEnv = "PATH"
2929
)
3030

31-
// Env vars which are used when dockersource is invoked as a wrapper for the docker binary.
31+
// Env vars which are used when gnarly is invoked as a wrapper for the docker binary.
3232
var (
3333
// Pass through a custom syntax parser to the docker build command.
3434
parser = os.Getenv("BUILDKIT_SYNTAX")
@@ -99,14 +99,14 @@ func InvokeDocker() {
9999
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
100100
defer cancel()
101101
if err := invokeDocker(ctx); err != nil {
102-
fmt.Fprintln(os.Stderr, "[dockersource]: Error while wrapping docker cli:", err)
102+
fmt.Fprintln(os.Stderr, "[gnarly]: Error while wrapping docker cli:", err)
103103
os.Exit(1)
104104
}
105105
}
106106

107107
func debug(args ...interface{}) {
108108
if dockerDebug != "" {
109-
fmt.Fprintln(os.Stderr, append([]interface{}{"[dockersource]:"}, args...)...)
109+
fmt.Fprintln(os.Stderr, append([]interface{}{"[gnarly]:"}, args...)...)
110110
}
111111
}
112112

@@ -266,7 +266,7 @@ func parseDockerArgs(args []string, dArgs *dockerArgs) {
266266

267267
if dArgs.Build {
268268
if dArgs.Context != "" {
269-
panic("[dockersource]: found multiple contexts -- this is a bug in the argument parser")
269+
panic("[gnarly]: found multiple contexts -- this is a bug in the argument parser")
270270
}
271271
dArgs.Context = arg
272272
}

test/main_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
var (
14-
dockersourcePath string
14+
gnarlyPath string
1515
)
1616

1717
func TestMain(m *testing.M) {
@@ -20,7 +20,7 @@ func TestMain(m *testing.M) {
2020
return
2121
}
2222

23-
dir, err := ioutil.TempDir("", "dockersource-test")
23+
dir, err := ioutil.TempDir("", "gnarly-test")
2424
if err != nil {
2525
panic(err)
2626
}
@@ -30,16 +30,16 @@ func TestMain(m *testing.M) {
3030
}
3131
}
3232

33-
cmd := exec.Command("make", dockersource)
33+
cmd := exec.Command("make", gnarly)
3434
cmd.Dir = filepath.Dir(getwd())
3535
cmd.Env = append(os.Environ(), "OUTPUT="+dir)
3636
out, err := cmd.CombinedOutput()
3737
if err != nil {
38-
fmt.Fprintln(os.Stderr, "error compiling dockersource bin:", string(out))
38+
fmt.Fprintln(os.Stderr, "error compiling gnarly bin:", string(out))
3939
os.Exit(1)
4040
}
4141

42-
dockersourcePath = filepath.Join(dir, dockersource)
42+
gnarlyPath = filepath.Join(dir, gnarly)
4343
os.Setenv("PATH", dir+":"+os.Getenv("PATH"))
4444

4545
code := m.Run()
@@ -55,7 +55,7 @@ func getwd() string {
5555
return dir
5656
}
5757

58-
// AsModProg allows the current binary to be used as a mod program by dockersource.
58+
// AsModProg allows the current binary to be used as a mod program by gnarly.
5959
func AsModProg(t *testing.T) string {
6060
dir := t.TempDir()
6161

test/util_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717
)
1818

1919
const (
20-
modProg = "modprog"
21-
docker = "docker"
22-
dockersource = "dockersource"
20+
modProg = "modprog"
21+
docker = "docker"
22+
gnarly = "gnarly"
2323

2424
bInfoKey = "containerimage.buildinfo"
2525
imageNameKey = "image.name"
@@ -217,7 +217,7 @@ func testCmd(expected []byte, opts ...cmdOpt) func(t *testing.T) {
217217
o(t, &cfg)
218218
}
219219

220-
prog := dockersource
220+
prog := gnarly
221221
if cfg.AsDocker {
222222
prog = docker
223223
}
@@ -236,7 +236,7 @@ func testCmd(expected []byte, opts ...cmdOpt) func(t *testing.T) {
236236
} else {
237237
dir := t.TempDir()
238238
p := filepath.Join(dir, docker)
239-
if err := os.Symlink(dockersourcePath, p); err != nil {
239+
if err := os.Symlink(gnarlyPath, p); err != nil {
240240
t.Fatal(err)
241241
}
242242
t.Setenv("PATH", p+":"+os.Getenv("PATH"))

0 commit comments

Comments
 (0)