1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dendrite_ynh.git synced 2024-09-03 18:25:58 +02:00

Better build

This commit is contained in:
yalh76 2022-03-19 15:52:07 +01:00
parent d6bdad1c90
commit f6f45487d0
4 changed files with 13 additions and 9 deletions

View file

@ -75,7 +75,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped Dendrite Matrix homeserver" --log_path="systemd"
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
@ -124,7 +124,7 @@ ynh_add_systemd_config
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -126,8 +126,10 @@ ynh_install_go --go_version=$GO_VERSION
pushd "$final_path/build" pushd "$final_path/build"
# Build the sources # Build the sources
ynh_use_go ynh_use_go
CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/... CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/dendrite-monolith-server
CGO_ENABLED=0 GOOS=js GOARCH=wasm go build -trimpath -o "$final_path/bin/main.wasm" ./cmd/dendritejs-pinecone CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/goose
CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/create-account
CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/generate-keys
popd popd
ynh_secure_remove --file="$final_path/build" ynh_secure_remove --file="$final_path/build"
@ -200,7 +202,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -121,7 +121,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -118,8 +118,10 @@ then
pushd "$final_path/build" pushd "$final_path/build"
# Build the sources # Build the sources
ynh_use_go ynh_use_go
CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/... CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/dendrite-monolith-server
CGO_ENABLED=0 GOOS=js GOARCH=wasm go build -trimpath -o "$final_path/bin/main.wasm" ./cmd/dendritejs-pinecone CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/goose
CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/create-account
CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/generate-keys
popd popd
ynh_secure_remove --file="$final_path/build" ynh_secure_remove --file="$final_path/build"
@ -171,7 +173,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX