Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ branches:

env:
matrix:
- ORIENTDB_VERSION=2.2.9
- ORIENTDB_VERSION=2.1.23
- ORIENTDB_VERSION=3.0.0-SNAPSHOT
- ORIENTDB_VERSION=2.2.14-SNAPSHOT
- ORIENTDB_VERSION=2.2.13
- ORIENTDB_VERSION=2.2.12
- ORIENTDB_VERSION=2.1.25
- ORIENTDB_VERSION=2.1.24
- ORIENTDB_VERSION=2.0.18
global:
- secure: "FfqHFu2i1X5dIqzIxIGraEZrGSswSE4XVR7Ig9fkfYhbQfhFfZCOaRG95tyoZW7g5S0K2Kiw/oDyIKMPC+5g5PfMv2uvI/LZtokOy5ZewF0SHMjuCA54P+y83uindQMfb6KvPc9h/6tV2eogQGZ1y+juXteb4NRDUxt27NppRwM="
49 changes: 37 additions & 12 deletions ci/_bash_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,49 @@

build(){

# if command_exists "mvn" && [[ "$1" != *"-"* ]] && [[ "$1" != *"SNAPSHOT"* ]] && [[ "$1" != *"2.0"* ]]; then
# echo "Build started with MAVEN"
# build_via_mvn $1 $2
# el
if [[ "$1" == *"SNAPSHOT"* ]]; then
echo "Build by clone/pull github develop branch"
build_via_git $1 $2
ODB_VERSION=$1
ODB_COMPILED_NAME="orientdb-community-${ODB_VERSION}"
ODB_ARCHIVED_NAME="orientdb-${ODB_VERSION}"
ODB_PACKAGE_EXT="tar.gz"
ODB_COMPRESSED=${ODB_COMPILED_NAME}.${ODB_PACKAGE_EXT}
OUTPUT_DIR="${2:-$(pwd)}"

if [[ "${ODB_VERSION}" == *"SNAPSHOT"* ]]; then
download "https://oss.sonatype.org/service/local/artifact/maven/content?r=snapshots&g=com.orientechnologies&a=orientdb-community&v=${ODB_VERSION}&e=tar.gz" $OUTPUT_DIR ${ODB_COMPRESSED}
else
echo "Build by download from github repository"
build_via_github $1 $2
download "http://central.maven.org/maven2/com/orientechnologies/orientdb-community/${ODB_VERSION}/orientdb-community-${ODB_VERSION}.tar.gz" $OUTPUT_DIR ${ODB_COMPRESSED}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should still make this HTTPS.

fi
extract "$OUTPUT_DIR/$ODB_COMPRESSED" $OUTPUT_DIR


}

command_exists () {
type "$1" >/dev/null 2>&1 ;
}

download () {
OUTPUT_DIR=$2
PACKAGE_NAME=$3

if [ ! -d "$OUTPUT_DIR" ]; then
mkdir "$OUTPUT_DIR"
fi

if command_exists "wget" ; then
echo "wget -q -O $OUTPUT_DIR/$PACKAGE_NAME $1"
wget -q -O "$OUTPUT_DIR/$PACKAGE_NAME" "$1"
elif command_exists "curl" ; then
echo "cd ${OUTPUT_DIR}"
cd ${OUTPUT_DIR}
echo "curl --silent -L $1 \"$OUTPUT_DIR/$PACKAGE_NAME\""
curl --silent -L $1 --output "$OUTPUT_DIR/$PACKAGE_NAME"
else
echo "Cannot download $1 [missing wget or curl]"
exit 1
fi
}

extract(){

ODB_PACKAGE_PATH=$1
Expand Down Expand Up @@ -59,8 +84,8 @@ download () {
elif command_exists "curl" ; then
echo "cd ${OUTPUT_DIR}"
cd ${OUTPUT_DIR}
echo "curl --silent -L $1 \"$OUTPUT_DIR/$PACKAGE_NAME\""
curl --silent -L $1 --output "$OUTPUT_DIR/$PACKAGE_NAME"
echo "curl --silent -LO $1"
curl --silent -LO $1
else
echo "Cannot download $1 [missing wget or curl]"
exit 1
Expand All @@ -71,7 +96,6 @@ build_via_git (){

ODB_VERSION=$1
CI_DIR=$2
ODB_ARCHIVED_NAME="orientdb-${ODB_VERSION}"

cd ${CI_DIR}
if [ ! -d "orientdb-develop" ]; then
Expand All @@ -87,6 +111,7 @@ build_via_git (){
fi

git pull origin develop
ant clean install

echo "mvn clean install -DskipTests"
mvn clean install -DskipTests
Expand Down