Skip to content
Snippets Groups Projects
databus-release.sh 1.74 KiB
Newer Older
#!/bin/bash

# get all variables and functions
source functions.sh


Sebastian Hellmann's avatar
Sebastian Hellmann committed
#################
#check argument
#################
GROUP=$1

if [ "$GROUP" != "generic" ] && [ "$GROUP" != "mappings" ] && [ "$GROUP" != "test" ] && [ "$GROUP" != "wikidata" ] && [ "$GROUP" != "text" ] || [ -z "$GROUP" ]
then
    echo "$HELP"
    exit 1
fi


##################
# Setup and clone pom files
#################

#/data/extraction/wikidumps/enwiki/20191001

kurzum's avatar
kurzum committed
# git clone "https://github.com/dbpedia/databus-maven-plugin.git" $DATABUSDIR &>/dev/null
# cd $DATABUSDIR
# git pull
kurzum's avatar
kurzum committed
# creates links in databus dir
# iterate all .ttl.bz2 files
# uncomment for testing
for path in $(find "$EXTRACTIONBASEDIR" -name "*.ttl.bz2" | sort); do
kurzum's avatar
kurzum committed
   mapAndLink $path
kurzum's avatar
kurzum committed
exit

Your Name's avatar
Your Name committed
# deploy
Sebastian Hellmann's avatar
Sebastian Hellmann committed
cd $DATABUSDIR/dbpedia/$GROUP;
Sebastian Hellmann's avatar
Sebastian Hellmann committed
mvn versions:set -DnewVersion=$(ls * | grep '^[0-9]\{4\}.[0-9]\{2\}.[0-9]\{2\}$' | sort -u  | tail -1);

Sebastian Hellmann's avatar
Sebastian Hellmann committed
# get git commit link
GITHUBLINK="$(diefCommitLink)"
Sebastian Hellmann's avatar
Sebastian Hellmann committed

PUBLISHER="https://vehnem.github.io/webid.ttl#this";
# TODO marvin: shouldn't this be the web dir directly?
PACKAGEDIR="/data/extraction/release/\${project.groupId}/\${project.artifactId}";
DOWNLOADURL="http://dbpedia-$GROUP.tib.eu/release/\${project.groupId}/\${project.artifactId}/\${project.version}/";
Sebastian Hellmann's avatar
Sebastian Hellmann committed
LABELPREFIX="(pre-release) ";
Sebastian Hellmann's avatar
Sebastian Hellmann committed
# todo replace with markdown or html when supported by upload client
Sebastian Hellmann's avatar
Sebastian Hellmann committed
COMMENTPREFIX="(MARVIN is the DBpedia bot for monthly raw releases (unparsed, unsorted) for debugging the DIEF software. After its releases, data is cleaned and persisted under the dbpedia account. Commit: $GITHUBLINK) " ;
Sebastian Hellmann's avatar
Sebastian Hellmann committed

Sebastian Hellmann's avatar
Sebastian Hellmann committed
mvn clean deploy -Ddatabus.publisher="$PUBLISHER" -Ddatabus.packageDirectory="$PACKAGEDIR" -Ddatabus.downloadUrlPath="$DOWNLOADURL" -Ddatabus.labelPrefix="$LABELPREFIX" -Ddatabus.commentPrefix="$COMMENTPREFIX";
Sebastian Hellmann's avatar
Sebastian Hellmann committed