Skip to content

Commit

Permalink
deb fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarbieru committed Mar 15, 2023
1 parent 32ac880 commit e0ad207
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
20 changes: 15 additions & 5 deletions build/package/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,27 @@ mkdir -p ${TARGET_DST}
mkdir -p ${TARGET_DST}/src
mkdir -p ${TARGET_DST}/config


#
# copy application files
#
echo "Copying application files"
cp -R ${REPO_SRC}/index.js ${TARGET_DST}/index.js
cp -R ${REPO_SRC}/package.json ${TARGET_DST}/package.json
cp -R ${REPO_SRC}/readme.md ${TARGET_DST}/readme.md
cp -R ${REPO_SRC}/LICENSE ${TARGET_DST}/LICENSE
cp -R ${REPO_SRC}/src/* ${TARGET_DST}/src
cp -R ${REPO_SRC}/index.js ${TARGET_DST}/index.js
cp -R ${REPO_SRC}/package.json ${TARGET_DST}/package.json
cp -R ${REPO_SRC}/package-lock.json ${TARGET_DST}/package-lock.json
cp -R ${REPO_SRC}/readme.md ${TARGET_DST}/readme.md
cp -R ${REPO_SRC}/LICENSE ${TARGET_DST}/LICENSE
cp -R ${REPO_SRC}/src/* ${TARGET_DST}/src
cp -R ${REPO_SRC}/config/default.json ${TARGET_DST}/config/default.json


#
# install node modules
#
echo "Pulling dependencies"
(cd ${TARGET_DST} && npm ci)


#
# copy systemd services
#
Expand Down
2 changes: 1 addition & 1 deletion build/package/deb/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: vagrant-private-cloud
Version: 1.3.0
Version: 1.3.1
Section: web
Priority: optional
Architecture: all
Expand Down
4 changes: 1 addition & 3 deletions build/package/deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ case "${OP}" in
if [ ! -d ${BASE_DIR}/storage ]; then
mkdir -p ${BASE_DIR}/storage
fi
npm install --quiet --only=prod --prefix "${BASE_DIR}"
adduser --system --no-create-home --group vagrant
adduser --system --no-create-home --group vagrant || true
usermod -a -G syslog vagrant
chown vagrant:vagrant ${BASE_DIR} -R
systemctl enable "${SERVICE_NAME}" >/dev/null || true
Expand All @@ -33,7 +32,6 @@ case "${OP}" in
if [ ! -d ${BASE_DIR}/storage ]; then
mkdir -p ${BASE_DIR}/storage
fi
npm update --quiet --only=prod --prefix "${BASE_DIR}"
chown vagrant:vagrant ${BASE_DIR} -R
systemctl --system daemon-reload > /dev/null || true
systemctl restart "${SERVICE_NAME}" || log "Failed to restart ${SERVICE_NAME} service"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vagrant-private-cloud",
"version": "1.3.0",
"version": "1.3.1",
"description": "Private (Atlas) Cloud for Vagrant Boxes",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e0ad207

Please sign in to comment.