1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 APP_NAME?=arvados-workbench2
7 # GIT_TAG is the last tagged stable release (i.e. 1.2.0)
8 GIT_TAG?=$(shell git describe --abbrev=0)
10 # TS_GIT is the timestamp in the current directory (i.e. 1528815021).
11 # Note that it will only change if files change.
12 TS_GIT?=$(shell git log -n1 --first-parent "--format=format:%ct" .)
14 # DATE_FROM_TS_GIT is the human(ish)-readable version of TS_GIT
15 # 1528815021 -> 20180612145021
16 DATE_FROM_TS_GIT?=$(shell date -ud @$(TS_GIT) +%Y%m%d%H%M%S)
18 # VERSION uses all the above to produce X.Y.Z.timestamp
19 # something in the lines of 1.2.0.20180612145021, this will be the package version
20 # it can be overwritten when invoking make as in make packages VERSION=1.2.0
21 VERSION?=$(GIT_TAG).$(DATE_FROM_TS_GIT)
23 # ITERATION is the package iteration, intended for manual change if anything non-code related
24 # changes in the package. (i.e. example config files externally added
27 DESCRIPTION=Arvados Workbench2 - Arvados is a free and open source platform for big data science.
28 MAINTAINER=Ward Vandewege <wvandewege@veritasgenetics.com>
30 # DEST_DIR will have the build package copied.
31 DEST_DIR=/var/www/arvados-workbench2/workbench2/
34 DEB_FILE=$(APP_NAME)_$(VERSION)-$(ITERATION)_amd64.deb
37 RPM_FILE=$(APP_NAME)_$(VERSION)-$(ITERATION).x86_64.rpm
39 export WORKSPACE?=$(shell pwd)
41 .PHONY: help clean* yarn-install test build packages packages-with-version
45 @echo >&2 "There is no default make target here. Did you mean 'make test'?"
47 @echo >&2 "More info:"
48 @echo >&2 " Installing --> http://doc.arvados.org/install"
49 @echo >&2 " Developing/contributing --> https://dev.arvados.org"
50 @echo >&2 " Project home --> https://arvados.org"
55 rm -f $(WORKSPACE)/*.deb
58 rm -f $(WORKSPACE)/*.rpm
61 rm -rf $(WORKSPACE)/node_modules
63 clean: clean-rpm clean-deb clean-node-modules
69 yarn test --no-watchAll --bail --ci
80 --iteration "$(ITERATION)" \
81 --maintainer="$(MAINTAINER)" \
82 --description="$(DESCRIPTION)" \
83 --deb-no-default-config-files \
84 $(WORKSPACE)/build/=$(DEST_DIR)
92 --iteration "$(ITERATION)" \
93 --maintainer="$(MAINTAINER)" \
94 --description="$(DESCRIPTION)" \
95 $(WORKSPACE)/build/=$(DEST_DIR)
97 # use FPM to create DEB and RPM
98 packages: $(DEB_FILE) $(RPM_FILE)