template
This commit is contained in:
54
multitenancy/Makefile_20210928150812.mta
Normal file
54
multitenancy/Makefile_20210928150812.mta
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Generated with Cloud MTA Build Tool version 1.2.3
|
||||||
|
version=0.0.1
|
||||||
|
MBT=C:/Users/d025985/AppData/Roaming/npm/node_modules/mbt/unpacked_bin/mbt.exe
|
||||||
|
ifndef p
|
||||||
|
$(error platform flag is expected. e.g. use make -f makefile.mta p=cf)
|
||||||
|
endif
|
||||||
|
target_provided=true
|
||||||
|
ifndef t
|
||||||
|
t="$(CURDIR)"
|
||||||
|
target_provided=false
|
||||||
|
endif
|
||||||
|
ifndef strict
|
||||||
|
strict=true
|
||||||
|
endif
|
||||||
|
ifndef mtar
|
||||||
|
mtar="*"
|
||||||
|
endif
|
||||||
|
modules := $(shell $(MBT) provide modules -d=dev)
|
||||||
|
modules := $(subst ],,$(subst [,,$(modules)))
|
||||||
|
# List of all the recipes to be executed during the build process
|
||||||
|
.PHONY: all pre_validate pre_build validate $(modules) post_build meta mtar cleanup
|
||||||
|
# Default target compile all
|
||||||
|
all: pre_validate pre_build validate $(modules) post_build meta mtar cleanup
|
||||||
|
# Validate mta.yaml
|
||||||
|
pre_validate:
|
||||||
|
@$(MBT) validate -r=${strict} -x="paths"
|
||||||
|
pre_build: pre_validate
|
||||||
|
@$(MBT) project build -p=pre
|
||||||
|
|
||||||
|
|
||||||
|
# Execute module build
|
||||||
|
define build_rule
|
||||||
|
$(1): validate
|
||||||
|
@$(MBT) module build -m=$(1) -p=${p} -t=${t}
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach mod,$(modules),$(eval $(call build_rule,$(mod))))# Create META-INF folder with MANIFEST.MF & mtad.yaml
|
||||||
|
meta: $(modules) post_build
|
||||||
|
@$(MBT) gen meta -p=${p} -t=${t}
|
||||||
|
|
||||||
|
post_build: $(modules)
|
||||||
|
@$(MBT) project build -p=post -t=${t}
|
||||||
|
|
||||||
|
# Validate mta.yaml
|
||||||
|
validate: pre_build
|
||||||
|
@$(MBT) validate -r=${strict}
|
||||||
|
|
||||||
|
# Pack as MTAR artifact
|
||||||
|
mtar: $(modules) meta
|
||||||
|
@$(MBT) gen mtar --mtar=${mtar} --target_provided=${target_provided} -t=${t}
|
||||||
|
|
||||||
|
cleanup: mtar
|
||||||
|
# Remove tmp folder
|
||||||
|
@$(MBT) clean -t=${t}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using { sap.capire.orders as my } from '../db/schema';
|
using { sap.capire.orders as my } from '../db/schema';
|
||||||
|
|
||||||
service OrdersService {
|
service OrdersService
|
||||||
|
@(requires:['authenticated-user', 'system-user'])
|
||||||
|
{
|
||||||
entity Orders as projection on my.Orders;
|
entity Orders as projection on my.Orders;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
using from '_base/app/services';
|
using from '_base/app/services';
|
||||||
using OrdersService from './extension_service';
|
using OrdersService from './extension_service';
|
||||||
|
|
||||||
|
|
||||||
// new entity -- draft enabled
|
// new entity -- draft enabled
|
||||||
annotate OrdersService.Z_Customers with @odata.draft.enabled;
|
annotate OrdersService.Z_Customers with @odata.draft.enabled;
|
||||||
// new codelist entity -- draft enabled
|
|
||||||
annotate OrdersService.Z_SalesRegion with @odata.draft.enabled;
|
|
||||||
|
|
||||||
// new entity -- titles
|
// new entity -- titles
|
||||||
annotate OrdersService.Z_Customers with {
|
annotate OrdersService.Z_Customers with {
|
||||||
|
|||||||
Reference in New Issue
Block a user