Skip to content
Draft
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
4 changes: 4 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ playJavaSettings
scalaVersion := "2.10.4"

envVars in Test := Map("PSO_DIR_PATH" -> (baseDirectory.value / "scripts/pso").getAbsolutePath)

licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))

bintrayOrganization := Some("linkedin")
33 changes: 33 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
BUILD_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

# Enable analytics in the conf file.
sed -i.bak 's/^enable_analytics=false$/enable_analytics=true/' $BUILD_PATH/app-conf/elephant.conf
rm -rf "$BUILD_PATH"/app-conf/elephant.conf.bak

cd $BUILD_PATH/


# Compile Dr Elephant code with the script provided. An optional conf file can be passed in.
if [ -z "$1" ];
then
bash ./compile.sh
else
bash ./compile.sh $1
fi

# Generate the pom file (other artifacts are disabled) and publish to bintray
sbt clean 'set publishArtifact in (Compile, packageBin) := false' 'set publishArtifact in (Compile, packageDoc) := false' 'set publishArtifact in (Compile, packageSrc) := false' publish

MODULE=dr-elephant_2.10

VERSION=`sed -n 's/.*version := \"\([^"]*\)\".*/\1/p' $BUILD_PATH/build.sbt`

mv $BUILD_PATH/dist/dr-elephant*.zip $BUILD_PATH/dist/$MODULE-$VERSION.zip

cd dist/

echo "Uploading the distribution to bintray"
curl -T $MODULE-"$VERSION".zip -u"$BINTRAY_USER":"$BINTRAY_PASS" https://api.bintray.com/content/linkedin/maven/dr-elephant/"$VERSION"/com/linkedin/drelephant/$MODULE/"$VERSION"/ --verbose

echo "Publishing the uploaded distribution"
curl -X POST -u"$BINTRAY_USER":"$BINTRAY_PASS" https://api.bintray.com/content/linkedin/maven/dr-elephant/"$VERSION"/publish --verbose
3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ addSbtPlugin("com.typesafe.play" % "sbt-plugin" % Option(System.getProperty("pla

// Jacoco code coverage plugin
addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.6")

// An sbt plugin for publishing bintray packages.
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
19 changes: 13 additions & 6 deletions public/assets/analytics/track.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/*
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The piwik.js file was being overwritten to this location (track.js) by Dr Elephant MP wrapper. Since the wrapper will be deprecated so adding this file as part of Dr Elephant source code itself.

Paste the tracking javascript snippet into this file for web analytics.
This javascript file will be included into every page in the application.
See comments section above 'enable.analytics' in the application.conf file for
more information.
*/

// Piwik
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.corp.linkedin.com/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 86]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
// End Piwik Code