mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
fix templates; fix go.work for plugin-api
This commit is contained in:
1
server/.gitignore
vendored
1
server/.gitignore
vendored
@@ -18,7 +18,6 @@ web/static/js/bundle*.js.map
|
||||
web/static/js/libs*.js
|
||||
|
||||
channels/config/active.dat
|
||||
channels/config/config.json
|
||||
channels/config/logging.json
|
||||
/plugins
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ ifeq ($(BUILD_NUMBER),dev)
|
||||
export MM_FEATUREFLAGS_GRAPHQL = true
|
||||
endif
|
||||
|
||||
# plugin-api remove this once mono-repo is complete and mattermost-plugin-api changes are merged
|
||||
USE_LOCAL_PLUGIN_API = true
|
||||
|
||||
# Enterprise
|
||||
BUILD_ENTERPRISE_DIR ?= ../../enterprise
|
||||
BUILD_ENTERPRISE ?= true
|
||||
@@ -414,6 +417,7 @@ endif
|
||||
|
||||
setup-go-work: export BUILD_ENTERPRISE_READY := $(BUILD_ENTERPRISE_READY)
|
||||
setup-go-work: export BUILD_PLAYBOOKS := $(BUILD_PLAYBOOKS)
|
||||
setup-go-work: export USE_LOCAL_PLUGIN_API := $(USE_LOCAL_PLUGIN_API)
|
||||
setup-go-work: ## Sets up your go.work file
|
||||
./scripts/setup_go_work.sh $(IGNORE_GO_WORK_IF_EXISTS)
|
||||
|
||||
@@ -650,24 +654,24 @@ run-job-server: ## Runs the background job server.
|
||||
config-ldap: ## Configures LDAP.
|
||||
@echo Setting up configuration for local LDAP
|
||||
|
||||
@sed -i'' -e 's|"LdapServer": ".*"|"LdapServer": "localhost"|g' config/config.json
|
||||
@sed -i'' -e 's|"BaseDN": ".*"|"BaseDN": "dc=mm,dc=test,dc=com"|g' config/config.json
|
||||
@sed -i'' -e 's|"BindUsername": ".*"|"BindUsername": "cn=admin,dc=mm,dc=test,dc=com"|g' config/config.json
|
||||
@sed -i'' -e 's|"BindPassword": ".*"|"BindPassword": "mostest"|g' config/config.json
|
||||
@sed -i'' -e 's|"FirstNameAttribute": ".*"|"FirstNameAttribute": "cn"|g' config/config.json
|
||||
@sed -i'' -e 's|"LastNameAttribute": ".*"|"LastNameAttribute": "sn"|g' config/config.json
|
||||
@sed -i'' -e 's|"NicknameAttribute": ".*"|"NicknameAttribute": "cn"|g' config/config.json
|
||||
@sed -i'' -e 's|"EmailAttribute": ".*"|"EmailAttribute": "mail"|g' config/config.json
|
||||
@sed -i'' -e 's|"UsernameAttribute": ".*"|"UsernameAttribute": "uid"|g' config/config.json
|
||||
@sed -i'' -e 's|"IdAttribute": ".*"|"IdAttribute": "uid"|g' config/config.json
|
||||
@sed -i'' -e 's|"LoginIdAttribute": ".*"|"LoginIdAttribute": "uid"|g' config/config.json
|
||||
@sed -i'' -e 's|"GroupDisplayNameAttribute": ".*"|"GroupDisplayNameAttribute": "cn"|g' config/config.json
|
||||
@sed -i'' -e 's|"GroupIdAttribute": ".*"|"GroupIdAttribute": "entryUUID"|g' config/config.json
|
||||
@sed -i'' -e 's|"LdapServer": ".*"|"LdapServer": "localhost"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"BaseDN": ".*"|"BaseDN": "dc=mm,dc=test,dc=com"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"BindUsername": ".*"|"BindUsername": "cn=admin,dc=mm,dc=test,dc=com"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"BindPassword": ".*"|"BindPassword": "mostest"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"FirstNameAttribute": ".*"|"FirstNameAttribute": "cn"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"LastNameAttribute": ".*"|"LastNameAttribute": "sn"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"NicknameAttribute": ".*"|"NicknameAttribute": "cn"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"EmailAttribute": ".*"|"EmailAttribute": "mail"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"UsernameAttribute": ".*"|"UsernameAttribute": "uid"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"IdAttribute": ".*"|"IdAttribute": "uid"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"LoginIdAttribute": ".*"|"LoginIdAttribute": "uid"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"GroupDisplayNameAttribute": ".*"|"GroupDisplayNameAttribute": "cn"|g' channels/config/config.json
|
||||
@sed -i'' -e 's|"GroupIdAttribute": ".*"|"GroupIdAttribute": "entryUUID"|g' channels/config/config.json
|
||||
|
||||
config-reset: ## Resets the config/config.json file to the default.
|
||||
config-reset: ## Resets the channels/config/config.json file to the default.
|
||||
@echo Resetting configuration to default
|
||||
rm -f config/config.json
|
||||
OUTPUT_CONFIG=$(PWD)/config/config.json $(GO) $(GOFLAGS) run ./scripts/config_generator
|
||||
rm -f channels/config/config.json
|
||||
OUTPUT_CONFIG=$(PWD)/channels/config/config.json $(GO) $(GOFLAGS) run ./scripts/config_generator
|
||||
|
||||
diff-config: ## Compares default configuration between two mattermost versions
|
||||
@./scripts/diff-config.sh
|
||||
|
||||
@@ -64,6 +64,12 @@ func resolveConfigFilePath(path string) (string, error) {
|
||||
return path, nil
|
||||
}
|
||||
|
||||
// Search for the relative path to the file in the channels/config folder, taking into account
|
||||
// various common starting points.
|
||||
if configFile := fileutils.FindFile(filepath.Join("channels/config", path)); configFile != "" {
|
||||
return configFile, nil
|
||||
}
|
||||
|
||||
// Search for the relative path to the file in the config folder, taking into account
|
||||
// various common starting points.
|
||||
if configFile := fileutils.FindFile(filepath.Join("config", path)); configFile != "" {
|
||||
|
||||
@@ -16,5 +16,10 @@ then
|
||||
txt="${txt}use ../../mattermost-plugin-playbooks\n"
|
||||
fi
|
||||
|
||||
if [ "$USE_LOCAL_PLUGIN_API" == "true" ]
|
||||
then
|
||||
txt="${txt}use ../../mattermost-plugin-api\n"
|
||||
fi
|
||||
|
||||
printf "$txt" > "go.work"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user