github.com/status-im/status-go@v1.1.0/Makefile (about)

     1  .PHONY: statusgo statusd-prune all test clean help
     2  .PHONY: statusgo-android statusgo-ios
     3  
     4  # Clear any GOROOT set outside of the Nix shell
     5  export GOROOT=
     6  
     7  # This is a code for automatic help generator.
     8  # It supports ANSI colors and categories.
     9  # To add new item into help output, simply add comments
    10  # starting with '##'. To add category, use @category.
    11  GREEN  := $(shell echo "\e[32m")
    12  WHITE  := $(shell echo "\e[37m")
    13  YELLOW := $(shell echo "\e[33m")
    14  RESET  := $(shell echo "\e[0m")
    15  HELP_FUN = \
    16  		   %help; \
    17  		   while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z0-9\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
    18  		   print "Usage: make [target]\n\n"; \
    19  		   for (sort keys %help) { \
    20  			   print "${WHITE}$$_:${RESET}\n"; \
    21  			   for (@{$$help{$$_}}) { \
    22  				   $$sep = " " x (32 - length $$_->[0]); \
    23  				   print "  ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
    24  			   }; \
    25  			   print "\n"; \
    26  		   }
    27  
    28  help: SHELL := /bin/sh
    29  help: ##@other Show this help
    30  	@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
    31  
    32  RELEASE_TAG:=$(shell ./_assets/scripts/version.sh)
    33  RELEASE_DIR := /tmp/release-$(RELEASE_TAG)
    34  GOLANGCI_BINARY=golangci-lint
    35  IPFS_GATEWAY_URL ?= https://ipfs.status.im/
    36  
    37  ifeq ($(OS),Windows_NT)     # is Windows_NT on XP, 2000, 7, Vista, 10...
    38   detected_OS := Windows
    39  else
    40   detected_OS := $(strip $(shell uname))
    41  endif
    42  
    43  ifeq ($(detected_OS),Darwin)
    44   GOBIN_SHARED_LIB_EXT := dylib
    45   GOBIN_SHARED_LIB_CFLAGS := CGO_ENABLED=1 GOOS=darwin
    46  else ifeq ($(detected_OS),Windows)
    47   GOBIN_SHARED_LIB_EXT := dll
    48   GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS=""
    49  else
    50   GOBIN_SHARED_LIB_EXT := so
    51   GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS="-Wl,-soname,libstatus.so.0"
    52  endif
    53  
    54  CGO_CFLAGS = -I/$(JAVA_HOME)/include -I/$(JAVA_HOME)/include/darwin
    55  export GOPATH ?= $(HOME)/go
    56  
    57  GIT_ROOT := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
    58  GIT_COMMIT := $(shell git rev-parse --short HEAD)
    59  GIT_AUTHOR := $(shell git config user.email || echo $$USER)
    60  
    61  ENABLE_METRICS ?= true
    62  BUILD_TAGS ?= gowaku_no_rln
    63  
    64  BUILD_FLAGS ?= -ldflags="-X github.com/status-im/status-go/params.Version=$(RELEASE_TAG:v%=%) \
    65  	-X github.com/status-im/status-go/params.GitCommit=$(GIT_COMMIT) \
    66  	-X github.com/status-im/status-go/params.IpfsGatewayURL=$(IPFS_GATEWAY_URL) \
    67  	-X github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/metrics.EnabledStr=$(ENABLE_METRICS)"
    68  
    69  BUILD_FLAGS_MOBILE ?= -ldflags="-X github.com/status-im/status-go/params.Version=$(RELEASE_TAG:v%=%) \
    70  	-X github.com/status-im/status-go/params.GitCommit=$(GIT_COMMIT) \
    71  	-X github.com/status-im/status-go/params.IpfsGatewayURL=$(IPFS_GATEWAY_URL)"
    72  
    73  networkid ?= StatusChain
    74  
    75  DOCKER_IMAGE_NAME ?= statusteam/status-go
    76  BOOTNODE_IMAGE_NAME ?= statusteam/bootnode
    77  STATUSD_PRUNE_IMAGE_NAME ?= statusteam/statusd-prune
    78  
    79  DOCKER_IMAGE_CUSTOM_TAG ?= $(RELEASE_TAG)
    80  
    81  DOCKER_TEST_WORKDIR = /go/src/github.com/status-im/status-go/
    82  DOCKER_TEST_IMAGE = golang:1.13
    83  
    84  GO_CMD_PATHS := $(filter-out library, $(wildcard cmd/*))
    85  GO_CMD_NAMES := $(notdir $(GO_CMD_PATHS))
    86  GO_CMD_BUILDS := $(addprefix build/bin/, $(GO_CMD_NAMES))
    87  
    88  # Our custom config is located in nix/nix.conf
    89  export NIX_USER_CONF_FILES = $(PWD)/nix/nix.conf
    90  # Location of symlinks to derivations that should not be garbage collected
    91  export _NIX_GCROOTS = ./.nix-gcroots
    92  
    93  #----------------
    94  # Nix targets
    95  #----------------
    96  
    97  # Use $(call sh, <COMMAND>) instead of $(shell <COMMAND>) to avoid
    98  # invoking a Nix shell when normal shell will suffice, it's faster.
    99  # This works because it's defined before we set SHELL to Nix one.
   100  define sh
   101  $(shell $(1))
   102  endef
   103  
   104  # TODO: Define more specific shells.
   105  TARGET := default
   106  ifneq ($(detected_OS),Windows)
   107   SHELL := ./nix/scripts/shell.sh
   108  endif
   109  shell: export TARGET ?= default
   110  shell: ##@prepare Enter into a pre-configured shell
   111  ifndef IN_NIX_SHELL
   112  	@ENTER_NIX_SHELL
   113  else
   114  	@echo "${YELLOW}Nix shell is already active$(RESET)"
   115  endif
   116  
   117  nix-repl: SHELL := /bin/sh
   118  nix-repl: ##@nix Start an interactive Nix REPL
   119  	nix repl shell.nix
   120  
   121  nix-gc-protected: SHELL := /bin/sh
   122  nix-gc-protected:
   123  	@echo -e "$(YELLOW)The following paths are protected:$(RESET)" && \
   124  	ls -1 $(_NIX_GCROOTS) | sed 's/^/ - /'
   125  
   126  
   127  nix-upgrade: SHELL := /bin/sh
   128  nix-upgrade: ##@nix Upgrade Nix interpreter to current version.
   129  	nix/scripts/upgrade.sh
   130  
   131  nix-gc: nix-gc-protected ##@nix Garbage collect all packages older than 20 days from /nix/store
   132  	nix-store --gc
   133  
   134  nix-clean: ##@nix Remove all status-mobile build artifacts from /nix/store
   135  	nix/scripts/clean.sh
   136  
   137  nix-purge: SHELL := /bin/sh
   138  nix-purge: ##@nix Completely remove Nix setup, including /nix directory
   139  	nix/scripts/purge.sh
   140  
   141  #----------------
   142  # General targets
   143  #----------------
   144  all: $(GO_CMD_NAMES)
   145  
   146  .PHONY: $(GO_CMD_NAMES) $(GO_CMD_PATHS) $(GO_CMD_BUILDS)
   147  $(GO_CMD_BUILDS): ##@build Build any Go project from cmd folder
   148  	go build -mod=vendor -v \
   149  		-tags '$(BUILD_TAGS)' $(BUILD_FLAGS) \
   150  		-o ./$@ ./cmd/$(notdir $@) ;\
   151  	echo "Compilation done." ;\
   152  	echo "Run \"build/bin/$(notdir $@) -h\" to view available commands."
   153  
   154  bootnode: ##@build Build discovery v5 bootnode using status-go deps
   155  bootnode: build/bin/bootnode
   156  
   157  node-canary: ##@build Build P2P node canary using status-go deps
   158  node-canary: build/bin/node-canary
   159  
   160  statusgo: ##@build Build status-go as statusd server
   161  statusgo: build/bin/statusd
   162  statusd: statusgo
   163  
   164  statusd-prune: ##@statusd-prune Build statusd-prune
   165  statusd-prune: build/bin/statusd-prune
   166  
   167  spiff-workflow: ##@build Build node for SpiffWorkflow BPMN software
   168  spiff-workflow: build/bin/spiff-workflow
   169  
   170  status-cli: ##@build Build status-cli to send messages
   171  status-cli: build/bin/status-cli
   172  
   173  statusd-prune-docker-image: SHELL := /bin/sh
   174  statusd-prune-docker-image: ##@statusd-prune Build statusd-prune docker image
   175  	@echo "Building docker image for ststusd-prune..."
   176  	docker build --file _assets/build/Dockerfile-prune . \
   177  		--label "commit=$(GIT_COMMIT)" \
   178  		--label "author=$(GIT_AUTHOR)" \
   179  		-t $(BOOTNODE_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG) \
   180  		-t $(STATUSD_PRUNE_IMAGE_NAME):latest
   181  
   182  statusgo-cross: statusgo-android statusgo-ios
   183  	@echo "Full cross compilation done."
   184  	@ls -ld build/bin/statusgo-*
   185  
   186  statusgo-android: ##@cross-compile Build status-go for Android
   187  	@echo "Building status-go for Android..."
   188  	export GO111MODULE=off; \
   189  	gomobile init; \
   190  	gomobile bind -v \
   191  		-target=android -ldflags="-s -w" \
   192  		-tags '$(BUILD_TAGS) disable_torrent' \
   193  		$(BUILD_FLAGS_MOBILE) \
   194  		-o build/bin/statusgo.aar \
   195  		github.com/status-im/status-go/mobile
   196  	@echo "Android cross compilation done in build/bin/statusgo.aar"
   197  
   198  statusgo-ios: ##@cross-compile Build status-go for iOS
   199  	@echo "Building status-go for iOS..."
   200  	export GO111MODULE=off; \
   201  	gomobile init; \
   202  	gomobile bind -v \
   203  		-target=ios -ldflags="-s -w" \
   204  		-tags 'nowatchdog $(BUILD_TAGS) disable_torrent' \
   205  		$(BUILD_FLAGS_MOBILE) \
   206  		-o build/bin/Statusgo.xcframework \
   207  		github.com/status-im/status-go/mobile
   208  	@echo "iOS framework cross compilation done in build/bin/Statusgo.xcframework"
   209  
   210  statusgo-library: ##@cross-compile Build status-go as static library for current platform
   211  	## cmd/library/README.md explains the magic incantation behind this
   212  	mkdir -p build/bin/statusgo-lib
   213  	go run cmd/library/*.go > build/bin/statusgo-lib/main.go
   214  	@echo "Building static library..."
   215  	go build \
   216  		-tags '$(BUILD_TAGS)' \
   217  		$(BUILD_FLAGS) \
   218  		-buildmode=c-archive \
   219  		-o build/bin/libstatus.a \
   220  		./build/bin/statusgo-lib
   221  	@echo "Static library built:"
   222  	@ls -la build/bin/libstatus.*
   223  
   224  statusgo-shared-library: ##@cross-compile Build status-go as shared library for current platform
   225  	## cmd/library/README.md explains the magic incantation behind this
   226  	mkdir -p build/bin/statusgo-lib
   227  	go run cmd/library/*.go > build/bin/statusgo-lib/main.go
   228  	@echo "Building shared library..."
   229  	@echo "Tags: $(BUILD_TAGS)"
   230  	$(GOBIN_SHARED_LIB_CFLAGS) $(GOBIN_SHARED_LIB_CGO_LDFLAGS) go build \
   231  		-tags '$(BUILD_TAGS)' \
   232  		$(BUILD_FLAGS) \
   233  		-buildmode=c-shared \
   234  		-o build/bin/libstatus.$(GOBIN_SHARED_LIB_EXT) \
   235  		./build/bin/statusgo-lib
   236  ifeq ($(detected_OS),Linux)
   237  	cd build/bin && \
   238  	ls -lah . && \
   239  	mv ./libstatus.$(GOBIN_SHARED_LIB_EXT) ./libstatus.$(GOBIN_SHARED_LIB_EXT).0 && \
   240  	ln -s ./libstatus.$(GOBIN_SHARED_LIB_EXT).0 ./libstatus.$(GOBIN_SHARED_LIB_EXT)
   241  endif
   242  	@echo "Shared library built:"
   243  	@ls -la build/bin/libstatus.*
   244  
   245  docker-image: SHELL := /bin/sh
   246  docker-image: BUILD_TARGET ?= statusd
   247  docker-image: ##@docker Build docker image (use DOCKER_IMAGE_NAME to set the image name)
   248  	@echo "Building docker image..."
   249  	docker build --file _assets/build/Dockerfile . \
   250  		--build-arg 'build_tags=$(BUILD_TAGS)' \
   251  		--build-arg 'build_flags=$(BUILD_FLAGS)' \
   252  		--build-arg 'build_target=$(BUILD_TARGET)' \
   253  		--label 'commit=$(GIT_COMMIT)' \
   254  		--label 'author=$(GIT_AUTHOR)' \
   255  		-t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG) \
   256  		-t $(DOCKER_IMAGE_NAME):latest
   257  
   258  bootnode-image: SHELL := /bin/sh
   259  bootnode-image:
   260  	@echo "Building docker image for bootnode..."
   261  	docker build --file _assets/build/Dockerfile-bootnode . \
   262  		--build-arg 'build_tags=$(BUILD_TAGS)' \
   263  		--build-arg 'build_flags=$(BUILD_FLAGS)' \
   264  		--label 'commit=$(GIT_COMMIT)' \
   265  		--label 'author=$(GIT_AUTHOR)' \
   266  		-t $(BOOTNODE_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG) \
   267  		-t $(BOOTNODE_IMAGE_NAME):latest
   268  
   269  push-docker-images: SHELL := /bin/sh
   270  push-docker-images: docker-image bootnode-image
   271  	docker push $(BOOTNODE_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG)
   272  	docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG)
   273  
   274  clean-docker-images: SHELL := /bin/sh
   275  clean-docker-images:
   276  	docker rmi -f $$(docker image ls --filter="reference=$(DOCKER_IMAGE_NAME)" --quiet)
   277  
   278  # See https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html to understand this magic.
   279  push-docker-images-latest: SHELL := /bin/sh
   280  push-docker-images-latest: GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
   281  push-docker-images-latest: GIT_LOCAL  = $(shell git rev-parse @)
   282  push-docker-images-latest: GIT_REMOTE = $(shell git fetch -q && git rev-parse remotes/origin/develop || echo 'NO_DEVELOP')
   283  push-docker-images-latest:
   284  	echo $(GIT_BRANCH)
   285  	echo $(GIT_LOCAL)
   286  	echo $(GIT_REMOTE)
   287  	@echo "Pushing latest docker images..."
   288  	@echo "Checking git branch..."
   289  ifneq ("$(GIT_BRANCH)", "develop")
   290  	$(error You should only use develop branch to push the latest tag!)
   291  	exit 1
   292  endif
   293  ifneq ("$(GIT_LOCAL)", "$(GIT_REMOTE)")
   294  	$(error The local git commit does not match the remote origin!)
   295  	exit 1
   296  endif
   297  	docker push $(BOOTNODE_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG)
   298  	docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_CUSTOM_TAG)
   299  
   300  setup: ##@setup Install all tools
   301  setup: setup-dev
   302  
   303  setup-dev: ##@setup Install all necessary tools for development
   304  setup-dev:
   305  	echo "Replaced by Nix shell. Use 'make shell' or just any target as-is."
   306  
   307  generate-handlers:
   308  	go generate ./_assets/generate_handlers/
   309  generate: ##@other Regenerate assets and other auto-generated stuff
   310  	go generate ./static ./static/mailserver_db_migrations ./t ./multiaccounts/... ./appdatabase/... ./protocol/... ./walletdatabase/... ./_assets/generate_handlers
   311  
   312  generate-appdatabase:
   313  	go generate ./appdatabase/...
   314  
   315  prepare-release: clean-release
   316  	mkdir -p $(RELEASE_DIR)
   317  	mv build/bin/statusgo.aar $(RELEASE_DIR)/status-go-android.aar
   318  	zip -r build/bin/Statusgo.xcframework.zip build/bin/Statusgo.xcframework
   319  	mv build/bin/Statusgo.xcframework.zip $(RELEASE_DIR)/status-go-ios.zip
   320  	zip -r $(RELEASE_DIR)/status-go-desktop.zip . -x *.git*
   321  	${MAKE} clean
   322  
   323  clean-release:
   324  	rm -rf $(RELEASE_DIR)
   325  
   326  lint-fix:
   327  	find . \
   328  		-name '*.go' \
   329  		-and -not -name '*.pb.go' \
   330  		-and -not -name 'bindata*' \
   331  		-and -not -name 'migrations.go' \
   332  		-and -not -name 'messenger_handlers.go' \
   333  		-and -not -wholename '*/vendor/*' \
   334  		-exec goimports \
   335  		-local 'github.com/ethereum/go-ethereum,github.com/status-im/status-go,github.com/status-im/markdown' \
   336  		-w {} \;
   337  	$(MAKE) vendor
   338  
   339  mock: ##@other Regenerate mocks
   340  	mockgen -package=fake         -destination=transactions/fake/mock.go             -source=transactions/fake/txservice.go
   341  	mockgen -package=status       -destination=services/status/account_mock.go       -source=services/status/service.go
   342  	mockgen -package=peer         -destination=services/peer/discoverer_mock.go      -source=services/peer/service.go
   343  	mockgen -package=mock_transactor -destination=transactions/mock_transactor/transactor.go   -source=transactions/transactor.go
   344  	mockgen -package=mock_pathprocessor     -destination=services/wallet/router/pathprocessor/mock_pathprocessor/processor.go -source=services/wallet/router/pathprocessor/processor.go
   345  	mockgen -package=mock_bridge     -destination=services/wallet/bridge/mock_bridge/bridge.go -source=services/wallet/bridge/bridge.go
   346  	mockgen -package=mock_client     -destination=rpc/chain/mock/client/client.go              -source=rpc/chain/client.go
   347  	mockgen -package=mock_token      -destination=services/wallet/token/mock/token/tokenmanager.go -source=services/wallet/token/token.go
   348  	mockgen -package=mock_thirdparty -destination=services/wallet/thirdparty/mock/types.go -source=services/wallet/thirdparty/types.go
   349  	mockgen -package=mock_balance_persistence -destination=services/wallet/token/mock/balance_persistence/balance_persistence.go -source=services/wallet/token/balance_persistence.go
   350  	mockgen -package=mock_network      -destination=rpc/network/mock/network.go -source=rpc/network/network.go
   351  	mockgen -package=mock_rpcclient     -destination=rpc/mock/client/client.go              -source=rpc/client.go
   352  	mockgen -package=mock_collectibles -destination=services/wallet/collectibles/mock/collection_data_db.go -source=services/wallet/collectibles/collection_data_db.go
   353  	mockgen -package=mock_collectibles -destination=services/wallet/collectibles/mock/collectible_data_db.go -source=services/wallet/collectibles/collectible_data_db.go
   354  	mockgen -package=mock_thirdparty -destination=services/wallet/thirdparty/mock/collectible_types.go -source=services/wallet/thirdparty/collectible_types.go
   355  	mockgen -package=mock_paraswap -destination=services/wallet/thirdparty/paraswap/mock/types.go -source=services/wallet/thirdparty/paraswap/types.go
   356  	mockgen -package=mock_onramp -destination=services/wallet/onramp/mock/types.go -source=services/wallet/onramp/types.go
   357  
   358  docker-test: ##@tests Run tests in a docker container with golang.
   359  	docker run --privileged --rm -it -v "$(PWD):$(DOCKER_TEST_WORKDIR)" -w "$(DOCKER_TEST_WORKDIR)" $(DOCKER_TEST_IMAGE) go test ${ARGS}
   360  
   361  test: test-unit ##@tests Run basic, short tests during development
   362  
   363  test-unit: export BUILD_TAGS ?=
   364  test-unit: export UNIT_TEST_DRY_RUN ?= false
   365  test-unit: export UNIT_TEST_COUNT ?= 1
   366  test-unit: export UNIT_TEST_FAILFAST ?= true
   367  test-unit: export UNIT_TEST_RERUN_FAILS ?= true
   368  test-unit: export UNIT_TEST_USE_DEVELOPMENT_LOGGER ?= true
   369  test-unit: export UNIT_TEST_REPORT_CODECLIMATE ?= false
   370  test-unit: export UNIT_TEST_REPORT_CODECOV ?= false
   371  test-unit: export UNIT_TEST_PACKAGES ?= $(call sh, go list ./... | \
   372  	grep -v /vendor | \
   373  	grep -v /t/e2e | \
   374  	grep -v /t/benchmarks | \
   375  	grep -v /transactions/fake)
   376  test-unit: ##@tests Run unit and integration tests
   377  	./_assets/scripts/run_unit_tests.sh
   378  
   379  test-unit-race: export GOTEST_EXTRAFLAGS=-race
   380  test-unit-race: test-unit ##@tests Run unit and integration tests with -race flag
   381  
   382  test-e2e: ##@tests Run e2e tests
   383  	# order: reliability then alphabetical
   384  	# TODO(tiabc): make a single command out of them adding `-p 1` flag.
   385  
   386  test-e2e-race: export GOTEST_EXTRAFLAGS=-race
   387  test-e2e-race: test-e2e ##@tests Run e2e tests with -race flag
   388  
   389  canary-test: node-canary
   390  	# TODO: uncomment that!
   391  	#_assets/scripts/canary_test_mailservers.sh ./config/cli/fleet-eth.prod.json
   392  
   393  lint:
   394  	golangci-lint run ./...
   395  
   396  ci: lint canary-test test-unit test-e2e ##@tests Run all linters and tests at once
   397  
   398  ci-race: lint canary-test test-unit test-e2e-race ##@tests Run all linters and tests at once + race
   399  
   400  clean: ##@other Cleanup
   401  	rm -fr build/bin/* mailserver-config.json
   402  
   403  git-clean:
   404  	git clean -xf
   405  
   406  deep-clean: clean git-clean
   407  	rm -Rdf .ethereumtest/StatusChain
   408  
   409  tidy:
   410  	go mod tidy
   411  
   412  vendor:
   413  	go mod tidy
   414  	go mod vendor
   415  	modvendor -copy="**/*.c **/*.h" -v
   416  .PHONY: vendor
   417  
   418  update-fleet-config: ##@other Update fleets configuration from fleets.status.im
   419  	./_assets/scripts/update-fleet-config.sh
   420  	@echo "Updating static assets..."
   421  	@go generate ./static
   422  	@echo "Done"
   423  
   424  run-bootnode-systemd: ##@Easy way to run a bootnode locally with Docker Compose
   425  	@cd _assets/systemd/bootnode && $(MAKE)
   426  
   427  run-bootnode-docker: ##@Easy way to run a bootnode locally with Docker Compose
   428  	@cd _assets/compose/bootnode && $(MAKE)
   429  
   430  run-mailserver-systemd: ##@Easy Run a mailserver locally with systemd
   431  	@cd _assets/systemd/mailserver && $(MAKE)
   432  
   433  run-mailserver-docker: ##@Easy Run a mailserver locally with Docker Compose
   434  	@cd _assets/compose/mailserver && $(MAKE)
   435  
   436  clean-bootnode-systemd: ##@Easy Clean your systemd service for running a bootnode
   437  	@cd _assets/systemd/bootnode && $(MAKE) clean
   438  
   439  clean-bootnode-docker: ##@Easy Clean your Docker container running a bootnode
   440  	@cd _assets/compose/bootnode && $(MAKE) clean
   441  
   442  clean-mailserver-systemd: ##@Easy Clean your systemd service for running a mailserver
   443  	@cd _assets/systemd/mailserver && $(MAKE) clean
   444  
   445  clean-mailserver-docker: ##@Easy Clean your Docker container running a mailserver
   446  	@cd _assets/compose/mailserver && $(MAKE) clean
   447  
   448  migration: DEFAULT_MIGRATION_PATH := appdatabase/migrations/sql
   449  migration:
   450  	touch $(DEFAULT_MIGRATION_PATH)/$$(date '+%s')_$(D).up.sql
   451  
   452  migration-check:
   453  	bash _assets/scripts/migration_check.sh
   454  
   455  commit-check: SHELL := /bin/sh
   456  commit-check:
   457  	@bash _assets/scripts/commit_check.sh
   458  
   459  version: SHELL := /bin/sh
   460  version:
   461  	@./_assets/scripts/version.sh
   462  
   463  tag-version:
   464  	bash _assets/scripts/tag_version.sh $(TARGET_COMMIT)
   465  
   466  migration-wallet: DEFAULT_WALLET_MIGRATION_PATH := walletdatabase/migrations/sql
   467  migration-wallet:
   468  	touch $(DEFAULT_WALLET_MIGRATION_PATH)/$$(date +%s)_$(D).up.sql
   469  
   470  install-git-hooks: SHELL := /bin/sh
   471  install-git-hooks:
   472  	@ln -sf $(if $(filter $(detected_OS), Linux),-r,) \
   473  		$(GIT_ROOT)/_assets/hooks/* $(GIT_ROOT)/.git/hooks
   474  
   475  -include install-git-hooks
   476  .PHONY: install-git-hooks
   477  
   478  migration-protocol: DEFAULT_PROTOCOL_PATH := protocol/migrations/sqlite
   479  migration-protocol:
   480  	touch $(DEFAULT_PROTOCOL_PATH)/$$(date +%s)_$(D).up.sql
   481  
   482  PROXY_WRAPPER_PATH = $(CURDIR)/vendor/github.com/siphiuel/lc-proxy-wrapper
   483  -include $(PROXY_WRAPPER_PATH)/Makefile.vars
   484  
   485  #export VERIF_PROXY_OUT_PATH = $(CURDIR)/vendor/github.com/siphiuel/lc-proxy-wrapper
   486  build-verif-proxy:
   487  	$(MAKE) -C $(NIMBUS_ETH1_PATH) libverifproxy
   488  
   489  build-verif-proxy-wrapper:
   490  	$(MAKE) -C $(VERIF_PROXY_OUT_PATH) build-verif-proxy-wrapper
   491  
   492  test-verif-proxy-wrapper:
   493  	CGO_CFLAGS="$(CGO_CFLAGS)" go test -v github.com/status-im/status-go/rpc -tags gowaku_skip_migrations,nimbus_light_client -run ^TestProxySuite$$ -testify.m TestRun -ldflags $(LDFLAGS)
   494  
   495  
   496  run-integration-tests: SHELL := /bin/sh
   497  run-integration-tests: export INTEGRATION_TESTS_DOCKER_UID ?= $(shell id -u $$USER)
   498  run-integration-tests:
   499  	docker-compose -f integration-tests/docker-compose.anvil.yml -f integration-tests/docker-compose.test.status-go.yml up -d --build --remove-orphans; \
   500  	docker-compose -f integration-tests/docker-compose.anvil.yml -f integration-tests/docker-compose.test.status-go.yml logs -f tests-rpc; \
   501  	exit_code=$$(docker inspect integration-tests_tests-rpc_1 -f '{{.State.ExitCode}}'); \
   502  	docker-compose -f integration-tests/docker-compose.anvil.yml -f integration-tests/docker-compose.test.status-go.yml down; \
   503  	exit $$exit_code
   504  
   505  run-anvil: SHELL := /bin/sh
   506  run-anvil:
   507  	docker-compose -f integration-tests/docker-compose.anvil.yml up --remove-orphans
   508  
   509  codecov-validate:
   510  	curl -X POST --data-binary @.codecov.yml https://codecov.io/validate