needs follow up and testing

This commit is contained in:
Nick Sherron 2022-01-12 04:45:01 -05:00
parent 60f5e13ef3
commit 943c85bdd8
No known key found for this signature in database
GPG key ID: 3D8176919889DF27
3 changed files with 11 additions and 4 deletions

View file

@ -23,7 +23,7 @@ ARG BUILD_DATE
ARG CGO=1
ENV CGO_ENABLED=${CGO}
ENV GOOS=linux
#ENV GOOS=linux
ENV GO111MODULE=on
WORKDIR /go/src/github.com/nicksherron/bashhub-server

View file

@ -5,7 +5,8 @@ VERSION=$(shell git tag | sort --version-sort -r | head -1)
GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
BUILD_DATE=$(shell date '+%Y-%m-%d-%H:%M:%S')
IMAGE_NAME="nicksherron/bashhub-server"
TAG_NAME := $(or ${TAG_NAME},${TAG_NAME},$(VERSION))
IMAGE_NAME="nicksherron/bashhub-server:$(TAG_NAME)"
default: help
@ -28,7 +29,12 @@ build:
go build -ldflags "-X github.com/nicksherron/bashhub-server/cmd.Version=$(VERSION) -X github.com/nicksherron/bashhub-server/cmd.GitCommit=$(GIT_COMMIT) -X github.com/nicksherron/bashhub-server/cmd.BuildDate=$(BUILD_DATE)" -o bin/${BIN_NAME}
docker-build:
docker build --no-cache=true --build-arg VERSION=${VERSION} --build-arg BUILD_DATE=${BUILD_DATE} --build-arg GIT_COMMIT=${GIT_COMMIT} -t $(IMAGE_NAME) .
docker buildx build --push \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
--no-cache=true \
--build-arg VERSION=${VERSION} \
--build-arg BUILD_DATE=${BUILD_DATE} \
--build-arg GIT_COMMIT=${GIT_COMMIT} -t $(IMAGE_NAME) .
clean:
@test ! -e bin/$(BIN_NAME) || rm bin/$(BIN_NAME)

View file

@ -1,5 +1,6 @@
# bashhub-server
[![Go Report Card](https://goreportcard.com/badge/github.com/nicksherron/bashhub-server)](https://goreportcard.com/report/github.com/nicksherron/bashhub-server) [![Build Status](https://travis-ci.org/nicksherron/bashhub-server.svg?branch=master)](https://travis-ci.org/nicksherron/bashhub-server) [![Join the chat at https://gitter.im/bashhub_server/community](https://badges.gitter.im/bashhub_server/community.svg)](https://gitter.im/bashhub_server/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Go Report Card](https://goreportcard.com/badge/github.com/nicksherron/bashhub-server)](https://goreportcard.com/report/github.com/nicksherron/bashhub-server)
![Docker Pulls](https://img.shields.io/docker/pulls/nicksherron/bashhub-server)
bashhub-server is a private cloud alternative for [bashhub-client](https://github.com/rcaloras/bashhub-client) with some
added features like regex search.