aasdk/buildenv/entrypoint.sh
Matthew Hilton 053d69ecf3
added Github actions (#12)
* package using cpack (#18)

Added build to .gitignore
Added vscode tasks to clean, build, package
Added CPack support for debian packages

* Added gitversion,cmake and last commit epoch as patch version

* Switched patch version to use commit hash instead of epoch

* Added CPACK_Version

* added message to output version

* added dockerbuild temp

* workflow fix

* fixed tabs

* fixed depends

* fixed typo

* typo in Dockerfile

* added upload artifact

* added deb_architecture

* added releases

* fixed checkout

* added tags

* fixed release gha

* Added versioning

* switch to use commit_timestamp
2021-09-23 23:20:11 +01:00

28 lines
540 B
Bash

#!/bin/bash
ARCH=$1
MAJORVER=0
if [ -z "$ARCH" ]
then
echo "Please supply a target architecture to build"
echo "Choose from 'amd64', 'armhf'"
exit
else
if [ "$ARCH" != "amd64" ] && [ "$ARCH" != "armhf" ]
then
echo "Invalid architecture requested"
exit
fi
fi
echo "Now building within docker for $ARCH"
# Clear out the /build directory
mkdir build;
cd build;
cmake -DCMAKE_BUILD_TYPE=Release -DTARGET_ARCH=$ARCH ../
make -j4
cpack --config CPackConfig.cmake
# Move it to release
mv *.deb /release/