forked from RackHD/on-http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHWIMO-BUILD
executable file
·45 lines (34 loc) · 1.08 KB
/
HWIMO-BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Copyright 2015, 2016, EMC, Inc.
# debian packages expected...
# apt-get install git pbuilder dh-make ubuntu-dev-tools devscripts
# apt-get install nodejs nodejs-legacy npm
set -e
set -x
rm -rf packagebuild
git clone . packagebuild
pushd packagebuild
cp ../package.json .
rsync -ar ../debianstatic/on-http/ debian
rm -rf node_modules
npm install
npm run apidoc
# The following is a workaround for a bug in npm 1.3.10 where
# prune --production removes the redfish-node module which is needed.
# We are replacing "npm prune --production with a fresh
# "npm install --production"
rm -rf node_modules
npm install --production
git log -n 1 --pretty=format:%h.%ai.%s > commitstring.txt
GITCOMMITDATE=$(git show -s --pretty="format:%ci")
DATESTRING=$(date -d "$GITCOMMITDATE" -u +"%Y-%m-%d-%H%M%SZ")
PKG_VERSION="$DATESTRING"
if [ -n "$BUILD_NUMBER" ]
then
PKG_VERSION="${PKG_VERSION}-${BUILD_NUMBER}"
fi
export DEBEMAIL="hwimo robots <[email protected]>"
export DEBFULLNAME="The HWIMO Robots"
dch -v ${PKG_VERSION} autobuild
debuild --no-lintian --no-tgz-check -us -uc
popd