From 758306bc832aab44bd740eebc0d79e199cafc92f Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Wed, 29 Jun 2022 18:36:22 +0200
Subject: [PATCH] chore: commit save point

---
 Makefile                                    |  1 +
 README.md                                   | 26 +++++++-------
 application/source/config_test.go           |  8 -----
 deployment/docker/Dockerfile                | 38 ---------------------
 development/makefiles/license-agpl3.mk      |  3 +-
 development/makefiles/placeholder.mk        |  2 +-
 development/makefiles/s3.mk                 | 15 ++++++++
 development/makefiles/target-build-go.mk    | 10 +++---
 development/makefiles/target-deploy-tool.mk |  9 +++--
 release.json                                |  2 +-
 10 files changed, 42 insertions(+), 72 deletions(-)
 delete mode 100644 application/source/config_test.go
 delete mode 100644 deployment/docker/Dockerfile
 create mode 100644 development/makefiles/s3.mk

diff --git a/Makefile b/Makefile
index 6a17be9..2d00cc1 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,7 @@ include $(MAKEFILE_IMPORT_PATH)license-agpl3.mk
 include $(MAKEFILE_IMPORT_PATH)placeholder.mk
 include $(MAKEFILE_IMPORT_PATH)directories-standard.mk
 include $(MAKEFILE_IMPORT_PATH)go.mk
+include $(MAKEFILE_IMPORT_PATH)s3.mk
 include $(MAKEFILE_IMPORT_PATH)color.mk
 include $(MAKEFILE_IMPORT_PATH)terminal.mk
 include $(MAKEFILE_IMPORT_PATH)output.mk
diff --git a/README.md b/README.md
index ea1d7b7..d6fcd2b 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ There is help on the command line for each individual command.
 reqman --help
 ```
 
-### New Requiremants
+### New Requirements
 
 A new request can be created with the following command.
 
@@ -51,13 +51,13 @@ A new request can be created with the following command.
 reqman requirements add --id 1425
 ```
 
-A completely new file with a structure is created. The `--id 1425` is both the file name and the ID of the request.
+An entirely new file with a structure is created. The `--id 1425` is both the file name and the ID of the request.
 
 All available fields are listed in the new file.
 
 ### Output a PDF
 
-A pdf can be created using the following command:
+A PDF can be created using the following command:
 
 ```bash
 reqman overview \
@@ -71,16 +71,16 @@ reqman overview \
        --format=pdf
 ```
 
-In this case the markdown files in the path `requirement/documents` are read.
+In this case, the markdown files in the path `requirement/documents` are read.
 
 A table with all requirements is created in the file and the two columns
 `ID` and `Title` are used. Additional columns can be added using additional options `--column`.
 
 File `template/schukai.md` is used as a template.
 
-The LaTeX template `requirement/template/schukai.latex` is used for the design of the pdf.
+The LaTeX template `requirement/template/schukai.latex` is used for the design of the PDF.
 
-The output format is PDF and the filename of the pdf document is `report.pdf`.
+The output format is PDF and the filename of the PDF document is `report.pdf`.
 
 You can use a complete directory or a subdirectory as the path.
 
@@ -202,18 +202,18 @@ However, we needed 6 hours for 2 requirements.
 The variance, or standard deviation, gives us a measure of how accurate we are.
 The smaller the standard deviation, the better.
 
-So what decision can we derive? If a new requirement is estimated at
+So, what decision can we derive? If a new requirement is estimated at
 40, the hours offered should be between 3 and 5.
 
-### Sync with Gitlab
+### Sync with GitLab
 
-You can synchronize the issues of a document with a Gitlab server. 
+You can synchronize the issues of a document with a GitLab server.
 
 ```bash 
 reqman gitlab sync --path=example/ 
 ```
 
-If no ID is defined in the document, an issue is created, 
+If no ID is defined in the document, an issue is created,
 
 ```yaml
 issues:
@@ -221,7 +221,7 @@ issues:
         title: "Issue 1"
 ```
 
