<commit_before>#
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
#
# Makefile: basic Makefile for template API service
#
# This Makefile is a template for new repos. It contains only repo-specific
# logic and uses included makefiles to supply common targets (javascriptlint,
# jsstyle, restdown, etc.), which are used by other repos as well. You may well
# need to rewrite most of this file, but you shouldn't need to touch the
# included makefiles.
#
# If you find yourself adding support for new targets that could be useful for
# other projects too, you should add these to the original versions of the
# included Makefiles (in eng.git) so that other teams can use them too.
#

#
# Tools
#
NODE            := node
NPM		:= npm
TAP		:= ./node_modules/.bin/tap
TAR = tar
UNAME := $(shell uname)

ifeq ($(UNAME), SunOS)
	TAR = gtar
endif

#
# Files
#
CFG_FILE         = etc/cloudapi.coal.cfg
DOC_FILES	 = index.restdown
JS_FILES	:= $(shell find lib -name '*.js')
JSL_CONF_NODE	 = tools/jsl.node.conf
JSL_FILES_NODE   = main.js $(JS_FILES)
JSSTYLE_FLAGS    = -f tools/jsstyle.conf
JSSTYLE_FILES	 = $(JS_FILES)
SMF_MANIFESTS	 = smf/manifests/cloudapi.xml

#
# Variables
#

ROOT                    := $(shell pwd)
TIMESTAMP               := $(shell date -u "+%Y%m%dT%H%M%SZ")

CLOUDAPI_VERSION        := $(shell git symbolic-ref HEAD | \
	         awk -F / '{print $$3}')-$(TIMESTAMP)-g$(shell \
                 git describe --all --long | awk -F '-g' '{print $$NF}')

RELEASE_TARBALL         = cloudapi-pkg-$(CLOUDAPI_VERSION).tar.bz2
TMPDIR                  = /tmp/$(CLOUDAPI_VERSION)

#<commit_msg>PUBAPI-376: Fix cloudapi + MG build: cloudapi not using given TIMESTAMP<commit_after>#
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
#
# Makefile: basic Makefile for template API service
#
# This Makefile is a template for new repos. It contains only repo-specific
# logic and uses included makefiles to supply common targets (javascriptlint,
# jsstyle, restdown, etc.), which are used by other repos as well. You may well
# need to rewrite most of this file, but you shouldn't need to touch the
# included makefiles.
#
# If you find yourself adding support for new targets that could be useful for
# other projects too, you should add these to the original versions of the
# included Makefiles (in eng.git) so that other teams can use them too.
#

#
# Tools
#
NODE            := node
NPM		:= npm
TAP		:= ./node_modules/.bin/tap
TAR = tar
UNAME := $(shell uname)

ifeq ($(UNAME), SunOS)
	TAR = gtar
endif

#
# Files
#
CFG_FILE         = etc/cloudapi.coal.cfg
DOC_FILES	 = index.restdown
JS_FILES	:= $(shell find lib -name '*.js')
JSL_CONF_NODE	 = tools/jsl.node.conf
JSL_FILES_NODE   = main.js $(JS_FILES)
JSSTYLE_FLAGS    = -f tools/jsstyle.conf
JSSTYLE_FILES	 = $(JS_FILES)
SMF_MANIFESTS	 = smf/manifests/cloudapi.xml

#
# Variables
#

# Mountain Gorilla-spec'd versioning.
# Need GNU awk for multi-char arg to "-F".
AWK := $(shell (which gawk 2>/dev/null | grep -v "^no ") || (which nawk 2>/dev/null | grep -v "^no ") || which awk)
BRANCH := $(shell git symbolic-ref HEAD | $(AWK) -F/ '{print $$3}')
ifeq ($(TIMESTAMP),)
	TIMESTAMP := $(shell date -u "+%Y%m%dT%H%M%SZ")
endif
GITDESCRIBE := g$(shell git describe --all --long --dirty | $(AWK) -F'-g' '{print $$NF}')
STAMP := $(BRANCH)-$(TIMESTAMP)-$(GITDESCRIBE)

ROOT                    := $(shell pwd)
RELEASE_TARBALL         := cloudapi-pkg-$(STAMP).tar.bz2
TMPDIR                  := /tmp/$(STAMP)


#
{'fraction_non_alphanumeric': 0.12751871042026483, 'fraction_numerical': 0.00489349453080023, 'mean_word_length': 3.1766826923076925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4237802', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1172, 'n_words': 401}