Skip to content

Commit de9d0be

Browse files
committed
chore: update name to checkout-data-sync
1 parent f640dbf commit de9d0be

10 files changed

Lines changed: 35 additions & 32 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COPY . .
1111

1212
RUN CGO_ENABLED=0 GOOS=linux go build \
1313
-ldflags="-s -w" \
14-
-o checkout-cloud-sync .
14+
-o checkout-data-sync .
1515

1616
# --- runtime stage ---
1717
FROM alpine:3.19
@@ -21,9 +21,9 @@ RUN apk --no-cache add ca-certificates
2121

2222
WORKDIR /app
2323

24-
COPY --from=builder /build/checkout-cloud-sync .
24+
COPY --from=builder /build/checkout-data-sync .
2525

2626
# Mount your config.yml at /app/config.yml via a volume (see README).
2727
# Credentials must never be baked into the image.
28-
ENTRYPOINT ["./checkout-cloud-sync"]
28+
ENTRYPOINT ["./checkout-data-sync"]
2929
CMD ["--config", "config.yml"]

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# checkout-cloud-sync
1+
# checkout-data-sync
22

3-
[![CI](https://github.com/commercetools/checkout-cloud-sync/actions/workflows/ci.yml/badge.svg)](https://github.com/commercetools/checkout-cloud-sync/actions)
4-
[![codecov](https://codecov.io/gh/commercetools/checkout-cloud-sync/branch/main/graph/badge.svg)](https://codecov.io/gh/commercetools/checkout-cloud-sync)
5-
[![Docker Pulls](https://img.shields.io/docker/pulls/commercetools/checkout-cloud-sync)](https://hub.docker.com/r/commercetools/checkout-cloud-sync)
3+
[![CI](https://github.com/commercetools/checkout-data-sync/actions/workflows/ci.yml/badge.svg)](https://github.com/commercetools/checkout-data-sync/actions)
4+
[![Docker Pulls](https://img.shields.io/docker/pulls/commercetools/checkout-data-sync)](https://hub.docker.com/r/commercetools/checkout-data-sync)
65

76
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
87
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -81,7 +80,7 @@ Applications are synced first because Payment Integrations reference them by ID.
8180
### Usage
8281

8382
```
84-
usage: checkout-cloud-sync
83+
usage: checkout-data-sync
8584
-c, --config <path> Path to config file (default: config.yml)
8685
-f, --full Execute the migration. Omit to perform a dry-run
8786
instead (shows what would be created or updated,
@@ -95,7 +94,7 @@ By default the tool runs in **dry-run** mode: it compares source and target reso
9594
##### Build
9695
9796
```bash
98-
docker build -t checkout-cloud-sync .
97+
docker build -t checkout-data-sync .
9998
```
10099

101100
##### Run
@@ -105,14 +104,14 @@ Mount your `config.yml` at `/app/config.yml` via a volume — credentials must n
105104
```bash
106105
docker run --rm \
107106
-v $(pwd)/config.yml:/app/config.yml \
108-
checkout-cloud-sync
107+
checkout-data-sync
109108
```
110109

111110
### Examples
112111

113112
- To perform a dry-run (default):
114113
```bash
115-
docker run --rm -v $(pwd)/config.yml:/app/config.yml checkout-cloud-sync
114+
docker run --rm -v $(pwd)/config.yml:/app/config.yml checkout-data-sync
116115
```
117116

118117
Example output:
@@ -140,21 +139,21 @@ docker run --rm \
140139

141140
- To execute the migration:
142141
```bash
143-
docker run --rm -v $(pwd)/config.yml:/app/config.yml checkout-cloud-sync -f
142+
docker run --rm -v $(pwd)/config.yml:/app/config.yml checkout-data-sync -f
144143
```
145144

146145
- To use a config file at a custom path:
147146
```bash
148147
docker run --rm \
149148
-v $(pwd)/staging.yml:/app/staging.yml \
150-
checkout-cloud-sync -c /app/staging.yml -f
149+
checkout-data-sync -c /app/staging.yml -f
151150
```
152151

153152
- To build and run without Docker:
154153
```bash
155-
go build -o checkout-cloud-sync .
156-
./checkout-cloud-sync -c config.yml # dry-run
157-
./checkout-cloud-sync -c config.yml -f # execute
154+
go build -o checkout-data-sync .
155+
./checkout-data-sync -c config.yml # dry-run
156+
./checkout-data-sync -c config.yml -f # execute
158157
```
159158

160159
### Sync Behaviour
@@ -224,3 +223,7 @@ For least-privilege access, use the following scopes instead of `manage_project`
224223
| Write applications || `manage_checkout_applications:{projectKey}` |
225224
| Read payment integrations | `view_checkout_payment_integrations:{projectKey}` ||
226225
| Write payment integrations || `manage_checkout_payment_integrations:{projectKey}` |
226+
227+
____
228+
229+
#### Maintained by: [ogwurujohnson](https://github.com/ogwurujohnson)

cmd/root.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66

77
"github.com/spf13/cobra"
88

9-
"github.com/commercetools/checkout-cloud-sync/internal/config"
10-
"github.com/commercetools/checkout-cloud-sync/internal/sync"
9+
"github.com/commercetools/checkout-data-sync/internal/config"
10+
"github.com/commercetools/checkout-data-sync/internal/sync"
1111
)
1212

1313
var (
@@ -16,17 +16,17 @@ var (
1616
)
1717

1818
var rootCmd = &cobra.Command{
19-
Use: "checkout-cloud-sync",
19+
Use: "checkout-data-sync",
2020
Short: "Migrate commercetools Checkout resources between cloud providers",
21-
Long: `checkout-cloud-sync migrates commercetools Checkout resources
21+
Long: `checkout-data-sync migrates commercetools Checkout resources
2222
(applications and payment-integrations) from a source project to a target project.
2323
2424
Without -f, runs in dry-run mode and prints what would be migrated.
2525
With -f, performs the actual migration of both applications and payment-integrations.
2626
2727
Example:
28-
checkout-cloud-sync -c config.yml # dry-run
29-
checkout-cloud-sync -c config.yml -f # execute migration`,
28+
checkout-data-sync -c config.yml # dry-run
29+
checkout-data-sync -c config.yml -f # execute migration`,
3030
SilenceUsage: true,
3131
RunE: func(cmd *cobra.Command, args []string) error {
3232
cfg, err := config.Load(configFile)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/commercetools/checkout-cloud-sync
1+
module github.com/commercetools/checkout-data-sync
22

33
go 1.21
44

internal/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"strings"
1414
"time"
1515

16-
"github.com/commercetools/checkout-cloud-sync/internal/config"
16+
"github.com/commercetools/checkout-data-sync/internal/config"
1717
)
1818

1919
// Client is an authenticated Checkout API client for a single project.

internal/client/client_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"net/http/httptest"
88
"testing"
99

10-
"github.com/commercetools/checkout-cloud-sync/internal/client"
11-
"github.com/commercetools/checkout-cloud-sync/internal/config"
10+
"github.com/commercetools/checkout-data-sync/internal/client"
11+
"github.com/commercetools/checkout-data-sync/internal/config"
1212
)
1313

1414
// tokenHandler always returns a valid token response.

internal/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"path/filepath"
66
"testing"
77

8-
"github.com/commercetools/checkout-cloud-sync/internal/config"
8+
"github.com/commercetools/checkout-data-sync/internal/config"
99
)
1010

1111
const validConfig = `

internal/sync/syncer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"io"
88
"net/http"
99

10-
"github.com/commercetools/checkout-cloud-sync/internal/client"
11-
"github.com/commercetools/checkout-cloud-sync/internal/config"
10+
"github.com/commercetools/checkout-data-sync/internal/client"
11+
"github.com/commercetools/checkout-data-sync/internal/config"
1212
)
1313

1414
type apiClient interface {

internal/sync/syncer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"strings"
1111
"testing"
1212

13-
"github.com/commercetools/checkout-cloud-sync/internal/config"
14-
"github.com/commercetools/checkout-cloud-sync/internal/sync"
13+
"github.com/commercetools/checkout-data-sync/internal/config"
14+
"github.com/commercetools/checkout-data-sync/internal/sync"
1515
)
1616

1717
// ---- helpers -----------------------------------------------------------------

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import "github.com/commercetools/checkout-cloud-sync/cmd"
3+
import "github.com/commercetools/checkout-data-sync/cmd"
44

55
func main() {
66
cmd.Execute()

0 commit comments

Comments
 (0)