mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-16 17:45:39 -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)
|
||||
BIN := bin
|
||||
DIST := dist
|
||||
@@ -37,8 +37,8 @@ ifndef DATE
|
||||
DATE := $(shell date -u '+%Y%m%d')
|
||||
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)"
|
||||
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)"
|
||||
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)/pkg/version.String=$(STRING)" -X "$(OC_REPO)/pkg/version.Tag=$(VERSION)" -X "$(OC_REPO)/pkg/version.Date=$(DATE)"
|
||||
|
||||
GCFLAGS += all=-N -l
|
||||
|
||||
|
||||
36
Makefile
36
Makefile
@@ -68,7 +68,7 @@ OC_MODULES = \
|
||||
pkg
|
||||
|
||||
# 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_CODEBEAUTIFIER=vendor-bin/php_codesniffer/vendor/bin/phpcbf
|
||||
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
|
||||
@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 clean-tests\t\t\t${BLUE}delete API tests framework dependencies${RESET}"
|
||||
@echo
|
||||
@@ -93,18 +93,18 @@ help:
|
||||
@echo
|
||||
@echo -e "${RED}You also should have a look at other available Makefiles:${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}oCIS:${RESET}\n"
|
||||
@echo -e "${PURPLE}\tdocs: https://owncloud.dev/ocis/development/build/${RESET}\n"
|
||||
@echo -e "\tsee ./ocis/Makefile"
|
||||
@echo -e "\tor run ${YELLOW}make -C ocis help${RESET}"
|
||||
@echo -e "${GREEN}opencloud:${RESET}\n"
|
||||
@echo -e "${PURPLE}\tdocs: https://opencloud.dev/opencloud/development/build/${RESET}\n"
|
||||
@echo -e "\tsee ./opencloud/Makefile"
|
||||
@echo -e "\tor run ${YELLOW}make -C opencloud help${RESET}"
|
||||
@echo
|
||||
@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 "\tor run ${YELLOW}make -C docs help${RESET}"
|
||||
@echo
|
||||
@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 "\tor run ${YELLOW}make -C tests/acceptance/docker help${RESET}"
|
||||
@echo
|
||||
@@ -257,9 +257,9 @@ ci-node-check-licenses:
|
||||
|
||||
.PHONY: ci-go-save-licenses
|
||||
ci-go-save-licenses: $(GO_LICENSES)
|
||||
@mkdir -p ./third-party-licenses/go/ocis/third-party-licenses
|
||||
$(GO_LICENSES) csv ./... > ./third-party-licenses/go/ocis/third-party-licenses.csv
|
||||
$(GO_LICENSES) save ./... --force --save_path="./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/opencloud/third-party-licenses.csv
|
||||
$(GO_LICENSES) save ./... --force --save_path="./third-party-licenses/go/opencloud/third-party-licenses"
|
||||
|
||||
.PHONY: ci-node-save-licenses
|
||||
ci-node-save-licenses:
|
||||
@@ -321,26 +321,26 @@ ci-format: $(BUILDIFIER)
|
||||
$(BUILDIFIER) --mode=fix .drone.star
|
||||
|
||||
.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_CODESNIFFER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance tests/acceptance/TestHelpers
|
||||
|
||||
.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_CODEBEAUTIFIER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance
|
||||
|
||||
.PHONY: vendor-bin-codestyle
|
||||
vendor-bin-codestyle: vendor-bin/owncloud-codestyle/vendor
|
||||
vendor-bin-codestyle: vendor-bin/opencloud-codestyle/vendor
|
||||
|
||||
.PHONY: vendor-bin-codesniffer
|
||||
vendor-bin-codesniffer: vendor-bin/php_codesniffer/vendor
|
||||
|
||||
vendor-bin/owncloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/owncloud-codestyle/composer.lock
|
||||
composer bin owncloud-codestyle install --no-progress
|
||||
vendor-bin/opencloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/opencloud-codestyle/composer.lock
|
||||
composer bin opencloud-codestyle install --no-progress
|
||||
|
||||
vendor-bin/owncloud-codestyle/composer.lock: vendor-bin/owncloud-codestyle/composer.json
|
||||
@echo owncloud-codestyle composer.lock is not up to date.
|
||||
vendor-bin/opencloud-codestyle/composer.lock: vendor-bin/opencloud-codestyle/composer.json
|
||||
@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
|
||||
composer bin php_codesniffer install --no-progress
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SHELL := bash
|
||||
NAME := ocis
|
||||
NAME := opencloud
|
||||
|
||||
TAGS := disable_crypt
|
||||
|
||||
@@ -33,13 +33,13 @@ docs-generate: config-docs-generate
|
||||
.PHONY: dev-docker
|
||||
dev-docker:
|
||||
$(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 ############
|
||||
.PHONY: debug-docker
|
||||
debug-docker:
|
||||
$(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 ############
|
||||
include ../.make/generate.mk
|
||||
@@ -48,7 +48,7 @@ include ../.make/generate.mk
|
||||
ci-go-generate: # CI runs ci-node-generate automatically before this target
|
||||
|
||||
.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 \
|
||||
$(MAKE) --no-print-directory -C .. ci-node-generate \
|
||||
; fi;
|
||||
|
||||
Reference in New Issue
Block a user