forked from hal/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnapshot.sh
More file actions
executable file
·37 lines (32 loc) · 896 Bytes
/
Copy pathsnapshot.sh
File metadata and controls
executable file
·37 lines (32 loc) · 896 Bytes
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
#!/bin/bash
# Script to build and deploy a snapshot version.
#
# Prerequisites
# - Clean git status (no uncommitted changes)
# - Docker is up and running
#
# What it does
# 1. Build and deploy w/ profiles docker, prod, and theme-hal
ROOT=$PWD
BRANCH=$(git symbolic-ref -q HEAD)
BRANCH=${BRANCH##refs/heads/}
BRANCH=${BRANCH:-HEAD}
# Prerequisites
if ! git diff --no-ext-diff --quiet --exit-code; then
echo "You have uncommitted changes in the current branch."
exit -1
fi
if ! docker info > /dev/null 2>&1; then
echo "Docker not running. Please start docker before running this script."
exit -1
fi
# Deploying console
mvn clean deploy -P docker,prod,theme-hal
echo
echo
echo "+-----------------------------+"
echo "| |"
echo "| HAL successfully deployed |"
echo "| |"
echo "+-----------------------------+"
echo