mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-02 04:08:54 +08:00
fix: add make ci
This commit is contained in:
parent
ed68f25b87
commit
789eb667e8
14
Makefile
14
Makefile
@ -11,6 +11,17 @@ ifeq ($(OS),Windows_NT)
|
||||
endif
|
||||
|
||||
GET_DASHBOARD=$(SCRIPTS)/get-dashboard.sh
|
||||
LENGTH=$#
|
||||
|
||||
ifeq ($#,1)
|
||||
ifeq ($1, ci)
|
||||
GET_DASHBOARD=$(SCRIPTS)/pre-ci.sh
|
||||
else
|
||||
GET_DASHBOARD=$(SCRIPTS)/get-dashboard.sh
|
||||
endif
|
||||
else
|
||||
GET_DASHBOARD=$(SCRIPTS)/get-dashboard.sh
|
||||
endif
|
||||
|
||||
PROFILE ?= emqx
|
||||
REL_PROFILES := emqx emqx-edge
|
||||
@ -159,6 +170,9 @@ $(foreach pt,$(PKG_PROFILES),$(eval $(call gen-pkg-target,$(pt))))
|
||||
.PHONY: run
|
||||
run: $(PROFILE) quickrun
|
||||
|
||||
.PHONY: ci
|
||||
ci: $(REBAR) $(PROFILE)
|
||||
|
||||
.PHONY: quickrun
|
||||
quickrun:
|
||||
@$(QUIKRUN)
|
||||
|
@ -167,5 +167,6 @@
|
||||
<mapping directory="$PROJECT_DIR$/apps/emqx_stomp" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/apps/emqx_web_hook" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/dgiot-dashboard" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/dist" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -694,6 +694,7 @@ function install_go_fastdfs() {
|
||||
if [ ! -f ${script_dir}/dgiot_swagger.tar.gz ]; then
|
||||
wget ${fileserver}/dgiot_swagger.tar.gz -O ${script_dir}/dgiot_swagger.tar.gz &> /dev/null
|
||||
fi
|
||||
|
||||
if [ -d ${script_dir}/dgiot_swagger/ ]; then
|
||||
rm ${script_dir}/dgiot_swagger/ -rf
|
||||
fi
|
||||
|
@ -10,8 +10,6 @@ EMQX_DASHBOARD_PATH='lib-ce/emqx_dashboard/priv'
|
||||
DGIOT_DASHBOARD_PATH='apps/dgiot_api/priv'
|
||||
FILESEVER="https://dgiot-release-1306147891.cos.ap-nanjing.myqcloud.com/v4.4.0"
|
||||
|
||||
|
||||
|
||||
get_dashboard(){
|
||||
if [ -d "$EMQX_DASHBOARD_PATH/www" ]; then
|
||||
echo "emqx_dashboard exist"
|
||||
@ -58,9 +56,11 @@ get_dashboard(){
|
||||
|
||||
get_apps() {
|
||||
cd ${EMQX_APP}
|
||||
|
||||
if [ ! -d "emqx_rule_engine/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-rule-engine.git" emqx_rule_engine
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_bridge_mqtt/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-bridge-mqtt.git" emqx_bridge_mqtt
|
||||
fi
|
||||
@ -117,10 +117,6 @@ get_apps() {
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-sasl.git" emqx_sasl
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_sasl/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-sasl.git" emqx_sasl
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_sn/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-sn.git" emqx_sn
|
||||
fi
|
||||
|
99
scripts/pre-ci.sh
Normal file
99
scripts/pre-ci.sh
Normal file
@ -0,0 +1,99 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# ensure dir
|
||||
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
||||
|
||||
EMQX_APP='apps/'
|
||||
EMQX_DASHBOARD_PATH='lib-ce/emqx_dashboard/priv'
|
||||
DGIOT_DASHBOARD_PATH='apps/dgiot_api/priv'
|
||||
FILESEVER="https://dgiot-release-1306147891.cos.ap-nanjing.myqcloud.com/v4.4.0"
|
||||
|
||||
get_dashboard(){
|
||||
if [ -d "$EMQX_DASHBOARD_PATH/www" ]; then
|
||||
echo "emqx_dashboard exist"
|
||||
else
|
||||
wget ${FILESEVER}/www.tar.gz
|
||||
tar xvf www.tar.gz
|
||||
mv www "$EMQX_DASHBOARD_PATH/"
|
||||
rm www.tar.gz -rf
|
||||
chmod 777 ./scripts/*
|
||||
fi
|
||||
}
|
||||
|
||||
get_apps() {
|
||||
cd ${EMQX_APP}
|
||||
if [ ! -d "emqx_rule_engine/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-rule-engine.git" emqx_rule_engine
|
||||
fi
|
||||
if [ ! -d "emqx_bridge_mqtt/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-bridge-mqtt.git" emqx_bridge_mqtt
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_coap/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-coap.git" emqx_coap
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_stomp/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-stomp.git" emqx_stomp
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_lwm2m/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-lwm2m.git" emqx_lwm2m
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_exhook/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-exhook.git" emqx_exhook
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_exproto/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-exproto.git" emqx_exproto
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_auth_mnesia/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-auth-mnesia.git" emqx_auth_mnesia
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_lua_hook/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-lua-hook.git" emqx_lua_hook
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_management/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-management.git" emqx_management
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_prometheus/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-prometheus.git" emqx_prometheus
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_psk_file/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-psk-file.git" emqx_psk_file
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_recon/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-recon.git" emqx_recon
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_retainer/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-retainer.git" emqx_retainer
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_sasl/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-sasl.git" emqx_sasl
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_sn/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-sn.git" emqx_sn
|
||||
fi
|
||||
|
||||
if [ ! -d "emqx_web_hook/" ]; then
|
||||
git clone -b "v4.3.10" "https://gitee.com/fastdgiot/emqx-web-hook.git" emqx_web_hook
|
||||
fi
|
||||
|
||||
cd ..
|
||||
}
|
||||
|
||||
echo "ci"
|
||||
get_apps
|
||||
get_dashboard
|
Loading…
Reference in New Issue
Block a user