Skip to content

Commit

Permalink
Feat UX: Use config files and logic overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalandy committed May 17, 2022
1 parent 66a7b61 commit 41c7784
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 287 deletions.
32 changes: 32 additions & 0 deletions .bashlava_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

# .bashlava_env.sh, required by bashlava

### DO NOT update vars directly within .bashlava_env.sh
### Yo must create a new file: .bashlava_env_override.sh
### Override these env_var from .bashlava_env_override.sh
CFG_OVERRIDE_WITH_CUSTOM_CONFIG="true"
CFG_CUSTOM_CONFIG_FILE_NAME=".bashlava_env_override.sh"

### .bashlava_env_override.sh
# APP_NAME="notset"
# GITHUB_USER="notset"
# APP_VERSION="0.0.1"

### BRANCH NAMES
CFG_DEFAULT_BRANCH="main"
CFG_DEFAULT_DEV_BRANCH="edge"
CFG_USER_IS="${USER}"

### FUNCTION OPTIONS
CFG_EDGE_EXTENTED="false" # #edge() not programmed yet.
CFG_LOG_LINE_NBR_SHORT="4" # log() default line number.
CFG_LOG_LINE_NBR_LONG="12" # log() default line number.

### SOURCE /components
#CFG_ARR_COMPONENTS_SCRIPTS
#CFG_ARR_DOCS_MARKDOWN

### DOCKER IMAGES
DOCKER_IMG_FIGLET="devmtl/figlet:1.0"
DOCKER_IMG_GLOW="devmtl/glow:1.4.1"
8 changes: 8 additions & 0 deletions .bashlava_env_override.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# .bashlava_env_override.sh required by bashlava
# part of .gitignore

APP_NAME="bashlava"
GITHUB_USER="firepress-org"
APP_VERSION="1.43.0"
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
private
.bashlava_env_*
.cache
coverage
dist
node_modules
npm-debug
.git
.git
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# .gitignore
# Specific to bashlava
############
private
config_custom.sh
.bashlava_env_*

# .gitignore
############
.env
.cache
node_modules
Expand Down
13 changes: 8 additions & 5 deletions Dockerfile → Dockerfile_template
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
# REQUIRED for Github Action CI template https://github.com/firepress-org/ghostfire/tree/master/.github/workflows
###################################

ARG APP_NAME="bashlava"
ARG VERSION="1.43.0"
ARG GITHUB_USER="firepress-org"
ARG DOCKERHUB_USER="devmtl"
ARG GITHUB_REGISTRY="registry"
ARG APP_NAME="notset"
ARG VERSION="notset"
ARG RELEASE="notset"
ARG GITHUB_USER="notset"
ARG GITHUB_ORG="notset"
ARG DOCKERHUB_USER="notset"
ARG GITHUB_REGISTRY="notset"

###################################
# Start you Dockerfile from here (if any)
###################################

Loading

0 comments on commit 41c7784

Please sign in to comment.