Skip to content
Snippets Groups Projects
Commit 7d947d88 authored by Bob Mottram's avatar Bob Mottram
Browse files

Install from source directory

parent 6e14a0e6
No related branches found
No related tags found
No related merge requests found
......@@ -185,7 +185,13 @@ if [ "$build_info" ]; then
targetstr="${target}-${build_info}"
fi
downloads_directory=${web_dir}/downloads/${targetstr}
source_directory=/etc/birbci/${PROJECT_NAME}-${targetstr}
build_directory=/etc/birbci/${PROJECT_NAME}-${targetstr}-build
if [ ! -d "$source_directory" ]; then
echo "$source_directory"
echo 'Source directory not found'
exit 356835
fi
if [ -d "${build_directory}" ]; then
rm -rf "${build_directory}"
fi
......@@ -196,6 +202,12 @@ fi
build_log_filename="${web_dir}/buildlog_${PROJECT_NAME}-${targetstr}.txt"
# install from the source directory
cd "${source_directory}" || exit 1
git stash
git pull
make install
cd "${build_directory}" || exit 1
if [ ! "$build_info" ]; then
if ! /usr/local/bin/${PROJECT_NAME}-image -t "${target}" ${extra} --ci yes --build-log "${build_log_filename}"; then
......@@ -218,6 +230,8 @@ else
fi
xz --no-warn --verbose --keep --threads=3 -3 "${build_directory}"/*.img >> "$build_directory/build.txt"
mv "${build_directory}"/*.xz "${downloads_directory}"
cd "$source_directory" || exit 36735
git log -n 1 > "$source_directory/commit.txt"
rm "${build_directory}"/*.img
chown -R www-data:www-data "${downloads_directory}"
echo $"$(date) Build installed to website" >> "$build_directory/build.txt"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment