From cd6ecdde717747f2c9a3b25ad1a5c855b8357413 Mon Sep 17 00:00:00 2001 From: Owen Waller Date: Fri, 23 Feb 2024 22:19:30 +0000 Subject: [PATCH] Build the emailformgateway http server Add the cmd package and the main function. Update the workflow to build and copy the emailformgateway http server to the remote server. --- .github/workflows/emailformgateway.yaml | 5 ++++- main.go => cmd/main.go | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) rename main.go => cmd/main.go (67%) diff --git a/.github/workflows/emailformgateway.yaml b/.github/workflows/emailformgateway.yaml index 8a97fd6..920178b 100644 --- a/.github/workflows/emailformgateway.yaml +++ b/.github/workflows/emailformgateway.yaml @@ -26,6 +26,9 @@ jobs: - name: Build server test run: CGO_ENABLED=0 go test -c -o ./server.test -run=SendEmail github.com/owenwaller/emailformgateway/server + - nane: Build emailformgateway server + run: go build -o ./emailformgateway ./cmd/main.go + - name: Listing run: 'ls -al' @@ -66,7 +69,7 @@ jobs: - name: Copy files to server run: | - scp ./test_envs.sh ./emailer.test ./server.test ./*.template ./gophercoders-config.toml $TEST_CONFIG_FILE.toml gophercoders.com: + scp ./emailformgateway ./test_envs.sh ./emailer.test ./server.test ./*.template ./gophercoders-config.toml $TEST_CONFIG_FILE.toml gophercoders.com: env: TEST_CONFIG_FILE: ${{ secrets.TEST_CONFIG_FILE }} diff --git a/main.go b/cmd/main.go similarity index 67% rename from main.go rename to cmd/main.go index f158037..dd4cd35 100644 --- a/main.go +++ b/cmd/main.go @@ -1,3 +1,5 @@ +// Copyright (c) 2024 Owen Waller. All rights reserved. + package main import (