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
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 "Run \"build/bin/statusd -h\" to view available commands."
@ -52,16 +52,16 @@ statusgo-cross: statusgo-android statusgo-ios
@ls -ld $(GOBIN)/statusgo-*
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."
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."
statusgo-ios-simulator: xgo ##@cross-compile Build status-go for iOS Simulator
@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."
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)
@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
@echo "Building xgo docker images..."
docker build xgo/base -t $(XGOIMAGE)
docker build xgo/ios-simulator -t $(XGOIMAGEIOSSIM)
docker build _assets/build/xgo/base -t $(XGOIMAGE)
docker build _assets/build/xgo/ios-simulator -t $(XGOIMAGEIOSSIM)
xgo:
docker pull $(XGOIMAGE)
go get github.com/karalabe/xgo
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 "Run \"build/bin/statusgo\" to view available commands"
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)."
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)."
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)."
generate: ##@other Regenerate assets and other auto-generated stuff
@ -155,7 +155,10 @@ deep-clean: clean
vendor-check:
@dep ensure
./ci/validate-vendor.sh
./_assets/ci/validate-vendor.sh
dep-install:
go get -u github.com/golang/dep/cmd/dep
patch:
./_assets/patches/patcher

View File

@ -2,7 +2,7 @@
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."
exit 2
fi

View File

@ -2,7 +2,7 @@
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."
exit 2
fi

View File

@ -40,7 +40,7 @@ In our case `<release_branch>` would be `release/1.7` because the current stable
3. Apply patches
```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
patch -p1 < $patch;
done

View File

@ -13,7 +13,7 @@
#
# 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
# unless specified.