Drop in lantern build engine ready for CI
This commit is contained in:
parent
71a175d965
commit
002ec0f7d9
3 changed files with 85 additions and 0 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "lantern-build-engine"]
|
||||||
|
path = lantern-build-engine
|
||||||
|
url = https://gitlab.com/sbrl/lantern-build-engine.git
|
81
build
Executable file
81
build
Executable file
|
@ -0,0 +1,81 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Make sure the current directory is the location of this script to simplify matters
|
||||||
|
cd "$(dirname $(readlink -f $0))";
|
||||||
|
################
|
||||||
|
### Settings ###
|
||||||
|
################
|
||||||
|
|
||||||
|
# The name of this project
|
||||||
|
project_name="RhinoReminds";
|
||||||
|
|
||||||
|
# The path to the lantern build engine git submodule
|
||||||
|
lantern_path="./lantern-build-engine";
|
||||||
|
|
||||||
|
###
|
||||||
|
# Custom Settings
|
||||||
|
###
|
||||||
|
|
||||||
|
# Put any custom settings here.
|
||||||
|
build_output_folder="./dist";
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Check out the lantern git submodule if needed
|
||||||
|
if [ ! -d "${lantern_path}" ]; then git submodule update --init "${lantern_path}"; fi
|
||||||
|
|
||||||
|
source "${lantern_path}/lantern.sh";
|
||||||
|
|
||||||
|
if [[ "$#" -lt 1 ]]; then
|
||||||
|
echo -e "${FBLE}${project_name}${RS} build script";
|
||||||
|
echo -e " by Starbeamrainbowlabs";
|
||||||
|
echo -e "${LC}Powered by the lantern build engine, v${version}${RS}";
|
||||||
|
echo -e "";
|
||||||
|
echo -e "${CSECTION}Usage${RS}";
|
||||||
|
echo -e " ./build ${CTOKEN}{action}${RS} ${CTOKEN}{action}${RS} ${CTOKEN}{action}${RS} ...";
|
||||||
|
echo -e "";
|
||||||
|
echo -e "${CSECTION}Available actions${RS}";
|
||||||
|
echo -e " ${CACTION}setup${RS} - Perform initial setup";
|
||||||
|
echo -e " ${CACTION}ci${RS} - Perform CI tasks";
|
||||||
|
echo -e "";
|
||||||
|
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
function task_setup {
|
||||||
|
task_begin "Checking environment";
|
||||||
|
|
||||||
|
check_command git true;
|
||||||
|
check_command msbuild true;
|
||||||
|
check_command nuget true;
|
||||||
|
|
||||||
|
task_end 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function task_build {
|
||||||
|
task_begin "Restoring nuget packages";
|
||||||
|
nuget restore;
|
||||||
|
task_end $?;
|
||||||
|
|
||||||
|
task_begin "Building";
|
||||||
|
execute msbuild;
|
||||||
|
task_end $?;
|
||||||
|
}
|
||||||
|
|
||||||
|
function task_ci {
|
||||||
|
tasks_run setup;
|
||||||
|
|
||||||
|
task_begin "Environment Information";
|
||||||
|
execute git --version;
|
||||||
|
execute uname -a;
|
||||||
|
execute nuget help | head -n1;
|
||||||
|
task_end 0;
|
||||||
|
|
||||||
|
tasks_run build;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
tasks_run $@;
|
1
lantern-build-engine
Submodule
1
lantern-build-engine
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 37e1d0ea747ffce5f4ed3270c150db933164a777
|
Loading…
Reference in a new issue