Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version(): The system shall update the Dockerfile #69

Merged
merged 1 commit into from
May 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions bashlava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,33 @@ FEATURES P1 ____________________________________________________________________

TODO

## Update release()
## Update version(): Fixing regex

- When release(), open the page : github.com/firepress-org/bashlava/releases
- The Dockerfile and ".bl_override.sh" should be correctly updated by the system.
- Only the variable ARG VERSION in the Dockerfile needs to be updated, while other variables such as ARG GHOST_CLI_VERSION and ARG NODE_VERSION should remain unchanged.
- Impacts: #8 UX 🎛️
- Impacts: #10 Logic & Condition 🧠

TODO
FEAT: Qobuz ... je me questionne si je le gere dans bashlava ou ailleurs.

TODO
Faire une liste rapid tde toutes les Fct dans `utilities`
le but est de listé toutes mes scripts tel que qobuz, youtube, nas_sync, etc
## New Feat: Core_Check_Path_Is_Root

- Core_Check_Path_Is_Root checks if the user is at the same level as the directory ".git" which is at the root of every git repo.

## Problem

- I discovered while working on the previous version() issue, that the user (me) a user made process mistake.
- The user under sub_directory (v5). Here was trying to update the versions projet on thing were broken.
- basalava works at the root of a git repo.
- Impacts: #8 UX 🎛️
- Impacts: #10 Logic & Condition 🧠
- Impacts: #11 docs 🧵
- Impacts: #9 Bugfix 🧨
- Impacts: #4 TO-DO & backlog 💪

TODO
v() is still not slick while pusing firepress/ghostfire.
The system shall update the "Dockerfile" and ".bl_override.sh"
Faire une liste rapide de toutes les Fct dans `utilities`
le but est de listé toutes mes scripts tel que qobuz, youtube, nas_sync, etc

TODO
Create a GHA that will create an issue every mounth as a task reminder.
Expand Down Expand Up @@ -340,14 +352,14 @@ function version { # User_

### Update version in Dockerfile
if [[ "${_file_do_not_exist}" != "true" ]]; then
sed -i '' "s|VERSION=\"[^\"]*\"|VERSION=\"${input_2}\"|" "${_file_path_is}"
sed -i '' "s|ARG VERSION=\"[^\"]*\"|ARG VERSION=\"${input_2}\"|" "${_file_path_is}"
elif [[ "${_file_do_not_exist}" == "true" ]]; then
echo "No Dockerfile, lets continue" > /dev/null 2>&1
else
my_message="FATAL: (_file_do_not_exist)" && Print_Fatal
fi

# See FLAG 902
### Update version in .bl_override.sh
_file_is=${_where_to_save_version} _file_path_is="$(pwd)/${_file_is}" && Condition_File_Must_Be_Present
sed -i '' "s/^APP_VERSION=.*$/APP_VERSION=\"${input_2}\"/" "${_file_path_is}"

Expand Down Expand Up @@ -1195,7 +1207,7 @@ function Core_Show_Env_Vars {

my_message="Check env_vars from config:" && Print_Blue
echo
echo "OVERRIDE_CONFIG_FILE_NAME_IS > ${OVERRIDE_CONFIG_FILE_NAME_IS}"
echo "OVERRIDE_CONFIG_FILE_NAME_IS > ${OVERRIDE_CONFIG_FILE_NAME_IS}"
echo
echo "APP_NAME > ${APP_NAME}"
echo "GITHUB_USER > ${GITHUB_USER}"
Expand Down Expand Up @@ -1328,7 +1340,6 @@ function Core_Load_Config_Override {
if [[ -f "$(pwd)/${OVERRIDE_CONFIG_FILE_NAME_IS}" ]]; then
source "${OVERRIDE_CONFIG_FILE_NAME_IS}"
_where_to_save_version="${OVERRIDE_CONFIG_FILE_NAME_IS}"

elif [[ ! -f "$(pwd)/${OVERRIDE_CONFIG_FILE_NAME_IS}" ]]; then
my_message="WARNING: Config file (${OVERRIDE_CONFIG_FILE_NAME_IS}) is not configured." && Print_Warning
my_message="See README for installation details." && Print_Warning & sleep 2
Expand Down