Go module, makefile (build, test, docker, e2e targets), version embedding, initialize script, vars template, ignores and the project plan.
34 lines
701 B
Bash
Executable File
34 lines
701 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2026 Bryan Joshua Pedini
|
|
|
|
if [ -z "${APP_VERSION}" ]; then
|
|
read -p "Version [latest]: " VERSIONINPUT
|
|
if [ -z "${VERSIONINPUT}" ]; then
|
|
APP_VERSION="latest"
|
|
else
|
|
APP_VERSION=${VERSIONINPUT}
|
|
fi
|
|
fi
|
|
|
|
# Get docker push option from user
|
|
if [ -z "${DOCKERPUSH}" ]; then
|
|
read -p "Docker push? [n]: " DOCKERPUSH
|
|
if [ -z "${DOCKERPUSH}" ]; then
|
|
DOCKERPUSH=n
|
|
fi
|
|
fi
|
|
|
|
# Create version tag (if provided)
|
|
if [ ! -z "${VERSIONINPUT}" ]; then
|
|
git tag "${APP_VERSION}"
|
|
fi
|
|
|
|
# Build the app
|
|
export APP_VERSION
|
|
make docker
|
|
# If wanted, push the docker image
|
|
if [ "${DOCKERPUSH}" = "y" ]; then
|
|
make dockerpush
|
|
fi
|