Skip to content

Commit

Permalink
include git revision in package files, bump version to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperblast committed Aug 16, 2017
1 parent da4791b commit 30ef30a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions scripts/build-pkg.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

pkg_name=ddb_signals
pkg_version=2.0
plugin_file=signals.so

set -e

if [ -n "$VERBOSE" ]; then
Expand All @@ -12,10 +16,6 @@ root_dir=$(pwd)
build_dir=$root_dir/build
pkg_dir=$build_dir/pkg

pkg_name=ddb_signals
plugin=signals.so
version=1.0

function clean {
rm -rf "$pkg_dir"
}
Expand All @@ -25,8 +25,8 @@ if [ "$1" == "--clean" ]; then
exit 0
fi

test -e "$build_dir/$plugin"
file_info=$(file "$build_dir/$plugin")
test -e "$build_dir/$plugin_file"
file_info=$(file "$build_dir/$plugin_file")

if echo $file_info | grep 'Intel 80386' > /dev/null; then
arch=x86
Expand All @@ -36,8 +36,10 @@ else
arch=unknown
fi

git_rev=$(git rev-parse --short HEAD)

clean

mkdir -p "$pkg_dir"
tar czf "$pkg_dir/$pkg_name-$version-$arch.tar.gz" -C $build_dir $plugin -C $root_dir LICENSE
tar czf "$pkg_dir/$pkg_name-$pkg_version-$git_rev-$arch.tar.gz" -C $build_dir $plugin_file -C $root_dir LICENSE
touch "$pkg_dir/.stamp"
2 changes: 1 addition & 1 deletion src/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static DB_misc_t plugin_def =
{
.api_vmajor = 1,
.api_vminor = DDB_API_LEVEL,
.version_major = 1,
.version_major = 2,
.version_minor = 0,
.type = DB_PLUGIN_MISC,
.id = "signals",
Expand Down

0 comments on commit 30ef30a

Please sign in to comment.