mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-20 03:19:53 -06:00
refactor: debranding Makefiles
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
OC_REPO := github.com/owncloud/ocis/v2
|
OC_REPO := github.com/opencloud-eu/opencloud
|
||||||
IMPORT := ($OC_REPO)/$(NAME)
|
IMPORT := ($OC_REPO)/$(NAME)
|
||||||
BIN := bin
|
BIN := bin
|
||||||
DIST := dist
|
DIST := dist
|
||||||
@@ -37,8 +37,8 @@ ifndef DATE
|
|||||||
DATE := $(shell date -u '+%Y%m%d')
|
DATE := $(shell date -u '+%Y%m%d')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -s -w -X "$(OC_REPO)/ocis-pkg/version.String=$(STRING)" -X "$(OC_REPO)/ocis-pkg/version.Tag=$(VERSION)" -X "$(OC_REPO)/ocis-pkg/version.Date=$(DATE)"
|
LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -s -w -X "$(OC_REPO)/pkg/version.String=$(STRING)" -X "$(OC_REPO)/pkg/version.Tag=$(VERSION)" -X "$(OC_REPO)/pkg/version.Date=$(DATE)"
|
||||||
DEBUG_LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -X "$(OC_REPO)/ocis-pkg/version.String=$(STRING)" -X "$(OC_REPO)/ocis-pkg/version.Tag=$(VERSION)" -X "$(OC_REPO)/ocis-pkg/version.Date=$(DATE)"
|
DEBUG_LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -X "$(OC_REPO)/pkg/version.String=$(STRING)" -X "$(OC_REPO)/pkg/version.Tag=$(VERSION)" -X "$(OC_REPO)/pkg/version.Date=$(DATE)"
|
||||||
|
|
||||||
GCFLAGS += all=-N -l
|
GCFLAGS += all=-N -l
|
||||||
|
|
||||||
|
|||||||
36
Makefile
36
Makefile
@@ -68,7 +68,7 @@ OC_MODULES = \
|
|||||||
pkg
|
pkg
|
||||||
|
|
||||||
# bin file definitions
|
# bin file definitions
|
||||||
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/owncloud-codestyle/vendor/bin/php-cs-fixer
|
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/opencloud-codestyle/vendor/bin/php-cs-fixer
|
||||||
PHP_CODESNIFFER=vendor-bin/php_codesniffer/vendor/bin/phpcs
|
PHP_CODESNIFFER=vendor-bin/php_codesniffer/vendor/bin/phpcs
|
||||||
PHP_CODEBEAUTIFIER=vendor-bin/php_codesniffer/vendor/bin/phpcbf
|
PHP_CODEBEAUTIFIER=vendor-bin/php_codesniffer/vendor/bin/phpcbf
|
||||||
PHAN=php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan
|
PHAN=php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan
|
||||||
@@ -85,7 +85,7 @@ help:
|
|||||||
@echo "Please use 'make <target>' where <target> is one of the following:"
|
@echo "Please use 'make <target>' where <target> is one of the following:"
|
||||||
@echo
|
@echo
|
||||||
@echo -e "${GREEN}Testing with test suite natively installed:${RESET}\n"
|
@echo -e "${GREEN}Testing with test suite natively installed:${RESET}\n"
|
||||||
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/testing/#testing-with-test-suite-natively-installed${RESET}\n"
|
@echo -e "${PURPLE}\tdocs: https://opencloud.dev/opencloud/development/testing/#testing-with-test-suite-natively-installed${RESET}\n"
|
||||||
@echo -e "\tmake test-acceptance-api\t\t${BLUE}run API acceptance tests${RESET}"
|
@echo -e "\tmake test-acceptance-api\t\t${BLUE}run API acceptance tests${RESET}"
|
||||||
@echo -e "\tmake clean-tests\t\t\t${BLUE}delete API tests framework dependencies${RESET}"
|
@echo -e "\tmake clean-tests\t\t\t${BLUE}delete API tests framework dependencies${RESET}"
|
||||||
@echo
|
@echo
|
||||||
@@ -93,18 +93,18 @@ help:
|
|||||||
@echo
|
@echo
|
||||||
@echo -e "${RED}You also should have a look at other available Makefiles:${RESET}"
|
@echo -e "${RED}You also should have a look at other available Makefiles:${RESET}"
|
||||||
@echo
|
@echo
|
||||||
@echo -e "${GREEN}oCIS:${RESET}\n"
|
@echo -e "${GREEN}opencloud:${RESET}\n"
|
||||||
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/build/${RESET}\n"
|
@echo -e "${PURPLE}\tdocs: https://opencloud.dev/opencloud/development/build/${RESET}\n"
|
||||||
@echo -e "\tsee ./ocis/Makefile"
|
@echo -e "\tsee ./opencloud/Makefile"
|
||||||
@echo -e "\tor run ${YELLOW}make -C ocis help${RESET}"
|
@echo -e "\tor run ${YELLOW}make -C opencloud help${RESET}"
|
||||||
@echo
|
@echo
|
||||||
@echo -e "${GREEN}Documentation:${RESET}\n"
|
@echo -e "${GREEN}Documentation:${RESET}\n"
|
||||||
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/build-docs/${RESET}\n"
|
@echo -e "${PURPLE}\tdocs: https://opencloud.dev/opencloud/development/build-docs/${RESET}\n"
|
||||||
@echo -e "\tsee ./docs/Makefile"
|
@echo -e "\tsee ./docs/Makefile"
|
||||||
@echo -e "\tor run ${YELLOW}make -C docs help${RESET}"
|
@echo -e "\tor run ${YELLOW}make -C docs help${RESET}"
|
||||||
@echo
|
@echo
|
||||||
@echo -e "${GREEN}Testing with test suite in docker:${RESET}\n"
|
@echo -e "${GREEN}Testing with test suite in docker:${RESET}\n"
|
||||||
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/testing/#testing-with-test-suite-in-docker${RESET}\n"
|
@echo -e "${PURPLE}\tdocs: https://opencloud.dev/opencloud/development/testing/#testing-with-test-suite-in-docker${RESET}\n"
|
||||||
@echo -e "\tsee ./tests/acceptance/docker/Makefile"
|
@echo -e "\tsee ./tests/acceptance/docker/Makefile"
|
||||||
@echo -e "\tor run ${YELLOW}make -C tests/acceptance/docker help${RESET}"
|
@echo -e "\tor run ${YELLOW}make -C tests/acceptance/docker help${RESET}"
|
||||||
@echo
|
@echo
|
||||||
@@ -257,9 +257,9 @@ ci-node-check-licenses:
|
|||||||
|
|
||||||
.PHONY: ci-go-save-licenses
|
.PHONY: ci-go-save-licenses
|
||||||
ci-go-save-licenses: $(GO_LICENSES)
|
ci-go-save-licenses: $(GO_LICENSES)
|
||||||
@mkdir -p ./third-party-licenses/go/ocis/third-party-licenses
|
@mkdir -p ./third-party-licenses/go/opencloud/third-party-licenses
|
||||||
$(GO_LICENSES) csv ./... > ./third-party-licenses/go/ocis/third-party-licenses.csv
|
$(GO_LICENSES) csv ./... > ./third-party-licenses/go/opencloud/third-party-licenses.csv
|
||||||
$(GO_LICENSES) save ./... --force --save_path="./third-party-licenses/go/ocis/third-party-licenses"
|
$(GO_LICENSES) save ./... --force --save_path="./third-party-licenses/go/opencloud/third-party-licenses"
|
||||||
|
|
||||||
.PHONY: ci-node-save-licenses
|
.PHONY: ci-node-save-licenses
|
||||||
ci-node-save-licenses:
|
ci-node-save-licenses:
|
||||||
@@ -321,26 +321,26 @@ ci-format: $(BUILDIFIER)
|
|||||||
$(BUILDIFIER) --mode=fix .drone.star
|
$(BUILDIFIER) --mode=fix .drone.star
|
||||||
|
|
||||||
.PHONY: test-php-style
|
.PHONY: test-php-style
|
||||||
test-php-style: vendor-bin/owncloud-codestyle/vendor vendor-bin/php_codesniffer/vendor
|
test-php-style: vendor-bin/opencloud-codestyle/vendor vendor-bin/php_codesniffer/vendor
|
||||||
$(PHP_CS_FIXER) fix -v --diff --allow-risky yes --dry-run
|
$(PHP_CS_FIXER) fix -v --diff --allow-risky yes --dry-run
|
||||||
$(PHP_CODESNIFFER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance tests/acceptance/TestHelpers
|
$(PHP_CODESNIFFER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance tests/acceptance/TestHelpers
|
||||||
|
|
||||||
.PHONY: test-php-style-fix
|
.PHONY: test-php-style-fix
|
||||||
test-php-style-fix: vendor-bin/owncloud-codestyle/vendor
|
test-php-style-fix: vendor-bin/opencloud-codestyle/vendor
|
||||||
$(PHP_CS_FIXER) fix -v --diff --allow-risky yes
|
$(PHP_CS_FIXER) fix -v --diff --allow-risky yes
|
||||||
$(PHP_CODEBEAUTIFIER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance
|
$(PHP_CODEBEAUTIFIER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance
|
||||||
|
|
||||||
.PHONY: vendor-bin-codestyle
|
.PHONY: vendor-bin-codestyle
|
||||||
vendor-bin-codestyle: vendor-bin/owncloud-codestyle/vendor
|
vendor-bin-codestyle: vendor-bin/opencloud-codestyle/vendor
|
||||||
|
|
||||||
.PHONY: vendor-bin-codesniffer
|
.PHONY: vendor-bin-codesniffer
|
||||||
vendor-bin-codesniffer: vendor-bin/php_codesniffer/vendor
|
vendor-bin-codesniffer: vendor-bin/php_codesniffer/vendor
|
||||||
|
|
||||||
vendor-bin/owncloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/owncloud-codestyle/composer.lock
|
vendor-bin/opencloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/opencloud-codestyle/composer.lock
|
||||||
composer bin owncloud-codestyle install --no-progress
|
composer bin opencloud-codestyle install --no-progress
|
||||||
|
|
||||||
vendor-bin/owncloud-codestyle/composer.lock: vendor-bin/owncloud-codestyle/composer.json
|
vendor-bin/opencloud-codestyle/composer.lock: vendor-bin/opencloud-codestyle/composer.json
|
||||||
@echo owncloud-codestyle composer.lock is not up to date.
|
@echo opencloud-codestyle composer.lock is not up to date.
|
||||||
|
|
||||||
vendor-bin/php_codesniffer/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/php_codesniffer/composer.lock
|
vendor-bin/php_codesniffer/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/php_codesniffer/composer.lock
|
||||||
composer bin php_codesniffer install --no-progress
|
composer bin php_codesniffer install --no-progress
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
SHELL := bash
|
SHELL := bash
|
||||||
NAME := ocis
|
NAME := opencloud
|
||||||
|
|
||||||
TAGS := disable_crypt
|
TAGS := disable_crypt
|
||||||
|
|
||||||
@@ -33,13 +33,13 @@ docs-generate: config-docs-generate
|
|||||||
.PHONY: dev-docker
|
.PHONY: dev-docker
|
||||||
dev-docker:
|
dev-docker:
|
||||||
$(MAKE) --no-print-directory release-linux-docker-$(GOARCH)
|
$(MAKE) --no-print-directory release-linux-docker-$(GOARCH)
|
||||||
docker build -f docker/Dockerfile.linux.$(GOARCH) -t owncloud/ocis:dev .
|
docker build -f docker/Dockerfile.linux.$(GOARCH) -t opencloud-eu/opencloud:dev .
|
||||||
|
|
||||||
############ debug-docker ############
|
############ debug-docker ############
|
||||||
.PHONY: debug-docker
|
.PHONY: debug-docker
|
||||||
debug-docker:
|
debug-docker:
|
||||||
$(MAKE) --no-print-directory debug-linux-docker-$(GOARCH)
|
$(MAKE) --no-print-directory debug-linux-docker-$(GOARCH)
|
||||||
docker build -f docker/Dockerfile.linux.debug.$(GOARCH) -t owncloud/ocis:debug .
|
docker build -f docker/Dockerfile.linux.debug.$(GOARCH) -t opencloud-eu/opencloud:debug .
|
||||||
|
|
||||||
############ generate ############
|
############ generate ############
|
||||||
include ../.make/generate.mk
|
include ../.make/generate.mk
|
||||||
@@ -48,7 +48,7 @@ include ../.make/generate.mk
|
|||||||
ci-go-generate: # CI runs ci-node-generate automatically before this target
|
ci-go-generate: # CI runs ci-node-generate automatically before this target
|
||||||
|
|
||||||
.PHONY: ci-node-generate
|
.PHONY: ci-node-generate
|
||||||
ci-node-generate: # ocis needs assets of all other modules
|
ci-node-generate: # opencloud needs assets of all other modules
|
||||||
@if [ $(MAKE_DEPTH) -le 1 ]; then \
|
@if [ $(MAKE_DEPTH) -le 1 ]; then \
|
||||||
$(MAKE) --no-print-directory -C .. ci-node-generate \
|
$(MAKE) --no-print-directory -C .. ci-node-generate \
|
||||||
; fi;
|
; fi;
|
||||||
|
|||||||
Reference in New Issue
Block a user