Commit 12a54b5e authored by Ralf Jung's avatar Ralf Jung

be bold about colors

parent 3f640cbd
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
DARKGRAY='0;30' DARKGRAY='0;30'
RED='0;31' RED='0;31'
LIGHTRED='1;31' BOLDRED='1;31'
GREEN='0;32' GREEN='0;32'
YELLOW='1;33' BOLDGREEN='1;32'
YELLOW='0;33'
BOLDYELLOW='1;33'
BLUE='0;34' BLUE='0;34'
BOLDBLUE='1;34'
PURPLE='0;35' PURPLE='0;35'
LIGHTPURPLE='1;35' BOLDPURPLE='1;35'
CYAN='0;36' CYAN='0;36'
WHITE='1;37' WHITE='1;37'
......
...@@ -18,15 +18,15 @@ set -e ...@@ -18,15 +18,15 @@ set -e
env | egrep '^(CI_BUILD_REF|CI_RUNNER)' > build-env.txt env | egrep '^(CI_BUILD_REF|CI_RUNNER)' > build-env.txt
# Build # Build
echo_color "$GREEN" "[buildjob] Perfoming build" echo_color "$BOLDGREEN" "[buildjob] Perfoming build"
time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt time make -k -j$CPU_CORES TIMED=y 2>&1 | tee build-log.txt
if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi
echo_color "$GREEN" "[buildjob] Build time summary" echo_color "$BOLDGREEN" "[buildjob] Build time summary"
cat build-log.txt | egrep "[a-zA-Z0-9_/-]+ \((real|user): [0-9]" | tee build-time.txt cat build-log.txt | egrep "[a-zA-Z0-9_/-]+ \((real|user): [0-9]" | tee build-time.txt
# maybe validate # maybe validate
if [[ -n "$VALIDATE" ]]; then if [[ -n "$VALIDATE" ]]; then
echo_color "$GREEN" "[buildjob] Performing validation" echo_color "$BOLDGREEN" "[buildjob] Performing validation"
make validate; make validate;
fi fi
...@@ -35,7 +35,7 @@ if [[ -z "$OPAM_PKG_BRANCH" ]]; then ...@@ -35,7 +35,7 @@ if [[ -z "$OPAM_PKG_BRANCH" ]]; then
OPAM_PKG_BRANCH=master OPAM_PKG_BRANCH=master
fi fi
if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == "$OPAM_PKG_BRANCH" ]]; then if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == "$OPAM_PKG_BRANCH" ]]; then
echo_color "$GREEN" "[buildjob] Releasing package on opam" echo_color "$BOLDGREEN" "[buildjob] Releasing package on opam"
# determine package name prefix # determine package name prefix
if [[ "$CI_COMMIT_REF_NAME" == master ]]; then if [[ "$CI_COMMIT_REF_NAME" == master ]]; then
OPAM_PKG_PREFIX=dev OPAM_PKG_PREFIX=dev
......
...@@ -7,9 +7,9 @@ export OPAM_EDITOR="$(which false)" ...@@ -7,9 +7,9 @@ export OPAM_EDITOR="$(which false)"
# Make sure we got a good OPAM. # Make sure we got a good OPAM.
if test -d "$OPAMROOT"; then if test -d "$OPAMROOT"; then
echo_color "$GREEN" "[prepare-opam] Re-using cached opam root" echo_color "$BOLDGREEN" "[prepare-opam] Re-using cached opam root"
else else
echo_color "$YELLOW" "[prepare-opam] Creating new opam root" echo_color "$BOLDYELLOW" "[prepare-opam] Creating new opam root"
mkdir "$OPAMROOT" mkdir "$OPAMROOT"
opam init --no-setup -y opam init --no-setup -y
fi fi
...@@ -39,7 +39,7 @@ echo ...@@ -39,7 +39,7 @@ echo
# that is not currently possible. # that is not currently possible.
# Install fixed versions of some dependencies. # Install fixed versions of some dependencies.
echo_color "$GREEN" "[prepare-opam] Processing pins" echo_color "$BOLDGREEN" "[prepare-opam] Processing pins"
while (( "$#" )); do # while there are arguments left while (( "$#" )); do # while there are arguments left
PACKAGE="$1" ; shift PACKAGE="$1" ; shift
KIND="$1" ; shift KIND="$1" ; shift
...@@ -48,21 +48,21 @@ while (( "$#" )); do # while there are arguments left ...@@ -48,21 +48,21 @@ while (( "$#" )); do # while there are arguments left
# Check if the pin is already set # Check if the pin is already set
read -a PIN <<< $(opam pin list | (egrep "^$PACKAGE[. ]")) read -a PIN <<< $(opam pin list | (egrep "^$PACKAGE[. ]"))
if [[ "${PIN[1]}" == "$KIND" && "${PIN[2]}" == "$VERSION" ]]; then if [[ "${PIN[1]}" == "$KIND" && "${PIN[2]}" == "$VERSION" ]]; then
echo_color "$GREEN" "[prepare-opam] $PACKAGE already $KIND-pinned to $VERSION" echo_color "$BOLDGREEN" "[prepare-opam] $PACKAGE already $KIND-pinned to $VERSION"
else else
echo_color "$YELLOW" "[prepare-opam] $KIND-pinning $PACKAGE to $VERSION" echo_color "$BOLDYELLOW" "[prepare-opam] $KIND-pinning $PACKAGE to $VERSION"
opam pin add -y -k "$KIND" "$PACKAGE" "$VERSION" opam pin add -y -k "$KIND" "$PACKAGE" "$VERSION"
fi fi
done done
echo echo
# Upgrade cached things. # Upgrade cached things.
echo_color "$GREEN" "[prepare-opam] Upgrading opam" echo_color "$BOLDGREEN" "[prepare-opam] Upgrading opam"
opam upgrade -y --fixup && opam upgrade -y opam upgrade -y --fixup && opam upgrade -y
echo echo
# Install build-dependencies. # Install build-dependencies.
echo_color "$GREEN" "[prepare-opam] Installing build-dependencies" echo_color "$BOLDGREEN" "[prepare-opam] Installing build-dependencies"
make build-dep OPAMFLAGS=-y make build-dep OPAMFLAGS=-y
echo echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment