mirror of
https://github.com/nicksherron/bashhub-server.git
synced 2024-09-20 03:55:56 +08:00
needs follow up and testing
This commit is contained in:
parent
60f5e13ef3
commit
943c85bdd8
|
@ -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
|
||||
|
|
10
Makefile
10
Makefile
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue