Skip to content

Commit 7efbaea

Browse files
authored
Merge pull request #62 from citusdata/simplify-branching
2 parents 4cf2cd1 + a20cc5a commit 7efbaea

4 files changed

Lines changed: 23 additions & 11 deletions

File tree

automated_packaging/update_os_package.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ sub get_changelog_for_debian {
6969
`sed -i 's/^pkglatest.*/pkglatest=$VERSION.citus-1/g' pkgvars`;
7070

7171
# Based on the repo, update the package related variables
72-
if ( $DISTRO_VERSION eq "redhat" || $DISTRO_VERSION eq "microsoft") {
72+
if ( $DISTRO_VERSION eq "redhat" || $DISTRO_VERSION eq "microsoft" || $DISTRO_VERSION eq "all") {
7373
`sed -i 's|^Version:.*|Version: $VERSION.citus|g' $github_repo_name.spec`;
7474
`sed -i 's|^Source0:.*|Source0: https:\/\/github.com\/citusdata\/$github_repo_name\/archive\/v$VERSION.tar.gz|g' $github_repo_name.spec`;
7575
`sed -i 's|^%changelog|%changelog\\n* $abbr_day[$wday] $abbr_mon[$mon] $mday $year - $git_name <$microsoft_email> $VERSION.citus-1\\n- Update to $log_repo_name $VERSION\\n|g' $github_repo_name.spec`;
7676
}
77-
if ( $DISTRO_VERSION eq "debian" || $DISTRO_VERSION eq "microsoft") {
77+
if ( $DISTRO_VERSION eq "debian" || $DISTRO_VERSION eq "microsoft" || $DISTRO_VERSION eq "all") {
7878
open( DEB_CLOG_FILE, "<./debian/changelog" ) || die "Debian changelog file not found";
7979
my @lines = <DEB_CLOG_FILE>;
8080
close(DEB_CLOG_FILE);

packaging/citus_package

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ foreach my $platform (@platforms) {
371371
"GITHUB_TOKEN",
372372
'-e',
373373
"PACKAGE_ENCRYPTION_KEY",
374+
'-e',
375+
"UNENCRYPTED_PACKAGE",
374376
"citus/packaging:$docker_platform-$pg",
375377
$build_type
376378
);

travis/build_new_nightly

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ stderr=2
99
badusage=64
1010

1111
latestpg="10"
12-
pkgflavor="${TRAVIS_BRANCH%%-*}"
12+
if [ "${TARGET_PLATFORM:-}" = "" ]; then
13+
echo TARGET_PLATFORM must be set
14+
exit $badusage
15+
fi
16+
17+
PLATFORM_TYPE="${TARGET_PLATFORM%%/*}"
1318
pkgauth="${PACKAGECLOUD_API_TOKEN}:"
1419
hubauth="Authorization: token ${GITHUB_TOKEN}"
1520

@@ -24,13 +29,13 @@ releasepg="${releasepg:-9.6,10}"
2429
nightlypg="${nightlypg:-${releasepg}}"
2530
latestpg=$(echo "${nightlypg}" | tr ',' '\n' | sort -t. -k1,1n -k2,2n | tail -n1)
2631

27-
case "${pkgflavor}" in
28-
debian)
32+
case "${PLATFORM_TYPE}" in
33+
debian|ubuntu)
2934
pkgflavor='deb'
3035
pkgfull="postgresql-${latestpg}-${pkgname}"
3136
pkgarch="amd64"
3237
;;
33-
redhat)
38+
el|ol)
3439
pkgflavor='rpm'
3540
pkgfull="${pkgname}_${latestpg//./}"
3641
pkgarch="x86_64"

travis/build_new_release

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ stderr=2
99
badusage=64
1010
noservice=69
1111

12-
pkgflavor="${TRAVIS_BRANCH%%-*}"
12+
if [ "${TARGET_PLATFORM:-}" = "" ]; then
13+
echo TARGET_PLATFORM must be set
14+
exit $badusage
15+
fi
16+
17+
PLATFORM_TYPE="${TARGET_PLATFORM%%/*}"
1318
pkgauth="${PACKAGECLOUD_API_TOKEN}:"
1419

1520
# populate variables from packaging metadata file
@@ -21,12 +26,12 @@ declare pkglatest # to make shellcheck happy
2126
hubproj="${hubproj:-${pkgname}}"
2227
nightlyref="${nightlyref:-master}"
2328
releasepg="${releasepg:-9.6,10}"
24-
nightlypg="${nightlypg:-${releasepg}}"
29+
nightlypg="${nightlypg:-}"
2530
latestpg=$(echo "${releasepg}" | tr ',' '\n' | sort -t. -k1,1n -k2,2n | tail -n1)
2631
versioning="${versioning:-simple}"
2732

28-
case "${pkgflavor}" in
29-
debian)
33+
case "${PLATFORM_TYPE}" in
34+
debian|ubuntu)
3035
pkgflavor='deb'
3136
pkgfull="postgresql-${latestpg}-${pkgname}"
3237

@@ -39,7 +44,7 @@ case "${pkgflavor}" in
3944
pkgarch="amd64"
4045
jqfilter='map(.version + "-" + .release)'
4146
;;
42-
redhat)
47+
el|ol)
4348
pkgflavor='rpm'
4449

4550
# add minor/major version to package name if using fancy versioning

0 commit comments

Comments
 (0)