Move non-go related files to the `_assets` folder. #621 (#630)

This commit is contained in:
Caner Çıdam 2018-02-09 16:38:18 +03:00 committed by Igor Mandrigin
parent 2d964bfe9f
commit a4c36fe96a
29 changed files with 19 additions and 16 deletions

View File

@ -43,7 +43,7 @@ HELP_FUN = \
} }
statusgo: ##@build Build status-go as statusd server statusgo: ##@build Build status-go as statusd server
go build -i -o $(GOBIN)/statusd -v -tags '$(BUILD_TAGS)' $(shell build/testnet-flags.sh) ./cmd/statusd go build -i -o $(GOBIN)/statusd -v -tags '$(BUILD_TAGS)' $(shell _assets/build/testnet-flags.sh) ./cmd/statusd
@echo "Compilation done." @echo "Compilation done."
@echo "Run \"build/bin/statusd -h\" to view available commands." @echo "Run \"build/bin/statusd -h\" to view available commands."
@ -52,16 +52,16 @@ statusgo-cross: statusgo-android statusgo-ios
@ls -ld $(GOBIN)/statusgo-* @ls -ld $(GOBIN)/statusgo-*
statusgo-android: xgo ##@cross-compile Build status-go for Android statusgo-android: xgo ##@cross-compile Build status-go for Android
$(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar -v -tags '$(BUILD_TAGS)' $(shell build/testnet-flags.sh) ./lib $(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar -v -tags '$(BUILD_TAGS)' $(shell _assets/build/testnet-flags.sh) ./lib
@echo "Android cross compilation done." @echo "Android cross compilation done."
statusgo-ios: xgo ##@cross-compile Build status-go for iOS statusgo-ios: xgo ##@cross-compile Build status-go for iOS
$(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v -tags '$(BUILD_TAGS)' $(shell build/testnet-flags.sh) ./lib $(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v -tags '$(BUILD_TAGS)' $(shell _assets/build/testnet-flags.sh) ./lib
@echo "iOS framework cross compilation done." @echo "iOS framework cross compilation done."
statusgo-ios-simulator: xgo ##@cross-compile Build status-go for iOS Simulator statusgo-ios-simulator: xgo ##@cross-compile Build status-go for iOS Simulator
@docker pull $(XGOIMAGEIOSSIM) @docker pull $(XGOIMAGEIOSSIM)
$(GOPATH)/bin/xgo --image $(XGOIMAGEIOSSIM) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v -tags '$(BUILD_TAGS)' $(shell build/testnet-flags.sh) ./lib $(GOPATH)/bin/xgo --image $(XGOIMAGEIOSSIM) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v -tags '$(BUILD_TAGS)' $(shell _assets/build/testnet-flags.sh) ./lib
@echo "iOS framework cross compilation done." @echo "iOS framework cross compilation done."
statusgo-library: ##@cross-compile Build status-go as static library for current platform statusgo-library: ##@cross-compile Build status-go as static library for current platform
@ -72,32 +72,32 @@ statusgo-library: ##@cross-compile Build status-go as static library for current
docker-image: ##@docker Build docker image (use DOCKER_IMAGE_NAME to set the image name) docker-image: ##@docker Build docker image (use DOCKER_IMAGE_NAME to set the image name)
@echo "Building docker image..." @echo "Building docker image..."
docker build --build-arg "build_tags=$(BUILD_TAGS)" . -t $(DOCKER_IMAGE_NAME) docker build --file _assets/build/Dockerfile --build-arg "build_tags=$(BUILD_TAGS)" . -t $(DOCKER_IMAGE_NAME)
xgo-docker-images: ##@docker Build xgo docker images xgo-docker-images: ##@docker Build xgo docker images
@echo "Building xgo docker images..." @echo "Building xgo docker images..."
docker build xgo/base -t $(XGOIMAGE) docker build _assets/build/xgo/base -t $(XGOIMAGE)
docker build xgo/ios-simulator -t $(XGOIMAGEIOSSIM) docker build _assets/build/xgo/ios-simulator -t $(XGOIMAGEIOSSIM)
xgo: xgo:
docker pull $(XGOIMAGE) docker pull $(XGOIMAGE)
go get github.com/karalabe/xgo go get github.com/karalabe/xgo
statusgo-mainnet: statusgo-mainnet:
go build -i -o $(GOBIN)/statusgo -v $(shell build/mainnet-flags.sh) ./cmd/statusd go build -i -o $(GOBIN)/statusgo -v $(shell _assets/build/mainnet-flags.sh) ./cmd/statusd
@echo "status go compilation done (mainnet)." @echo "status go compilation done (mainnet)."
@echo "Run \"build/bin/statusgo\" to view available commands" @echo "Run \"build/bin/statusgo\" to view available commands"
statusgo-android-mainnet: xgo statusgo-android-mainnet: xgo
$(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar -v $(shell build/mainnet-flags.sh) ./lib $(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=android-16/aar -v $(shell _assets/build/mainnet-flags.sh) ./lib
@echo "Android cross compilation done (mainnet)." @echo "Android cross compilation done (mainnet)."
statusgo-ios-mainnet: xgo statusgo-ios-mainnet: xgo
$(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell build/mainnet-flags.sh) ./lib $(GOPATH)/bin/xgo --image $(XGOIMAGE) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell _assets/build/mainnet-flags.sh) ./lib
@echo "iOS framework cross compilation done (mainnet)." @echo "iOS framework cross compilation done (mainnet)."
statusgo-ios-simulator-mainnet: xgo statusgo-ios-simulator-mainnet: xgo
$(GOPATH)/bin/xgo --image $(XGOIMAGEIOSSIM) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell build/mainnet-flags.sh) ./lib $(GOPATH)/bin/xgo --image $(XGOIMAGEIOSSIM) --go=$(GO) -out statusgo --dest=$(GOBIN) --targets=ios-9.3/framework -v $(shell _assets/build/mainnet-flags.sh) ./lib
@echo "iOS framework cross compilation done (mainnet)." @echo "iOS framework cross compilation done (mainnet)."
generate: ##@other Regenerate assets and other auto-generated stuff generate: ##@other Regenerate assets and other auto-generated stuff
@ -155,7 +155,10 @@ deep-clean: clean
vendor-check: vendor-check:
@dep ensure @dep ensure
./ci/validate-vendor.sh ./_assets/ci/validate-vendor.sh
dep-install: dep-install:
go get -u github.com/golang/dep/cmd/dep go get -u github.com/golang/dep/cmd/dep
patch:
./_assets/patches/patcher

View File

@ -2,7 +2,7 @@
set -e set -e
if [ ! -f "build/mainnet-flags.sh" ]; then if [ ! -f "_assets/build/mainnet-flags.sh" ]; then
echo "$0 must be run from the root of the repository." echo "$0 must be run from the root of the repository."
exit 2 exit 2
fi fi

View File

@ -2,7 +2,7 @@
set -e set -e
if [ ! -f "build/testnet-flags.sh" ]; then if [ ! -f "_assets/build/testnet-flags.sh" ]; then
echo "$0 must be run from the root of the repository." echo "$0 must be run from the root of the repository."
exit 2 exit 2
fi fi

View File

@ -40,7 +40,7 @@ In our case `<release_branch>` would be `release/1.7` because the current stable
3. Apply patches 3. Apply patches
```bash ```bash
for patch in $GOPATH/src/github.com/status-im/status-go/geth-patches/*.patch; for patch in $GOPATH/src/github.com/status-im/status-go/_assets/patches/geth/*.patch;
do do
patch -p1 < $patch; patch -p1 < $patch;
done done

View File

@ -13,7 +13,7 @@
# #
# If -p is not present, default path is as below ($basepath). # If -p is not present, default path is as below ($basepath).
patches=($(pwd)/geth-patches/*.patch) patches=($(pwd)/_assets/patches/geth/*.patch)
# Base path is vendor/github.com/ethereum/go-ethereum # Base path is vendor/github.com/ethereum/go-ethereum
# unless specified. # unless specified.