Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
DazWorrall committed Jan 29, 2024
1 parent a9afb55 commit 23dffcd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ BIN_DIR := usr/bin
PROJECTS := copydb sharding
PROJECT_DEBS := $(foreach name,$(PROJECTS),$(name)-deb)

PLATFORM := $(shell uname -s | tr A-Z a-z)
ARCH := $(shell uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')
GOTESTSUM_URL := "https://github.com/gotestyourself/gotestsum/releases/download/v1.7.0/gotestsum_1.7.0_$(PLATFORM)_$(ARCH).tar.gz"

# Target specific variable, set proj to have a valid value.
PROJECT_PKG = ./$(proj)/cmd
PROJECT_BIN = ghostferry-$(proj)
BIN_TARGET = $(GOBIN)/$(PROJECT_BIN)
DEB_TARGET = $(BUILD_DIR)/$(PROJECT_BIN)_$(VERSION_STR).deb

PLATFORM := $(shell uname -s | tr A-Z a-z)
ARCH := $(shell uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')
GOTESTSUM_URL := "https://github.com/gotestyourself/gotestsum/releases/download/v1.7.0/gotestsum_1.7.0_$(PLATFORM)_$(ARCH).tar.gz"
DEB_TARGET = $(BUILD_DIR)/$(PROJECT_BIN)_$(VERSION_STR)_$(ARCH).deb

.PHONY: test test-go test-ruby clean reset-deb-dir $(PROJECTS) $(PROJECT_DEBS)
.DEFAULT_GOAL := test
Expand All @@ -46,7 +46,7 @@ $(PROJECTS): $(GOBIN)
$(PROJECT_DEBS): LDFLAGS += -X github.com/Shopify/ghostferry.WebUiBasedir=/$(SHARE_DIR)
$(PROJECT_DEBS): reset-deb-dir
$(eval proj := $(subst -deb,,$@))
sed -e "s/{version}/$(VERSION_STR)/" $(proj)/debian/control > $(DEB_PREFIX)/DEBIAN/control
sed -e "s/{version}/$(VERSION_STR)/" "s/{arch}/$(ARCH)/" $(proj)/debian/control > $(DEB_PREFIX)/DEBIAN/control
cp $(proj)/debian/copyright $(DEB_PREFIX)/DEBIAN/copyright
go build -ldflags "$(LDFLAGS)" -o $(DEB_PREFIX)/$(BIN_DIR)/$(PROJECT_BIN) $(PROJECT_PKG)
cp -ar webui $(DEB_PREFIX)/$(SHARE_DIR)
Expand Down
3 changes: 1 addition & 2 deletions copydb/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Package: ghostferry-copydb
Version: {version}-1
Section: misc
Priority: optional
Architecture: any
Multi-Arch: same
Architecture: {arch}
Maintainer: Shuhao Wu <shuhao.wu@shopify.com>
Description: Migrate MySQL data from one server to another
without downtime via ghostferry.
3 changes: 1 addition & 2 deletions sharding/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Package: ghostferry-sharding
Version: {version}
Section: misc
Priority: optional
Architecture: any
Multi-Arch: same
Architecture: {arch}
Maintainer: Shuhao Wu <shuhao.wu@shopify.com>
Uploaders: Justin Li <justin.li@shopify.com>,Hormoz Kheradmand <hormoz.kheradmand@shopify.com>
Description: Migrate MySQL sharded data from one server to
Expand Down

0 comments on commit 23dffcd

Please sign in to comment.