hammer

command module
v0.0.0-...-b371572 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

README

Hammer

Build Status Documentation Status

Hammer takes YAML specs and uses them to build packages (with FPM.) Here's a pretty minimal example, please see the docs for more information.

---
name: consul-cli
version: 0.1.1
license: APL 2.0
iteration: 2
vendor: Cisco
url: https://github.com/CiscoCloud/consul-cli
architecture: x86_64
description: Command line interface to Consul HTTP API
type: rpm
obsoletes:
  - consul-utils

resources:
  - url: https://github.com/CiscoCloud/consul-cli/releases/download/v{{.Version}}/consul-cli_{{.Version}}_linux_amd64.tar.gz
    hash-type: sha256
    hash: 1bc31fa70a9508a2c302bbdbd3073601bcad82694af8370d968c69c32471ee7f

targets:
  - src: '{{.BuildRoot}}/consul-cli_{{.Version}}_linux_amd64/consul-cli'
    dest: /usr/bin/

scripts:
  build: |
    tar -xzvf consul-cli_{{.Version}}_linux_amd64.tar.gz

extra-args: |
  --rpm-os linux

When saved as spec.yml in some folder, Hammer will find and execute it, producing a package. Most fields are templated, and you can use Go templates to get fields on the Package struct.

Installation

First, you'll need to get FPM (which should just be gem install fpm) and any build tools you need (for example, to build RPMs you'll need rpmbuild.) Then, go install github.com/asteris-llc/hammer.

Contributing

Got a feature you'd like to see? PRs are very welcome. Just make sure that your build passes all the checks on gometalinter. Tests are appreciated, as well!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL