Skip to content

Commit

Permalink
Build scripts updated for Go modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed May 1, 2024
1 parent 8f53af2 commit e470c92
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions compile-docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ services:
apk add --no-cache git &&
go env -w GO111MODULE=auto &&
cd /go/src/calculations/ &&
go get ./... &&
go mod tidy &&
go build &&
cp calculations /publish_bin/"
volumes:
Expand All @@ -72,7 +72,7 @@ services:
apk add --no-cache git &&
go env -w GO111MODULE=auto &&
cd /go/src/i104m/ &&
go get ./... &&
go mod tidy &&
go build &&
cp i104m /publish_bin/"
volumes:
Expand Down
6 changes: 3 additions & 3 deletions platform-linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ export GOBIN=~/json-scada/bin
go env -w GO111MODULE=auto

cd ../calculations
go get ./...
go go mod tidy
go build
cp calculations ../../bin/

# cd ../plc4x-client
# go get "github.com/icza/bitio"
# go get ./...
# go mod tidy
# go build
# cp plc4x-client ../../bin/

cd ../i104m
go get ./...
go mod tidy
go build
cp i104m ../../bin/

Expand Down
4 changes: 2 additions & 2 deletions platform-mac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export GOBIN=~/json-scada/bin
go env -w GO111MODULE=auto

cd ../calculations
go get ./...
go mod tidy
go build
cp calculations ../../bin/

cd ../i104m
go get ./...
go mod tidy
go build
cp i104m ../../bin/

Expand Down
6 changes: 3 additions & 3 deletions platform-windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ dotnet publish --no-self-contained --runtime win-x64 -p:PublishReadyToRun=true -
go env -w GO111MODULE=auto
set GOBIN=c:\json-scada\bin
cd %SRCPATH%\calculations
go get ./...
go mod tidy
go build
copy /Y calculations %BINPATH%

rem cd %SRCPATH%\plc4x-client
rem go get "github.com/icza/bitio"
rem go get ./...
rem go mod tidy
rem go build
rem copy /Y plc4x-client.exe %BINPATH%

cd %SRCPATH%\i104m
go get ./...
go mod tidy
go build
copy /Y i104m.exe %BINPATH%

Expand Down
6 changes: 3 additions & 3 deletions platform-windows/buildupd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ dotnet publish --no-self-contained --runtime win-x64 -p:PublishReadyToRun=true -
go env -w GO111MODULE=auto
set GOBIN=c:\json-scada\bin
cd %SRCPATH%\calculations
go get ./...
go mod tidy
go build
copy /Y calculations %BINPATH%

rem cd %SRCPATH%\plc4x-client
rem go get "github.com/icza/bitio"
rem go get ./...
rem go mod tidy
rem go build
rem copy /Y plc4x-client.exe %BINPATH%

cd %SRCPATH%\i104m
go get ./...
go mod tidy
go build
copy /Y i104m.exe %BINPATH%

Expand Down
2 changes: 1 addition & 1 deletion platform-windows/create_services.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ nssm set JSON_SCADA_postgresql Start SERVICE_AUTO_START

nssm install JSON_SCADA_grafana "C:\json-scada\platform-windows\grafana-runtime\bin\grafana-server.exe"
nssm set JSON_SCADA_grafana AppDirectory "C:\json-scada\platform-windows\grafana-runtime\bin"
nssm set JSON_SCADA_grafana AppEnvironmentExtra GF_SERVER_DOMAIN="127.0.0.1" GF_SERVER_ROOT_URL="%(protocol)s://%(domain)s:80/grafana/" GF_SERVER_SERVE_FROM_SUB_PATH="true" GF_AUTH_PROXY_ENABLED="true" GF_AUTH_PROXY_ENABLE_LOGIN_TOKEN="true" GF_AUTH_DISABLE_SIGNOUT_MENU="true" GF_AUTH_PROXY_WHITELIST="127.0.0.1" GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION="true" GF_SERVER_HTTP_ADDR="127.0.0.1" GF_SERVER_ENFORCE_DOMAIN="true" GF_SERVER_ENABLE_GZIP="true" GF_ANALYTICS_REPORTING_ENABLED="false" GF_ANALYTICS_CHECK_FOR_UPDATES="false"
nssm set JSON_SCADA_grafana AppEnvironmentExtra GF_SERVER_DOMAIN="127.0.0.1" GF_SERVER_ROOT_URL="%(protocol)s://%(domain)s:80/grafana/" GF_SERVER_SERVE_FROM_SUB_PATH="true" GF_AUTH_PROXY_ENABLED="true" GF_AUTH_PROXY_ENABLE_LOGIN_TOKEN="true" GF_AUTH_DISABLE_SIGNOUT_MENU="true" GF_AUTH_PROXY_WHITELIST="127.0.0.1" GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION="true" GF_SERVER_HTTP_ADDR="127.0.0.1" GF_SERVER_ENFORCE_DOMAIN="true" GF_SERVER_ENABLE_GZIP="true" GF_ANALYTICS_REPORTING_ENABLED="false" GF_ANALYTICS_CHECK_FOR_UPDATES="false" GF_SECURITY_ALLOW_EMBEDDING="true"
rem example of using postgresql to host grafana config (necessary for multiple web servers):
rem nssm set JSON_SCADA_grafana AppEnvironmentExtra GF_DATABASE_TYPE="postgres" GF_DATABASE_HOST="127.0.0.1" GF_DATABASE_USER="postgres" GF_DATABASE_PASSWORD="pwd"
REM nssm set JSON_SCADA_grafana AppStdout "C:\json-scada\log\grafana-stdout.log"
Expand Down

0 comments on commit e470c92

Please sign in to comment.