babashka/script/uberjar
kloimhardt 7e5d10c084
Add features Ring, Reitit, Selmer (#672)
* modified deps.edn

* start adding ring middleware feature

* project.clj

* ring added

* correct features

* add ring response

* add reitit

* reitit namespace

* replace ring's default-store with GraalVM compatible version

* patch reitit's tri compiler

* patch ring default and response

* set ring and reitit flags in uberjar.bat

* uberjar.bat again

* set ring and reitit features true in uberjat.bat

* amend project.clj

* add ring.middleware.content-type

* add webjars

* add muuntaja

* deps.edn

* add http-response

* extend response

* add response content-type

* remove wrap-reload

* remove ring devel

* add SELMER

* add selmer/render

* add ring.util.request namespace

* Hint to to guestbook2 branch in README

* Hint to guestbook2 branch

* set exe to bb-web

* set artifact name to babashka-web

* set back version to 0.2.2

* set version to 0.2.3

* release version 0.2.2

* clean Readme

* clean readme

* replace babashka standard readme

* list features in readme

* extend readme

* fix uberjar from merge

* fix uberjar.bat from merge

* readme

* null change

* null change 2

* null 3

* zero 4

* zero 5

* zero 6

* Zero 7

* zero 8

* prepare for merge to upstream/master

* further prepare

* prep

* prep for pull

* pull prep 3

* cosmetics

* clean uberjar script

* fix typo in deps.edn

Co-authored-by: kloimhardt <kloimhardt@kloimhardts-MacBook-Air.local>
2020-12-13 22:47:42 +01:00

144 lines
3.6 KiB
Bash
Executable file

#!/usr/bin/env bash
if [ "$GRAALVM_HOME" != "" ]
then
export JAVA_HOME=$GRAALVM_HOME
export PATH=$GRAALVM_HOME/bin:$PATH
fi
java -version
set -eo pipefail
if [ "$BABASHKA_LEAN" = "true" ]
then
# Remove all the default features, unless explicitly set to true:
export BABASHKA_FEATURE_XML="${BABASHKA_FEATURE_XML:-false}"
export BABASHKA_FEATURE_YAML="${BABASHKA_FEATURE_YAML:-false}"
export BABASHKA_FEATURE_CORE_ASYNC="${BABASHKA_FEATURE_CORE_ASYNC:-false}"
export BABASHKA_FEATURE_CSV="${BABASHKA_FEATURE_CSV:-false}"
export BABAHSKA_FEATURE_TRANSIT="${BABAHSKA_FEATURE_TRANSIT:-false}"
export BABASHKA_FEATURE_JAVA_TIME="${BABASHKA_FEATURE_JAVA_TIME:-false}"
export BABASHKA_FEATURE_JAVA_NIO="${BABASHKA_FEATURE_JAVA_NIO:-false}"
export BABASHKA_FEATURE_HTTPKIT_CLIENT="${BABASHKA_FEATURE_HTTPKIT_CLIENT:-false}"
export BABASHKA_FEATURE_HTTPKIT_SERVER="${BABASHKA_FEATURE_HTTPKIT_SERVER:-false}"
fi
BABASHKA_LEIN_PROFILES="+uberjar"
if [ "$BABASHKA_FEATURE_JDBC" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/jdbc"
else
BABASHKA_LEIN_PROFILES+=",-feature/jdbc"
fi
if [ "$BABASHKA_FEATURE_POSTGRESQL" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/postgresql"
else
BABASHKA_LEIN_PROFILES+=",-feature/postgresql"
fi
if [ "$BABASHKA_FEATURE_HSQLDB" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/hsqldb"
else
BABASHKA_LEIN_PROFILES+=",-feature/hsqldb"
fi
if [ "$BABASHKA_FEATURE_ORACLEDB" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/oracledb"
else
BABASHKA_LEIN_PROFILES+=",-feature/oracledb"
fi
if [ "$BABASHKA_FEATURE_XML" != "false" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/xml"
else
BABASHKA_LEIN_PROFILES+=",-feature/xml"
fi
if [ "$BABASHKA_FEATURE_YAML" != "false" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/yaml"
else
BABASHKA_LEIN_PROFILES+=",-feature/yaml"
fi
if [ "$BABASHKA_FEATURE_CORE_ASYNC" != "false" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/core-async"
else
BABASHKA_LEIN_PROFILES+=",-feature/core-async"
fi
if [ "$BABASHKA_FEATURE_CSV" != "false" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/csv"
else
BABASHKA_LEIN_PROFILES+=",-feature/csv"
fi
if [ "$BABASHKA_FEATURE_TRANSIT" != "false" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/transit"
else
BABASHKA_LEIN_PROFILES+=",-feature/transit"
fi
if [ "$BABASHKA_FEATURE_DATASCRIPT" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/datascript"
else
BABASHKA_LEIN_PROFILES+=",-feature/datascript"
fi
if [ "$BABASHKA_FEATURE_HTTPKIT_CLIENT" != "false" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/httpkit-client"
else
BABASHKA_LEIN_PROFILES+=",-feature/httpkit-client"
fi
if [ "$BABASHKA_FEATURE_HTTPKIT_SERVER" != "false" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/httpkit-server"
else
BABASHKA_LEIN_PROFILES+=",-feature/httpkit-server"
fi
if [ "$BABASHKA_FEATURE_RING" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/ring"
else
BABASHKA_LEIN_PROFILES+=",-feature/ring"
fi
if [ "$BABASHKA_FEATURE_REITIT" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/reitit"
else
BABASHKA_LEIN_PROFILES+=",-feature/reitit"
fi
if [ "$BABASHKA_FEATURE_SELMER" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/selmer"
else
BABASHKA_LEIN_PROFILES+=",-feature/selmer"
fi
if [ "$BABASHKA_FEATURE_LANTERNA" = "true" ]
then
BABASHKA_LEIN_PROFILES+=",+feature/lanterna"
else
BABASHKA_LEIN_PROFILES+=",-feature/lanterna"
fi
if [ -z "$BABASHKA_JAR" ]; then
lein with-profiles "$BABASHKA_LEIN_PROFILES,+reflection,-uberjar" do run
lein with-profiles "$BABASHKA_LEIN_PROFILES" do clean, uberjar
fi