-otherwise the data is updated.
+otherwise, the data is updated.
 
 ```yaml
 issues:
@@ -253,7 +253,7 @@ For example, the following statement can be used to include the items within the
 {{ end }}
 ```
 
-If the PDF function is used, LaTeX commands can also be included in the text. For example, the LaTex instruction `
+If the PDF function is used, LaTeX commands can also be included in the text. For example, the LaTeX instruction `
 /newline' leads to a line break.
 
 ## YAML
@@ -292,4 +292,4 @@ Individual LaTeX commands can be looked up here:
 ## Change Log
 
 - Version 1.0.25 (20220622174620)
-    - Added support for `gitlab sync` command
+    - Added support for `gitlab sync` command
\ No newline at end of file
diff --git a/application/source/config_test.go b/application/source/config_test.go
deleted file mode 100644
index 3a1c101..0000000
--- a/application/source/config_test.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package main
-
-//func TestNewConfiguration(t *testing.T) {
-//	command, _, _ := NewConfiguration()
-//	if command.Name == "test" {
-//		t.Errorf("Command name was incorrect, got: %s, want: %d.", command.Name, 10)
-//	}
-//}
diff --git a/deployment/docker/Dockerfile b/deployment/docker/Dockerfile
deleted file mode 100644
index 2c32321..0000000
--- a/deployment/docker/Dockerfile
+++ /dev/null
@@ -1,38 +0,0 @@
-FROM golang:1.8
-
-# Set necessary environmet variables needed for our image
-ENV GO111MODULE=on \
-    CGO_ENABLED=0 \
-    GOOS=linux \
-    GOARCH=amd64 \
-    GOPRIVATE="gitlab.schukai.com" \
-    GONOPROXY="gitlab.schukai.com" \
-    GIT_TERMINAL_PROMPT=1
-
-# Move to working directory /build
-WORKDIR /build
-
-#RUN go get -u github.com/gobuffalo/packr/packr && \
-#    go get -u github.com/gobuffalo/packr
-#
-COPY ./source ./source
-#COPY ./web ./web
-#COPY ./resource ./resource
-
-WORKDIR /build/source
-
-# Build the application
-# production or empty
-ARG app_mode
-ENV APP_MODE $app_mode
-
-ARG app_version=snapshot
-ENV APP_VERSION $app_version
-
-# -ldflags "-X main.version ... setzt die Variablen in dem Dockerfile
-RUN --mount=type=cache,target=/root/.cache/go-build \
-   GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
-   go get -v -d ./...  && go install -v ./... && \
-   packr -v build \
-   -ldflags "-X main.version=$app_version -X main.build=$(date --iso-8601 | tr -d "-" )" \
-   -o /build/juno && packr clean
\ No newline at end of file
diff --git a/development/makefiles/license-agpl3.mk b/development/makefiles/license-agpl3.mk
index 0d973a3..ebb06a7 100644
--- a/development/makefiles/license-agpl3.mk
+++ b/development/makefiles/license-agpl3.mk
@@ -6,7 +6,8 @@
 #############################################################################################
 #############################################################################################
 
-## asdfasd
+## License used in the project
 LICENSE_TEXT    ?= AGPL 3.0
 
+## Copyright holder of the project
 COPYRIGHT_TEXT  ?= © schukai GmbH, Released under the $(LICENSE_TEXT) License.
\ No newline at end of file
diff --git a/development/makefiles/placeholder.mk b/development/makefiles/placeholder.mk
index d73fb40..c99024c 100644
--- a/development/makefiles/placeholder.mk
+++ b/development/makefiles/placeholder.mk
@@ -6,4 +6,4 @@
 #############################################################################################
 #############################################################################################
 
-COMPONENTSLUG := $(shell echo "$(COMPONENTNAME)" | tr '[:upper:]' '[:lower:]')
\ No newline at end of file
+COMPONENT_SLUG := $(shell echo "$(COMPONENT_NAME)" | tr '[:upper:]' '[:lower:]')
\ No newline at end of file
diff --git a/development/makefiles/s3.mk b/development/makefiles/s3.mk
new file mode 100644
index 0000000..c4522aa
--- /dev/null
+++ b/development/makefiles/s3.mk
@@ -0,0 +1,15 @@
+#############################################################################################
+#############################################################################################
+##
+## AMAZON S3
+##
+#############################################################################################
+#############################################################################################
+
+# path and binaries
+
+
+
+AWS ?= aws
+AWS_PROFILE ?= schukai
+EXECUTABLES = $(EXECUTABLES:-) $(AWS) 
\ No newline at end of file
diff --git a/development/makefiles/target-build-go.mk b/development/makefiles/target-build-go.mk
index ac1a419..c69de2f 100644
--- a/development/makefiles/target-build-go.mk
+++ b/development/makefiles/target-build-go.mk
@@ -14,9 +14,9 @@ compile: next-patch-version
 	$(QUIET) $(ECHO) "Build: $(PROJECT_BUILD_DATE)"
  
 	$(QUIET) cd  $(SOURCE_PATH) ; \
-			 GO111MODULE=on GOOS=linux GOARCH=arm $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENTSLUG)-linux-arm ; \
-			 GOOS=linux GOARCH=amd64 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENTSLUG)-linux-amd64 ; \
-			 GOOS=linux GOARCH=arm64 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENTSLUG)-linux-arm64 ; \
-			 GOOS=linux GOARCH=386 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENTSLUG)-linux-386 ; \
-	         GOOS=windows GOARCH=amd64 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENTSLUG)-windows ; \
+			 GO111MODULE=on GOOS=linux GOARCH=arm $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-arm ; \
+			 GOOS=linux GOARCH=amd64 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-amd64 ; \
+			 GOOS=linux GOARCH=arm64 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-arm64 ; \
+			 GOOS=linux GOARCH=386 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-386 ; \
+	         GOOS=windows GOARCH=amd64 $(GO) build -ldflags "-X main.version=$(PROJECT_VERSION) -X main.build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-windows ; \
  			cd $(PROJECT_ROOT); 
diff --git a/development/makefiles/target-deploy-tool.mk b/development/makefiles/target-deploy-tool.mk
index 186ca98..bb18b06 100644
--- a/development/makefiles/target-deploy-tool.mk
+++ b/development/makefiles/target-deploy-tool.mk
@@ -7,15 +7,14 @@
 #############################################################################################
 
 
-EXECUTABLES = $(EXECUTABLES:-) $(AWS) 
-UPLOAD_TOOL_URL ?= s3://download.schukai.com/tools/$(COMPONENTSLUG)/
+UPLOAD_TOOL_URL ?= s3://download.schukai.com/tools/$(COMPONENT_SLUG)/
 
 .PHONY: deploy
-## compile and deplay to aws
+## compile and deploy to S3
 deploy: compile
-	$(QUIET) AWS_PROFILE=schukai find $(BUILD_PATH) -iname $(COMPONENTSLUG)-* -exec $(AWS) s3 cp {} $(UPLOAD_TOOL_URL) \;
+	$(QUIET) AWS_PROFILE=$(AWS_PROFILE) find $(BUILD_PATH) -iname $(COMPONENT_SLUG)-* -exec $(AWS) s3 cp {} $(UPLOAD_TOOL_URL) \;
 
 .PHONY: overview-to-s3
 ## overview-to-s3
 overview-to-s3:
-	$(QUIET) AWS_PROFILE=schukai $(AWS) s3 cp $(WEB_PATH)/index.html $(UPLOAD_TOOL_URL)
\ No newline at end of file
+	$(QUIET) AWS_PROFILE=$(AWS_PROFILE) $(AWS) s3 cp $(WEB_PATH)/index.html $(UPLOAD_TOOL_URL)
\ No newline at end of file
diff --git a/release.json b/release.json
index d806725..f6287d8 100644
--- a/release.json
+++ b/release.json
@@ -1,3 +1,3 @@
 {
-  "version": "1.0.30"
+  "version": "1.0.34"
 }
\ No newline at end of file
-- 
GitLab