From 7466375ef3ecabd9c5991ce157188df4a1d4a88c Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Mon, 15 Apr 2013 22:28:08 -0700 Subject: [PATCH] - add 'packages' target - bump to 1.1.10.rc1 --- Makefile | 7 +++++++ lib/logstash/version.rb | 2 +- pkg/build.sh | 17 +++++++++++------ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 758da195af6..cf9389be956 100644 --- a/Makefile +++ b/Makefile @@ -332,3 +332,10 @@ releaseNote: -$(QUIET)rm releaseNote.html $(QUIET)curl -si "https://logstash.jira.com/secure/ReleaseNote.jspa?version=$(JIRA_VERSION_ID)&projectId=10020" | sed -n '//,/<\/textarea>/p' | grep textarea -v >> releaseNote.html $(QUIET)ruby pull_release_note.rb + +packages: # flatjar + (cd pkg; \ + ./build.sh ubuntu 12.10; \ + ./build.sh centos 6; \ + ./build.sh debian 6; \ + ) diff --git a/lib/logstash/version.rb b/lib/logstash/version.rb index 5e73c1e67b9..bbd5cba0806 100644 --- a/lib/logstash/version.rb +++ b/lib/logstash/version.rb @@ -1,5 +1,5 @@ # The version of logstash. -LOGSTASH_VERSION = "1.1.10.dev" +LOGSTASH_VERSION = "1.1.10.rc1" # Note to authors: this should not include dashes because 'gem' barfs if # you include a dash in the version string. diff --git a/pkg/build.sh b/pkg/build.sh index eb4857d12d5..bfd2cabfde6 100755 --- a/pkg/build.sh +++ b/pkg/build.sh @@ -1,6 +1,7 @@ #!/bin/bash -VERSION=1.1.9 + +VERSION="$(awk -F\" '/LOGSTASH_VERSION/ {print $2}' $(dirname $0)/../lib/logstash/version.rb)" if [ "$#" -ne 2 ] ; then echo "Usage: $0 " @@ -12,6 +13,8 @@ fi os=$1 release=$2 +echo "Building package for $os $release" + destdir=build/ prefix=/opt/logstash @@ -21,13 +24,15 @@ fi mkdir -p $destdir/$prefix + # install logstash.jar -if [ ! -f "$(dirname $0)/../build/logstash-$VERSION-flatjar.jar" ] ; then - echo "Unable to find logstash-$VERSION-flatjar.jar" +jar="$(dirname $0)/../build/logstash-$VERSION-flatjar.jar" +if [ ! -f "$jar" ] ; then + echo "Unable to find $jar" exit 1 fi -cp $(dirname $0)/../build/logstash-$VERSION-flatjar $destdir/$prefix +cp $jar $destdir/$prefix/ case $os@$release in centos@*) @@ -73,7 +78,7 @@ case $os in --before-install centos/before-install.sh \ --before-remove centos/before-remove.sh \ --after-install centos/after-install.sh \ - -C $destdir . + -f -C $destdir . ;; ubuntu|debian) fpm -s dir -t deb -n logstash -v "$VERSION" \ @@ -82,6 +87,6 @@ case $os in --before-install ubuntu/before-install.sh \ --before-remove ubuntu/before-remove.sh \ --after-install ubuntu/after-install.sh \ - -C $destdir . + -f -C $destdir . ;; esac