Skip to content

Commit

Permalink
refactor: migrate to new aperturerobotics/common pattern
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Apr 23, 2024
1 parent 3aa9606 commit 6d3fcbc
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 1,345 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.js
1 change: 0 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"workarounds:all"
],
"branchConcurrentLimit": 0,
"ignorePaths": ["hack"],
"packageRules": [
{
"matchManagers": ["gomod"],
Expand Down
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
/coverage
/build
/.log
/.snowpack
/.tools
/.aider*

# misc
.DS_Store
Expand All @@ -16,12 +17,10 @@ yarn-debug.log*
yarn-error.log*

.#*
debug.test*
/dist
.*.swp
.vs/
.vscode/
!.vscode/launch.json

vendor/
debug.test
.aider*
/vendor/
67 changes: 0 additions & 67 deletions .golangci.yml

This file was deleted.

1 change: 1 addition & 0 deletions .golangci.yml
1 change: 0 additions & 1 deletion Makefile

This file was deleted.

29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://github.com/aperturerobotics/template
PROJECT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
SHELL:=bash
MAKEFLAGS += --no-print-directory

GO_VENDOR_DIR := ./vendor
COMMON_DIR := $(GO_VENDOR_DIR)/github.com/aperturerobotics/common
COMMON_MAKEFILE := $(COMMON_DIR)/Makefile

export GO111MODULE=on
undefine GOARCH
undefine GOOS

.PHONY: $(MAKECMDGOALS) help

all: help

$(COMMON_MAKEFILE):
go mod vendor
if [ ! -f $(COMMON_MAKEFILE) ]; then \
echo "Please add github.com/aperturerobotics/common to your go.mod."; \
exit 1; \
fi

$(MAKECMDGOALS): $(COMMON_MAKEFILE)
@$(MAKE) -C $(COMMON_DIR) PROJECT_DIR="$(PROJECT_DIR)" $@

%: $(COMMON_MAKEFILE)
@$(MAKE) -C $(COMMON_DIR) PROJECT_DIR="$(PROJECT_DIR)" $@
9 changes: 9 additions & 0 deletions deps.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build deps_only
// +build deps_only

package template

import (
// _ imports common with the Makefile and tools
_ "github.com/aperturerobotics/common"
)
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module github.com/aperturerobotics/template

go 1.22

replace github.com/aperturerobotics/common => ../common

require (
github.com/aperturerobotics/common v0.11.2-0.20240423001907-56f86e89351b // latest
github.com/aperturerobotics/protobuf-go-lite v0.5.0 // latest
github.com/aperturerobotics/starpc v0.31.3 // latest
)
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
github.com/aperturerobotics/protobuf-go-lite v0.5.0 h1:JmTfiOeTQv06EYIFyVkjkmGXxI7JoCRuokVK2SOvo3I=
github.com/aperturerobotics/protobuf-go-lite v0.5.0/go.mod h1:/EduuzDxtr5s0e9s10XYG35+pPgvrgg3UmBliivOaSs=
github.com/aperturerobotics/starpc v0.30.0 h1:Cjld2mRILmUVGvtLvTykUDsRDGwslUywp9BMbkrB6x4=
github.com/aperturerobotics/starpc v0.30.0/go.mod h1:dwoVi6UdTp1bUGIAxDpkYwDN+j3opZz3xg0NGBGqDeU=
github.com/aperturerobotics/starpc v0.31.3 h1:L8nSrqeqS6tmf7kvuWO7Ht2xvZJ2BaT3hgGNahjwdV4=
github.com/aperturerobotics/starpc v0.31.3/go.mod h1:uVjvQfJunHUEg9hAoPkbP6FysIvGqcRQnrZXaDl2WP0=
github.com/aperturerobotics/util v1.17.1 h1:7qG1Am+vNAelbXCdYOYfnMaZKM28QBWVCi+zvkjo+d4=
github.com/aperturerobotics/util v1.17.1/go.mod h1:NdGzI+NyJvqEwt+RkKPxOlKl9zUSWJMgKicNci7ZFMU=
github.com/aperturerobotics/util v1.18.1 h1:Iu8toMYRKs3d0TH8JkAMwfEYY8bEekDaTEvLOVVqh44=
github.com/aperturerobotics/util v1.18.1/go.mod h1:Oz7Rmq5sKS1UgTRJkDWYfyf1LiA2rIRbnO341Xd91bU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
2 changes: 0 additions & 2 deletions hack/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions hack/Makefile

This file was deleted.

Loading

0 comments on commit 6d3fcbc

Please sign in to comment.