4 # In case of master branch, update vpp_dependencies file
5 # to match vpp-api-java and eliminate Java API mismatches (HC2VPP-102).
7 # In order to have control of package dependencies in the release artifacts (HC2VPP-282),
8 # the vpp_dependencies file is not modified in case of stable branch
9 # (after VPP API freeze, Java API mismatches occur very rarely).
10 if [[ "${STREAM}" == "master" ]]; then
11 if [[ "${OS}" == "centos7" ]]; then
12 # Determine VPP Java API version used in maven build
13 JVPP_VERSION=`yum list installed vpp-api-java | grep vpp-api-java | awk '{ printf $2; }'`
14 VERSION=`yum deplist vpp-api-java |grep vpp-lib |head -1 | awk '{ print $3}'`
16 # Write a file that will echo VPP dependencies
17 echo -n 'echo' > vpp_dependencies
18 echo " \"vpp = ${VERSION}, vpp-plugins = ${VERSION}, vpp-api-java = ${JVPP_VERSION}\"" >> vpp_dependencies
19 chmod +x vpp_dependencies
21 # Overwrite default dependencies file
22 mv vpp_dependencies packaging/rpm/
24 # Determine VPP Java API version used in maven build
25 JVPP_VERSION=`apt list --installed | grep vpp-api-java | awk '{ printf $2; }'`
26 VERSION=`apt-cache showpkg vpp-api-java |grep "$JVPP_VERSION" |grep vpp | sed "s/.*(. //" | sed "s/).*//"`
28 # Write a file that will echo VPP dependencies
29 echo -n 'echo' > vpp_dependencies
30 echo " \"vpp (= ${VERSION}), vpp-plugin-core (= ${VERSION}), vpp-api-java (= ${JVPP_VERSION})\"" >> vpp_dependencies
31 chmod +x vpp_dependencies
33 # Overwrite default dependencies file
34 mv vpp_dependencies packaging/deb/common/
39 if [[ "${OS}" == "centos7" ]]; then
42 ./packaging/rpm/rpmbuild.sh
45 RPMS=$(find ./packaging/ -type f -iname '*.rpm')
46 SRPMS=$(find ./packaging/ -type f -iname '*.srpm')
47 SRCRPMS=$(find ./packaging/ -type f -name '*.src.rpm')
49 # Publish hc2vpp packages
50 for i in ${RPMS} ${SRPMS} ${SRCRPMS}
54 elif [[ "${OS}" == "ubuntu1604" ]]; then
57 ./packaging/deb/xenial/debuild.sh
60 DEBS=$(find ./packaging/ -type f -iname '*.deb')
62 # Publish hc2vpp packages
67 elif [[ "${OS}" == "ubuntu1804" ]]; then
70 ./packaging/deb/bionic/debuild.sh
73 DEBS=$(find ./packaging/ -type f -iname '*.deb')
75 # Publish hc2vpp packages