summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-30 13:53:16 -0600
committerJeff Carr <[email protected]>2024-11-30 13:53:16 -0600
commitd2112f954d68fde00a4781c9f2d8ca8bec837055 (patch)
treebdfa5570a4e4b0fff0cdf4c52a6fc6b6529c916d
parentb1172af227f7893d29dbad88a47855a95cec8bcc (diff)
just no. don't put directories in libraries. ever.v0.0.4
-rw-r--r--Makefile7
-rw-r--r--testautogen/Makefile39
-rw-r--r--testautogen/forgeConfig.proto39
-rw-r--r--testautogen/test.proto21
4 files changed, 1 insertions, 105 deletions
diff --git a/Makefile b/Makefile
index e302457..6dcf9d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,7 @@
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
-run: build
-
-test: build
- @# make -C testautogen/ all
- cd testautogen; pwd; ../autogenpb --proto test.proto
+run: build vet
vet:
@GO111MODULE=off go vet
@@ -35,4 +31,3 @@ reset:
clean:
-rm -f go.*
-rm -f autogenpb
- @#make -C testautogen/ clean
diff --git a/testautogen/Makefile b/testautogen/Makefile
deleted file mode 100644
index a2bafb3..0000000
--- a/testautogen/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-VERSION = $(shell git describe --tags)
-BUILDTIME = $(shell date +%Y.%m.%d)
-
-test: vet
-
-all: clean test.pb.go forgeConfig.pb.go run
-
-run:
- ../autogenpb --proto test.proto --lobase gitTag --upbase GitTag --sort "ByPath,Refname" --sort "BySubject,Subject" --marshal GitTags --append Bling
- ../autogenpb --proto forgeConfig.proto --sort "ByPath,GoPath" # --append GoPath
-
-vet:
- @GO111MODULE=off go vet
- @echo this go library package builds okay
-
-goimports:
- goimports -w *.go
-
-redomod:
- rm -f go.*
- GO111MODULE= go mod init
- GO111MODULE= go mod tidy
-
-reset:
- # clear your terminal
- reset
-
-clean:
- -rm -f *.pb.go
-
-test.pb.go: test.proto
- cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/apps/autogenpb/testautogen \
- --go_opt=Mtest.proto=go.wit.com/apps/autogenpb/testautogen \
- test.proto
-
-forgeConfig.pb.go: forgeConfig.proto
- cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/apps/autogenpb/testautogen \
- --go_opt=MforgeConfig.proto=go.wit.com/apps/autogenpb/testautogen \
- forgeConfig.proto
diff --git a/testautogen/forgeConfig.proto b/testautogen/forgeConfig.proto
deleted file mode 100644
index f963968..0000000
--- a/testautogen/forgeConfig.proto
+++ /dev/null
@@ -1,39 +0,0 @@
-syntax = "proto3";
-
-package testautogen;
-
-import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
-
-// define 3 branches. that is all that is supported
-// the term 'master' is used in the code because 'main' is a reserved word in golang already
-// allow 'read only' and 'private' flags
-// package names sometimes must be different than the binary name
-// for example 'zookeeper' is packaged as 'zookeeper-go'
-// due to the prior apache foundation project. This happens and is ok!
-message ForgeConfig {
- string goPath = 1; // Examples: 'go.wit.com/apps/go-clone' or "~/mythings" or "/home/src/foo"
-
- bool writable = 2; // if you have write access to the repo
- bool readOnly = 3; // the opposite, but needed for now because I don't know what I'm doing
- bool private = 4; // if the repo can be published
- bool directory = 5; // everything in this directory should use these writable & private values
- bool favorite = 6; // you like this. always git clone/go clone this repo
- bool interesting = 7; // this is something interesting you found and want to remember it
-
- string masterBranchName = 8; // git 'main' or 'master' branch name
- string develBranchName = 9; // whatever the git 'devel' branch name is
- string userBranchName = 10; // whatever your username branch is
-
- string debName = 11; // the actual name used with 'apt install' (or distro apt equivalent.
-// todo: appeal to everyone to alias 'apt' on rhat, gentoo, arch, etc to alias 'apt install'
-// so we can make easier instructions for new linux users. KISS
-
- google.protobuf.Timestamp verstamp = 12; // the git commit timestamp of the version
-}
-
-// TODO: autogen 'sort', 'marshal'
-message ForgeConfigs {
- string uuid = 1; // could be useful for /usr/share/file/magic someday?
- string version = 2; // could be used for protobuf schema change violations?
- repeated ForgeConfig ForgeConfigs = 3;
-}
diff --git a/testautogen/test.proto b/testautogen/test.proto
deleted file mode 100644
index 8d60852..0000000
--- a/testautogen/test.proto
+++ /dev/null
@@ -1,21 +0,0 @@
-syntax = "proto3";
-
-package gitpb;
-
-import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
-
-message GitTag {
- string refname = 1; // tag name. treated as unique
- google.protobuf.Timestamp creatordate = 2; // git creatordate
- google.protobuf.Timestamp authordate = 3; // git creatordate
- string objectname = 4; // git hash
- string subject = 5; // git tag subject
- string author = 6; // author
- string bling = 7; // bling
-}
-
-message GitTags {
- string uuid = 1; // I guess why not just have this on each file
- string version = 2; // maybe can be used for protobuf schema change violations
- repeated GitTag gitTags = 3;
-}