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 <christian@aperture.us>
  • 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.