mirror of
https://github.com/taigrr/github2mr.git
synced 2026-04-02 03:09:09 -07:00
Initial release of github2mr.
This is the initial release which is fully-functional and works for myself, self-hosted github enterprise installations, and privately hosted gitbucket installs. It has not been tested against other systems (gogs, gitea, etc), but reports of success/failure or patches would be most welcome.
This commit is contained in:
43
.github/build
vendored
Executable file
43
.github/build
vendored
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The basename of our binary
|
||||
BASE="github2mr"
|
||||
|
||||
# Setup an output directory - creating if missing
|
||||
cur=$(pwd)
|
||||
OUTPUT="${cur}/bin"
|
||||
if [ ! -d "${OUTPUT}" ]; then
|
||||
mkdir -p "${OUTPUT}"
|
||||
fi
|
||||
|
||||
# We build on multiple platforms/archs
|
||||
BUILD_PLATFORMS="linux darwin freebsd"
|
||||
BUILD_ARCHS="amd64 386"
|
||||
|
||||
# For each platform.
|
||||
for OS in ${BUILD_PLATFORMS[@]}; do
|
||||
|
||||
# For each arch
|
||||
for ARCH in ${BUILD_ARCHS[@]}; do
|
||||
|
||||
# Setup a suffix for the binary
|
||||
SUFFIX="${OS}"
|
||||
|
||||
# i386 is better than 386
|
||||
if [ "$ARCH" = "386" ]; then
|
||||
SUFFIX="${SUFFIX}-i386"
|
||||
else
|
||||
SUFFIX="${SUFFIX}-${ARCH}"
|
||||
fi
|
||||
|
||||
echo "Building for ${OS} [${ARCH}] -> ${BASE}-${SUFFIX}"
|
||||
|
||||
# Run the build
|
||||
export GOARCH=${ARCH}
|
||||
export GOOS=${OS}
|
||||
export CGO_ENABLED=0
|
||||
|
||||
# Build the main-binary
|
||||
go build -ldflags "-X main.version=$(git describe --tags 2>/dev/null || echo 'master')" -o "${OUTPUT}/${BASE}-${SUFFIX}"
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user