Skip to content

Commit

Permalink
Use tags as base of versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
sodre committed Oct 8, 2017
1 parent 072bedf commit 7bf4b15
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
*.parcel
csd/images/icon.png

# Release and intermediates
release
NIFI-*
# Remote binaries
nifi-*.tar.gz

Expand All @@ -10,6 +13,5 @@ nifi-*.tar.gz
# Tools
ghr
gh-release
make_manifest.py
release
validator.jar
make_manifest.py
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ CSD_VERSION=0.0.1
#DISTROS=el6 el7 trusty wheezy
DISTROS=el7

VERSION:=$(shell git describe --tags | sed -e 's/^v//')
NIFI_VERSION=$(shell echo $(VERSION) | sed -e 's/-.*$$//')
BUILD_NUMBER=$(shell echo $(VERSION) | sed -e 's/^.*-//')
TAG:=$(shell git describe --tags | sed -e 's/^v//')
NIFI_VERSION=$(shell echo $(TAG) | sed -e 's/-.*$$//')
BUILD_NUMBER=$(shell echo $(TAG) | sed -e 's/^.*-//')
VERSION:=$(NIFI_VERSION)-$(BUILD_NUMBER)

PARCELS=$(foreach DISTRO,$(DISTROS),NIFI-$(VERSION)-$(DISTRO).parcel)

Expand All @@ -17,18 +18,19 @@ PARCELS=$(foreach DISTRO,$(DISTROS),NIFI-$(VERSION)-$(DISTRO).parcel)
all: info release

info:
@echo 'Parcel version: $(VERSION)'
@[ ! -z $(VERSION) ]
@echo ' Git Tag: $(TAG)'
@[ ! -z $(TAG) ]
@echo ' NiFi version: $(NIFI_VERSION)'
@echo ' Build number: $(BUILD_NUMBER)'
@echo 'Parcel version: $(VERSION)'
@echo ' Parcels: $(PARCELS)'

clean:
rm -rf release NIFI-$(VERSION) NIFI-$(VERSION).parcel

release: release/manifest.json
release: $(foreach PARCEL,$(PARCELS),%/$(PARCEL)) release/manifest.json

%/manifest.json: $(foreach PARCEL,$(PARCELS),%/$(PARCEL)) make_manifest.py
%/manifest.json: make_manifest.py
mkdir -p $(shell dirname $@)
python make_manifest.py $(shell dirname $@)

Expand Down Expand Up @@ -69,10 +71,10 @@ gh-release:

validator.jar:
cd tools/cm_ext && mvn install && cd -
ln -s tools/cm_ext/validator/target/validator.jar .
ln tools/cm_ext/validator/target/validator.jar .

make_manifest.py:
ln -s tools/cm_ext/make_manifest/make_manifest.py
ln tools/cm_ext/make_manifest/make_manifest.py

nifi-$(NIFI_VERSION)-bin.tar.gz: nifi-$(NIFI_VERSION)-bin.tar.gz-SHA256
wget http://apache.claz.org/nifi/$(NIFI_VERSION)/nifi-$(NIFI_VERSION)-bin.tar.gz
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# nifi-cdh
nifi-cdh is a CDH5.x parcel and CSD for Apache's NiFi system.
nifi-cdh is a CDH5.x parcel for Apache's NiFi system.

## Requirements

Expand All @@ -11,4 +11,7 @@ nifi-cdh is a CDH5.x parcel and CSD for Apache's NiFi system.

## Build Instructions

$ make
1. Create a new tag
2. Run `make`

## Travis

0 comments on commit 7bf4b15

Please sign in to comment.