From 75d4e32b380bdab1af384081f130e5bbf66e3263 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 7 Sep 2024 13:08:40 +0200 Subject: [PATCH] init lib --- commit_and_tag.sh | 18 ++++++++++++++++++ go.mod | 3 +++ helloworld.go | 5 +++++ 3 files changed, 26 insertions(+) create mode 100755 commit_and_tag.sh create mode 100644 go.mod create mode 100644 helloworld.go diff --git a/commit_and_tag.sh b/commit_and_tag.sh new file mode 100755 index 0000000..d0c4243 --- /dev/null +++ b/commit_and_tag.sh @@ -0,0 +1,18 @@ +git add * + +read -p "Commit message: " commit_message + +git commit -m "$commit_message" + +current_tag=$(git describe --abbrev=0 --tags) +IFS='.' read -ra tag_parts <<< "$current_tag" +major="${tag_parts[0]}" +minor="${tag_parts[1]}" +patch="${tag_parts[2]}" +patch=$((patch + 1)) +new_tag="$major.$minor.$patch" + +git tag "$new_tag" + +git push -u origin main +git push --tags \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ae02b19 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.ex.umbach.dev/LMS/libcore + +go 1.21.0 diff --git a/helloworld.go b/helloworld.go new file mode 100644 index 0000000..3475761 --- /dev/null +++ b/helloworld.go @@ -0,0 +1,5 @@ +package libcore + +func HelloWorld() string { + return "Hello, World!" +}