summaryrefslogtreecommitdiffstats
path: root/jjb/nsh_sfc/include-raw-nsh_sfc-pkg-push.sh
blob: 4cfd30007159058339d8054d38624a449ae7ec63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# basic build script example
set -e -o pipefail
echo "Looking for jars/debs/rpms to publish"
if [ "${OS}" == "ubuntu1404" ]; then
    # Find the files
    DEBS=$(find . -type f -iname '*.deb')
    echo "Found DEBS=${DEBS}"
    for i in $DEBS
    do
        push_deb "$i"
    done

    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
    export JAVAC=${JAVA_HOME}/bin/javac
    export PATH=${JAVA_HOME}/bin/:${PATH}
    cd nsh-plugin/build/java/jvpp
    $MVN deploy \
        -gs "$GLOBAL_SETTINGS_FILE" -s "$SETTINGS_FILE"
    cd -

elif [ "${OS}" == "ubuntu1604" ]; then

    # Find the files
    DEBS=$(find . -type f -iname '*.deb')
    echo "Found DEBS=${DEBS}"
    for i in $DEBS
    do
        push_deb "$i"
    done

elif [ "${OS}" == "centos7" ]; then
    # Find the files
    RPMS=$(find . -type f -iname '*.rpm')
    SRPMS=$(find . -type f -iname '*.srpm')
    SRCRPMS=$(find . -type f -name '*.src.rpm')
    echo "Found RPMS=${RPMS}"
    echo "Found SRPMS=${SRPMS}"
    echo "Found SRCRPMS=${SRCRPMS}"
    for i in $RPMS $SRPMS $SRCRPMS
    do
        push_rpm "$i"
    done
fi