Skip to content

Commit

Permalink
fix: add clarity to pkg layout
Browse files Browse the repository at this point in the history
update makefiles
[skip-ci]
  • Loading branch information
dnitsch committed Feb 13, 2023
1 parent 9cf9c11 commit dac2bf4
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 85 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ jobs:
with:
fetch-depth: 0
- name: generate binaries
run: |
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.email ${{ github.actor }}[email protected]
git config user.name ${{ github.actor }}
make GIT_TAG=$SEMVER REVISION=${{ github.sha }} PAT=${{ secrets.GITHUB_TOKEN }} build_ci
- name: release library
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ OWNER := dnitsch
NAME := reststrategy
GIT_TAG := "0.9.0"
VERSION := "v$(GIT_TAG)"
REVISION := $(shell git rev-parse --short HEAD)
REVISION := "aaaa1111-always-overwrite-in-CI"

build_seeder:
echo "build seeder first as it contains nested types for APIs"
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Rest Strategy

[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_reststrategy&metric=bugs)](https://sonarcloud.io/summary/new_code?id=dnitsch_reststrategy)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_reststrategy&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=dnitsch_reststrategy)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_reststrategy&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=dnitsch_reststrategy)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_reststrategy&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=dnitsch_reststrategy)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_reststrategy&metric=coverage)](https://sonarcloud.io/summary/new_code?id=dnitsch_reststrategy)

__Seeder__: [![Go Report Card](https://goreportcard.com/badge/github.com/dnitsch/reststrategy/seeder)](https://goreportcard.com/report/github.com/dnitsch/reststrategy/seeder)

__Controller__: [![Go Report Card](https://goreportcard.com/badge/github.com/dnitsch/reststrategy/controller)](https://goreportcard.com/report/github.com/dnitsch/reststrategy/controller)

Rest Strategy is a collection of packages to enable idempotent seeding of data against REST endpoints.

This repo uses workspaces and is made up of following modules/components.
Expand Down
3 changes: 2 additions & 1 deletion controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ COPY ./ ./

RUN go mod vendor

RUN go build -ldflags="-s -w -X \"github.com/dnitsch/reststrategy/controller/cmd/controller.Version=${VERSION}\" -X \"github.com/dnitsch/reststrategy/controller/cmd/controller.Revision=${REVISION}\" -extldflags -static" \
RUN go CGO_ENABLED=0 build -mod=readonly \
-ldflags="-s -w -X \"github.com/dnitsch/reststrategy/controller/cmd/controller.Version=${VERSION}\" -X \"github.com/dnitsch/reststrategy/controller/cmd/controller.Revision=${REVISION}\" -extldflags -static" \
-o dist/controller ./cmd

RUN chmod +x ./dist/controller
Expand Down
8 changes: 4 additions & 4 deletions controller/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/dnitsch/reststrategy/controller
go 1.19

require (
github.com/dnitsch/reststrategy/apis v0.9.1-0.20230201144759-a386d28e051e
github.com/dnitsch/reststrategy/seeder v0.9.1-0.20230201144759-a386d28e051e
github.com/dnitsch/reststrategy/apis v0.9.2-0.20230213101528-9cf9c11d3b06
github.com/dnitsch/reststrategy/seeder v0.9.2-0.20230213101528-9cf9c11d3b06
// need to ensure that these packages are
// aligned to server version
k8s.io/api v0.26.1
Expand All @@ -18,8 +18,8 @@ require (
replace (
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0
github.com/AzureAD/microsoft-authentication-library-for-go => github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0
github.com/dnitsch/reststrategy/apis => ../apis
github.com/dnitsch/reststrategy/seeder => ../seeder
// github.com/dnitsch/reststrategy/apis => ../apis
// github.com/dnitsch/reststrategy/seeder => ../seeder
)

require (
Expand Down
7 changes: 7 additions & 0 deletions controller/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c=
github.com/dnitsch/configmanager v1.19.0 h1:Jjr6exUMmtWlAH+Nk0pTcv74ldavSXb5jlW4+v2YOm8=
github.com/dnitsch/configmanager v1.19.0/go.mod h1:R9Dn4OnloOrR+kw7xRxhvjGuTJ9NW0XnKTWlu2CXvk4=
github.com/dnitsch/reststrategy/apis v0.9.1-0.20230201144759-a386d28e051e h1:HDNKB5OAW3X+NLX93/AUR7gt3J/H3tFqFe6UGaQQ5Bc=
github.com/dnitsch/reststrategy/apis v0.9.2-0.20230213101528-9cf9c11d3b06 h1:ZCU8n4N7eTeiNkR0qEFPYOpUmOPNL9zZqKkRHm68apg=
github.com/dnitsch/reststrategy/apis v0.9.2-0.20230213101528-9cf9c11d3b06/go.mod h1:22rDd57qUA370NDUqAIjzFLJs8YBUQKAsEkQ6R5CHHg=
github.com/dnitsch/reststrategy/seeder v0.9.1-0.20230201144759-a386d28e051e h1:j1G+xJy5456NFhxQx1P7ShFdwvX/1ZzdFDYqvc2Ai1g=
github.com/dnitsch/reststrategy/seeder v0.9.1-0.20230201144759-a386d28e051e/go.mod h1:hzggGspuKLrHXGH3x9J9OOe9rhnExVk/se4qj5vV8Us=
github.com/dnitsch/reststrategy/seeder v0.9.2-0.20230213101528-9cf9c11d3b06 h1:jMruZSPfX10IzW2XztSaEzRGJAw+Yv30sldAUFk7zok=
github.com/dnitsch/reststrategy/seeder v0.9.2-0.20230213101528-9cf9c11d3b06/go.mod h1:L0VsODsvIIqd4hKu1r1dVIO7/HqXL9Byg+AxtQTEqyA=
github.com/dnitsch/simplelog v1.5.1 h1:PhIFuZluJIAUiKgJ+xBzTZwqe49PFg20d3ToDucu3Dg=
github.com/dnitsch/simplelog v1.5.1/go.mod h1:scPvWULBlruthxS6seGJkMbc1DM5f44IRZNmaSZCJVU=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
Expand Down
Loading

0 comments on commit dac2bf4

Please sign in to comment.