Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmp85 committed May 13, 2016
2 parents a361b01 + 3768b0d commit 7d7ce3a
Show file tree
Hide file tree
Showing 10 changed files with 423 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# = Project-Specific =
# ====================

# generate man pages
# generated man pages
*.1
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### citustools v0.2.0 (May 13, 2016) ###

* Adds wrapper to simplify generating OS packages for Citus projects

* Some perlcritic and perltidy cleanup here and there

### citustools v0.1.0 (February 16, 2016) ###

* Initial release
Expand Down
28 changes: 28 additions & 0 deletions HomebrewFormula/citustools.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class Docker < Requirement
fatal true
default_formula "docker"

satisfy { which "docker" }

def message
"Docker is required for this package."
end
end

class Citustools < Formula
desc "Tools and config used in Citus Data projects."
homepage "https://github.com/citusdata/tools"
url "https://github.com/citusdata/tools/archive/v0.1.0.tar.gz"
sha256 "dc773c21989aa4d716b653ed7542d333f63f14a10d470f9a24fe12fac836b262"

depends_on "uncrustify"
depends_on Docker

def install
system "make", "install", "prefix=#{prefix}", "sysconfdir=#{etc}"
end

test do
system "true"
end
end
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export sysconfdir := $(prefix)/etc
export pkgsysconfdir := $(sysconfdir)/$(PACKAGE_NAME)

# logic from http://stackoverflow.com/a/11206700
SUBDIRS := $(addsuffix /., uncrustify)
SUBDIRS := $(addsuffix /., packaging uncrustify)
TARGETS := all clean install
SUBDIRS_TARGETS := $(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS)))

Expand Down
27 changes: 27 additions & 0 deletions packaging/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# needed variables will be passed in via top-level Makefile

INSTALL := install -c
INSTALL_DATA := $(INSTALL) -m 644
INSTALL_SCRIPT := $(INSTALL) -m 755

POD2MAN := pod2man --center "Citus Data Tools" -r "Citus Data"
MANPAGES := citus_package.1

all: man

man: $(MANPAGES)

%.1: %
$(POD2MAN) --quotes=none --section 1 $< $@

clean:
rm -f *.1

installdirs:
$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(mandir)/man1

install: all installdirs
$(INSTALL_SCRIPT) citus_package $(DESTDIR)$(bindir)
$(INSTALL_DATA) $(MANPAGES) $(DESTDIR)$(mandir)/man1

.PHONY: all man clean installdirs install
15 changes: 15 additions & 0 deletions packaging/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Packaging

`citus_package` encapsulates complex packaging logic to ensure team members can easily build release, nightly, and custom packages for any Citus project on any supported OS. Under the hood, it's using [Docker][1] to guarantee some level of repeatability.

## Getting Started

`citus_package` requires `docker` v1.10 or greater.

`make install` to install the script and a man page. `man citus_package` for more details.

## Usage

Ensure your `GITHUB_TOKEN` environment variable is properly set (see the man page if you're not sure how to do that). Make sure Docker is running, then you're off to the races! For example, build a `citus` nightly on CentOS 7, Debian Jessie and Ubuntu Xenial like so: `citus_package -p el/7 -p debian/jessie -p ubuntu/xenial citus nightly`

[1]: https://www.docker.com
Loading

0 comments on commit 7d7ce3a

Please sign in to comment.