mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
build: tidy up packages by removing unused scripts and files (#207)
This commit is contained in:
parent
3c3dc547b2
commit
a8147b9713
5 changed files with 0 additions and 239 deletions
|
@ -1,34 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
PLATFORM=$1
|
||||
ARCH=$2
|
||||
|
||||
export GOPATH="/tmp/go"
|
||||
|
||||
binary="portainer"
|
||||
|
||||
mkdir -p dist
|
||||
mkdir -p ${GOPATH}/src/github.com/portainer/portainer
|
||||
|
||||
cp -R api ${GOPATH}/src/github.com/portainer/portainer/api
|
||||
|
||||
cp -r "./mustache-templates" "./dist"
|
||||
|
||||
cd 'api/cmd/portainer'
|
||||
|
||||
go get -t -d -v ./...
|
||||
GOOS=${PLATFORM} GOARCH=${ARCH} CGO_ENABLED=0 go build -a -trimpath --installsuffix cgo --ldflags "-s \
|
||||
-X 'github.com/portainer/portainer/api/build.BuildNumber=${BUILDNUMBER}' \
|
||||
-X 'github.com/portainer/portainer/api/build.ImageTag=${CONTAINER_IMAGE_TAG}' \
|
||||
-X 'github.com/portainer/portainer/api/build.NodejsVersion=${NODE_VERSION}' \
|
||||
-X 'github.com/portainer/portainer/api/build.YarnVersion=${YARN_VERSION}' \
|
||||
-X 'github.com/portainer/portainer/api/build.WebpackVersion=${WEBPACK_VERSION}' \
|
||||
-X 'github.com/portainer/portainer/api/build.GoVersion=${GO_VERSION}'"
|
||||
|
||||
if [ "${PLATFORM}" == 'windows' ]; then
|
||||
mv "$BUILD_SOURCESDIRECTORY/api/cmd/portainer/${binary}.exe" "$BUILD_SOURCESDIRECTORY/dist/portainer.exe"
|
||||
else
|
||||
mv "$BUILD_SOURCESDIRECTORY/api/cmd/portainer/$binary" "$BUILD_SOURCESDIRECTORY/dist/portainer"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue