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 # NIGHTLY_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 NIGHTLY_VERSION?=$(GIT_TAG).$(DATE_FROM_TS_GIT)
22 # ITERATION is the package iteration, intended for manual change if anything non-code related
23 # changes in the package. (i.e. example config files externally added
26 DESCRIPTION=Arvados Workbench2 - Arvados is a free and open source platform for big data science.
27 MAINTAINER=Ward Vandewege <wvandewege@veritasgenetics.com>
29 # DEST_DIR will have the build package copied.
30 DEST_DIR=/var/www/arvados-workbench2/workbench2/
32 export WORKSPACE?=$(shell pwd)
34 .PHONY: help clean* yarn-install test build packages packages-with-version
38 @echo >&2 "There is no default make target here. Did you mean 'make test'?"
40 @echo >&2 "More info:"
41 @echo >&2 " Installing --> http://doc.arvados.org/install"
42 @echo >&2 " Developing/contributing --> https://dev.arvados.org"
43 @echo >&2 " Project home --> https://arvados.org"
48 rm -f $(WORKSPACE)/*.deb
51 rm -f $(WORKSPACE)/*.rpm
54 rm -rf $(WORKSPACE)/node_modules
56 clean: clean-rpm clean-deb clean-node-modules
62 yarn test --no-watchAll --bail --ci
64 build: yarn-install test
67 # use FPM to create DEB and RPM with a version (usually triggered from CI to make a release)
68 packages-with-version: build
74 --iteration "$(ITERATION)" \
75 --maintainer="$(MAINTAINER)" \
76 --description="$(DESCRIPTION)" \
77 --deb-no-default-config-files \
78 $(WORKSPACE)/build/=DEST_DIR
84 --iteration "$(ITERATION)" \
85 --maintainer="$(MAINTAINER)" \
86 --description="$(DESCRIPTION)" \
87 $(WORKSPACE)/build/=DEST_DIR
89 # use FPM to create DEB and RPM
95 -v "$(NIGHTLY_VERSION)" \
96 --iteration "$(ITERATION)" \
97 --maintainer="$(MAINTAINER)" \
98 --description="$(DESCRIPTION)" \
99 --deb-no-default-config-files \
100 $(WORKSPACE)/build/=DEST_DIR
105 -v "$(NIGHTLY_VERSION)" \
106 --iteration "$(ITERATION)" \
107 --maintainer="$(MAINTAINER)" \
108 --description="$(DESCRIPTION)" \
109 $(WORKSPACE)/build/=DEST_DIR