Skip to content

Commit

Permalink
remove hollow- prefix in bom (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alva8756 committed Nov 13, 2023
1 parent ed46e71 commit b76c1b4
Show file tree
Hide file tree
Showing 20 changed files with 81 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*.dylib
*.DS_Store

hollow-bomservice
bomservice

# Test binary, built with `go test -c`
*.test
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.18.0

ENTRYPOINT ["/usr/sbin/hollow-bomservice"]
ENTRYPOINT ["/usr/sbin/bomservice"]

COPY hollow-bomservice /usr/sbin/hollow-bomservice
RUN chmod +x /usr/sbin/hollow-bomservice
COPY bomservice /usr/sbin/bomservice
RUN chmod +x /usr/sbin/bomservice
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export DOCKER_BUILDKIT=1
LDFLAG_LOCATION := github.com/metal-toolbox/hollow-bomservice/internal/version
LDFLAG_LOCATION := github.com/metal-toolbox/bomservice/internal/version
GIT_COMMIT := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git symbolic-ref -q --short HEAD)
GIT_SUMMARY := $(shell git describe --tags --dirty --always)
VERSION := $(shell git describe --tags 2> /dev/null)
BUILD_DATE := $(shell date +%s)
GIT_COMMIT_FULL := $(shell git rev-parse HEAD)
GO_VERSION := $(shell expr `go version |cut -d ' ' -f3 |cut -d. -f2` \>= 16)
DOCKER_IMAGE := "ghcr.io/metal-toolbox/hollow-bomservice"
REPO := "https://github.com/metal-toolbox/hollow-bomservice.git"
DOCKER_IMAGE := "ghcr.io/metal-toolbox/bomservice"
REPO := "https://github.com/metal-toolbox/bomservice.git"

.DEFAULT_GOAL := help

Expand All @@ -31,7 +31,7 @@ build-osx:
ifeq ($(GO_VERSION), 0)
$(error build requies go version 1.17.n or higher)
endif
GOOS=darwin GOARCH=amd64 go build -o hollow-bomservice \
GOOS=darwin GOARCH=amd64 go build -o bomservice \
-ldflags \
"-X $(LDFLAG_LOCATION).GitCommit=$(GIT_COMMIT) \
-X $(LDFLAG_LOCATION).GitBranch=$(GIT_BRANCH) \
Expand All @@ -46,7 +46,7 @@ build-linux:
ifeq ($(GO_VERSION), 0)
$(error build requies go version 1.20.x+ or higher)
endif
GOOS=linux GOARCH=amd64 go build -o hollow-bomservice \
GOOS=linux GOARCH=amd64 go build -o bomservice \
-ldflags \
"-X $(LDFLAG_LOCATION).GitCommit=$(GIT_COMMIT) \
-X $(LDFLAG_LOCATION).GitBranch=$(GIT_BRANCH) \
Expand All @@ -55,7 +55,7 @@ endif
-X $(LDFLAG_LOCATION).BuildDate=$(BUILD_DATE)"


## build docker image and tag as ghcr.io/metal-toolbox/hollow-bomservice:latest
## build docker image and tag as ghcr.io/metal-toolbox/bomservice:latest
build-image: build-linux
@echo ">>>> NOTE: You may want to execute 'make build-image-nocache' depending on the Docker stages changed"
docker build --rm=true -f Dockerfile -t ${DOCKER_IMAGE}:latest . \
Expand All @@ -65,9 +65,9 @@ build-image: build-linux

## build and push devel docker image to KIND image repo
push-image-devel: build-image
docker tag ${DOCKER_IMAGE}:latest localhost:5001/hollow-bomservice:latest
docker push localhost:5001/hollow-bomservice:latest
kind load docker-image localhost:5001/hollow-bomservice:latest
docker tag ${DOCKER_IMAGE}:latest localhost:5001/bomservice:latest
docker push localhost:5001/bomservice:latest
kind load docker-image localhost:5001/bomservice:latest

## push docker image
push-image:
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "hollow-bomservice",
Use: "bomservice",
Short: "server hollow bomservice",
}

Expand Down
10 changes: 5 additions & 5 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http"
"time"

"github.com/metal-toolbox/hollow-bomservice/internal/app"
"github.com/metal-toolbox/hollow-bomservice/internal/model"
"github.com/metal-toolbox/hollow-bomservice/internal/server"
"github.com/metal-toolbox/hollow-bomservice/internal/store"
"github.com/metal-toolbox/bomservice/internal/app"
"github.com/metal-toolbox/bomservice/internal/model"
"github.com/metal-toolbox/bomservice/internal/server"
"github.com/metal-toolbox/bomservice/internal/store"
"github.com/spf13/cobra"
)

Expand All @@ -21,7 +21,7 @@ var (
// install server command
var cmdServer = &cobra.Command{
Use: "server",
Short: "Run hollow bomservice server",
Short: "Run bomservice server",
Run: func(cmd *cobra.Command, args []string) {
app, termCh, err := app.New(model.AppKindServer, cfgFile, model.LogLevel(logLevel))
if err != nil {
Expand Down
12 changes: 3 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/metal-toolbox/hollow-bomservice
module github.com/metal-toolbox/bomservice

go 1.20
go 1.21.0

require (
github.com/banzaicloud/logrus-runtime-formatter v0.0.0-20190729070250-5ae5475bae5e
Expand All @@ -14,7 +14,7 @@ require (
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
github.com/tealeg/xlsx v1.0.5
go.hollow.sh/serverservice v0.16.1
go.hollow.sh/serverservice v0.16.2
go.hollow.sh/toolbox v0.6.1
golang.org/x/oauth2 v0.11.0
gopkg.in/square/go-jose.v2 v2.6.0
Expand All @@ -31,7 +31,6 @@ require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-contrib/zap v0.2.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
Expand Down Expand Up @@ -65,19 +64,16 @@ require (
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.4.0 // indirect
github.com/nats-io/nats.go v1.28.0 // indirect
github.com/nats-io/nkeys v0.4.4 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand Down Expand Up @@ -115,5 +111,3 @@ require (
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace go.hollow.sh/serverservice v0.16.1 => /Users/alzhang/project/hollow-serverservice
Loading

0 comments on commit b76c1b4

Please sign in to comment.