Skip to content

Commit

Permalink
Merge branch 'release/0.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmp85 committed May 2, 2017
2 parents 06bab9c + b77d894 commit 8f617ef
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 17 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### citustools v0.5.2 (May 2, 2017) ###

* Adds support for version numbers baked in to package names ("fancy")

* Fixes bug preventing Travis from producing both a release and nightly at once

* Addresses all shellcheck warnings and errors

### citustools v0.5.1 (December 6, 2016) ###

* Adds `--enable-coverage` configure flag in `pg_travis_multi_test`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Guides for getting things done, programming well, and programming in style.

## License

Copyright © 2016 Citus Data, Inc.
Copyright © 2016–2017 Citus Data, Inc.
6 changes: 3 additions & 3 deletions travis/build_new_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ hubauth="Authorization: token ${GITHUB_TOKEN}"
source pkgvars

# set default values for certain packaging variables
declare pkglatest # to make shellcheck happy
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-9.5,9.6}"
Expand Down Expand Up @@ -56,9 +55,10 @@ newcommitcount=$(curl -sf -H "${hubauth}" "${hubapiurl}" | jq -r 'length')

if [ "${newcommitcount}" -gt 0 ]; then
citus_package -p "${TARGET_PLATFORM}" 'local' nightly
mkdir nightlies
mkdir -p pkgs/nightlies
shopt -s nullglob
cp */*.rpm */*.deb nightlies
mv ./*/*.rpm ./*/*.deb pkgs/nightlies
git clean -df -e pkgs
else
echo 'nightly up to date'
fi
23 changes: 20 additions & 3 deletions travis/build_new_release
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,33 @@ nightlyref="${nightlyref:-master}"
releasepg="${releasepg:-9.5,9.6}"
nightlypg="${nightlypg:-${releasepg}}"
latestpg=$(echo "${releasepg}" | tr ',' '\n' | sort -t. -k1,1n -k2,2n | tail -n1)
versioning="${versioning:-simple}"

case "${pkgflavor}" in
debian)
pkgflavor='deb'
pkgfull="postgresql-${latestpg}-${pkgname}"

# add minor/major version to package name if using fancy versioning
if [ "${versioning}" == 'fancy' ]; then
suffix=$(echo "${pkglatest}" | grep -oE '^[0-9]+\.[0-9]+')
pkgfull="postgresql-${latestpg}-${pkgname}-${suffix}"
fi

pkgarch="amd64"
jqfilter='map(.version + "-" + .release)'
;;
redhat)
pkgflavor='rpm'
pkgfull="${pkgname}_${latestpg//./}"

# add minor/major version to package name if using fancy versioning
if [ "${versioning}" == 'fancy' ]; then
infix=$(echo "${pkglatest}" | grep -oE '^[0-9]+\.[0-9]+' | tr -d '.')
pkgfull="${pkgname}${infix}_${latestpg//./}"
else
pkgfull="${pkgname}_${latestpg//./}"
fi

pkgarch="x86_64"
jqfilter='map(.version + "-" + .release | gsub("\\.centos$";"") | gsub("\\.[^.]*$";""))'
;;
Expand All @@ -50,9 +66,10 @@ needrelease=$(curl -sf -u "${pkgauth}" "${pkgapiurl}?per_page=1000" | \

if [ "${needrelease}" == "true" ]; then
citus_package -p "${TARGET_PLATFORM}" 'local' release
mkdir releases
mkdir -p pkgs/releases
shopt -s nullglob
cp */*.rpm */*.deb releases
mv ./*/*.rpm ./*/*.deb pkgs/releases
git clean -df -e pkgs
else
echo 'release up to date'
fi
12 changes: 6 additions & 6 deletions travis/config_and_start_cluster
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
set -eux

# Create fully-trusting cluster on custom port, owned by us
sudo pg_createcluster $PGVERSION test -p 55435 -u `whoami` -- -A trust
sudo pg_createcluster "${PGVERSION}" test -p 55435 -u "$(whoami)" -- -A trust

# Build and install extension
make all PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
sudo make install PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
make all PG_CONFIG="/usr/lib/postgresql/${PGVERSION}/bin/pg_config"
sudo make install PG_CONFIG="/usr/lib/postgresql/${PGVERSION}/bin/pg_config"

# Preload library if asked to do so
if [ ${PG_PRELOAD+1} ]
if [ "${PG_PRELOAD+1}" ]
then
echo "shared_preload_libraries = '$PG_PRELOAD'" >> \
/etc/postgresql/$PGVERSION/test/postgresql.conf
"/etc/postgresql/${PGVERSION}/test/postgresql.conf"
fi

# Start cluster
sudo pg_ctlcluster $PGVERSION test start
sudo pg_ctlcluster "${PGVERSION}" test start
1 change: 1 addition & 0 deletions travis/install_pg
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ if [ "${PGVERSION//./}" -le "96" ]; then
packages="$packages postgresql-$PGVERSION postgresql-server-dev-$PGVERSION"
fi

# shellcheck disable=SC2086
sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install $packages
5 changes: 3 additions & 2 deletions travis/pg_travis_multi_test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eux

badusage=64
noinput=66

if [ "$#" -eq 0 ]; then
echo "$0: you must specify test targets" >&2
Expand All @@ -13,14 +13,15 @@ status=0
testtargets="$*"

# Configure, build, and install extension
./configure --enable-coverage PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
./configure --enable-coverage PG_CONFIG="/usr/lib/postgresql/${PGVERSION}/bin/pg_config"
make all
sudo make install

# Change to test directory for remainder
cd src/test/regress

# Run tests. DBs owned by non-standard owner put socket in /tmp
# shellcheck disable=SC2086
make ${testtargets} || status=$?

# Print diff if it exists
Expand Down
2 changes: 1 addition & 1 deletion travis/pg_travis_test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -eux
status=0

# Run tests. DBs owned by non-standard owner put socket in /tmp
PGHOST=/tmp PGPORT=55435 make installcheck PGUSER=`whoami` PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config || status=$?
PGHOST=/tmp PGPORT=55435 make installcheck PGUSER="$(whoami)" PG_CONFIG="/usr/lib/postgresql/$PGVERSION/bin/pg_config" || status=$?

# Print diff if it exists
if test -f regression.diffs; then cat regression.diffs; fi
Expand Down
1 change: 0 additions & 1 deletion travis/release_pgxn
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ success=0
failure=1
badinput=65

projname="${TRAVIS_BRANCH##*-}"
pgxnuser='citusdata'
pgxnurl='https://manager.pgxn.org/upload'

Expand Down

0 comments on commit 8f617ef

Please sign in to comment.