Skip to content

Commit

Permalink
Merge pull request #38 from fledge-iot/2.2.0RC
Browse files Browse the repository at this point in the history
2.2.0RC
  • Loading branch information
dianomicbot authored Oct 20, 2023
2 parents 910457d + 7c5214b commit 6cf2541
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ timestamps {
// Change to corresponding CORE_BRANCH as required
// e.g. FOGL-xxxx, main etc.
sh '''
CORE_BRANCH='develop'
CORE_BRANCH='2.2.0RC'
${HOME}/buildFledge ${CORE_BRANCH} ${WORKSPACE}
'''
}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.2.0
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# ./build.sh -DFLEDGE_INSTALL=/some_path/Fledge
#

os_name=`(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
os_version=`(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
os_name=$(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
os_version=$(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')

if [[ ( $os_name == *"Red Hat"* || $os_name == *"CentOS"* ) && $os_version == *"7"* ]]; then
if [[ ( $os_name == *"Red Hat"* || $os_name == *"CentOS"* ) ]]; then
if [ -f build_rhel.sh ]; then
echo "Custom build for platform is ${os_name}, Version: ${os_version}"
./build_rhel.sh $@
Expand Down
13 changes: 9 additions & 4 deletions build_rhel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@

# ./build_rhel.sh -DFLEDGE_INSTALL=/some_path/Fledge

source scl_source enable devtoolset-7
export CC=$(scl enable devtoolset-7 "command -v gcc")
export CXX=$(scl enable devtoolset-7 "command -v g++")
os_version=$(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
# Use scl_source & devtoolset only if OS is RedHat/CentOS 7
if [[ ${os_version} == *"7"* ]]
then
source scl_source enable devtoolset-7
export CC=$(scl enable devtoolset-7 "command -v gcc")
export CXX=$(scl enable devtoolset-7 "command -v g++")
fi

mkdir build
mkdir -p build
cd build/
cmake $@ ..
make
2 changes: 1 addition & 1 deletion fledge.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fledge_version>=2.1
fledge_version>=2.2
58 changes: 29 additions & 29 deletions requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,49 @@
## Author: Mark Riddoch, Massimiliano Pinto
##

fledge_location=`pwd`
os_name=`(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
os_version=`(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
set -e

fledge_location=$(pwd)
os_name=$(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
os_version=$(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
echo "Platform is ${os_name}, Version: ${os_version}"

if [[ ( $os_name == *"Red Hat"* || $os_name == *"CentOS"* ) && $os_version == *"7"* ]]; then
echo Installing development tools 7 components
sudo yum install -y yum-utils
sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
sudo yum install -y devtoolset-7
echo Installing boost components
sudo yum install -y boost-filesystem
sudo yum install -y boost-program-options
source scl_source enable devtoolset-7
export CC=/opt/rh/devtoolset-7/root/usr/bin/gcc
export CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
if [[ ( ${os_name} == *"Red Hat"* || ${os_name} == *"CentOS"* ) ]]; then
echo "Installing boost components..."
sudo yum install -y boost-filesystem boost-program-options

if [[ ${os_version} == *"7"* ]]; then
echo "Installing development tools 7 components..."
sudo yum install -y yum-utils
sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
sudo yum install -y devtoolset-7
source scl_source enable devtoolset-7
export CC=/opt/rh/devtoolset-7/root/usr/bin/gcc
export CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
fi
elif apt --version 2>/dev/null; then
echo Installing boost components
sudo apt install -y libboost-filesystem-dev
sudo apt install -y libboost-program-options-dev
sudo apt install -y libmbedtls-dev
echo Installing boost components
sudo apt install -y libboost-filesystem-dev
sudo apt install -y libboost-program-options-dev
sudo apt install -y libmbedtls-dev
else
echo "Requirements cannot be automatically installed, please refer README.rst to install requirements manually"
echo "Requirements cannot be automatically installed, please refer README.rst to install requirements manually"
fi

if [ $# -eq 1 ]; then
if [[ $# -eq 1 ]]; then
directory=$1
if [ ! -d $directory ]; then
mkdir -p $directory
fi
if [[ ! -d $directory ]]; then mkdir -p $directory; fi
else
directory=~
fi

cd $directory
if [ -d freeopcua ]; then
rm -rf freeopcua
fi
if [[ -d freeopcua ]]; then rm -rf freeopcua; fi

echo Fetching Free OPCUA library
git clone https://github.com/dianomic/freeopcua.git
git checkout Kapsch
cd freeopcua
git checkout Kapsch
mkdir build
sed \
-e 's/add_library(opcuaclient/add_library(opcuaclient STATIC/' \
Expand All @@ -76,5 +76,5 @@ cd build
cmake ..
make
cd ..
echo Set the environment variable FREEOPCUA to `pwd`
echo export FREEOPCUA=`pwd`
echo Set the environment variable FREEOPCUA to $(pwd)
echo export FREEOPCUA=$(pwd)

0 comments on commit 6cf2541

Please sign in to comment.