Added admin utility

This commit is contained in:
Alexey Berezhok
2024-08-23 23:10:01 +03:00
parent 12f3b66b2b
commit e22f2e6bdb
7 changed files with 420 additions and 39 deletions

View File

@@ -15,18 +15,19 @@ help:
install:
cd _build && \
install -d $(BIN_INSTALL_DIR) && \
install -m 755 hestiacp-php-selector $(BIN_INSTALL_DIR)
install -m 755 hestiacp-php-selector $(BIN_INSTALL_DIR) && \
install -m 755 hestiacp-php-admin $(BIN_INSTALL_DIR)
targz:
mkdir $(PKG_NAME)-$(VERSION) && \
git rev-parse --abbrev-ref HEAD > $(PKG_NAME)-$(VERSION)/version
cp -r LICENSE src Makefile *.spec go.mod.prepare.sh go.* $(PKG_NAME)-$(VERSION)/ && \
cp -r LICENSE src Makefile *.spec go.mod.prepare.sh go.* installer.sh $(PKG_NAME)-$(VERSION)/ && \
tar zcvf $(PKG_NAME)-$(VERSION).tar.gz $(PKG_NAME)-$(VERSION) && \
rm -rf $(PKG_NAME)-$(VERSION)
targzvendor:
mkdir $(PKG_NAME)-$(VERSION) && \
cp -r LICENSE src Makefile *.spec go.mod.prepare.sh go.* $(PKG_NAME)-$(VERSION)/ && \
cp -r LICENSE src Makefile *.spec go.mod.prepare.sh go.* installer.sh $(PKG_NAME)-$(VERSION)/ && \
pushd $(PKG_NAME)-$(VERSION) && \
$(GOENV) go mod vendor && \
popd && \
@@ -44,7 +45,9 @@ build:
cd _src && \
{ [ -e vendor ] || $(GOENV) go mod tidy; } && \
{ [ -e vendor ] || $(GOENV) go build -buildvcs=false $(GOLDFLAGS) -o ../_build/hestiacp-php-selector src/main/*.go; } && \
{ [ ! -e vendor ] || GO111MODULE=on GOPROXY=off go build -mod=vendor -buildvcs=false $(GOLDFLAGS) -o ../_build/hestiacp-php-selector src/main/*.go; }
{ [ ! -e vendor ] || GO111MODULE=on GOPROXY=off go build -mod=vendor -buildvcs=false $(GOLDFLAGS) -o ../_build/hestiacp-php-selector src/main/*.go; } && \
{ [ -e vendor ] || $(GOENV) go build -buildvcs=false $(GOLDFLAGS) -o ../_build/hestiacp-php-admin src/converter/*.go; } && \
{ [ ! -e vendor ] || GO111MODULE=on GOPROXY=off go build -mod=vendor -buildvcs=false $(GOLDFLAGS) -o ../_build/hestiacp-php-admin src/converter/*.go; }
check:
{ [ ! -e _src ] || rm -rf _src; } && \
@@ -54,7 +57,9 @@ check:
cd _src && \
{ [ -e vendor ] || $(GOENV) go mod tidy; } && \
{ [ -e vendor ] || $(GOENV) go test src/main/*.go; } && \
{ [ ! -e vendor ] || GO111MODULE=on GOPROXY=off go test -mod=vendor -buildvcs=false src/main/*.go; }
{ [ ! -e vendor ] || GO111MODULE=on GOPROXY=off go test -mod=vendor -buildvcs=false src/main/*.go; } && \
{ [ -e vendor ] || $(GOENV) go test src/converter/*.go; } && \
{ [ ! -e vendor ] || GO111MODULE=on GOPROXY=off go test -mod=vendor -buildvcs=false src/converter/*.go; }
all: help