2
2
3
3
: '
4
4
// COMMENT BLOCK //
5
- TO-DO comment section. Total of 3
5
+ TO-DO comment section. Total of 4
6
6
7
7
PINNED issues on GH
8
8
#4 TO-DO & backlog 💪
@@ -16,20 +16,31 @@ PINNED issues on GH
16
16
- 0o0o
17
17
- Impacts: 💪 #4, 🎛️ #8, 🧠 #10, 🧵 #11, 🧨 #9
18
18
19
-
20
19
_______________________________________________________________________________________
21
20
_______________________________________________________________________________________
22
21
PRIORITY 1 ____________________________________________________________________________
23
22
23
+ TODO
24
+ ## New Feat: I want fct v to impact Dockerfile
25
+ - In fct v, check if a Dockerfile is present and update version if it exist
26
+ - use flag: _file_do_not_exist
27
+ - Impacts: 💪 #4, 🧠 #10
28
+
29
+ TODO
30
+ ## New Feat: I want fct v to be aware of SUB_DIR (ie Ghost v4 and v5)
31
+ - fct `v` is not updating Dockerfile within SUB_DIR "
32
+ - Need to add a flag: SUB_DIR, default: none
33
+ - In fct v, check if a Dockerfile is present and update version if it exist
34
+ - In fct v, check SUB_DIR flag is present
35
+ - Impacts: 🧠 #10
36
+
37
+
24
38
TODO
25
39
BUG: there is a dir "~" create in every project
40
+ observation in progress 2022-09-24_18h12
26
41
#HOME
27
42
/Users/#USER
28
43
29
- TODO
30
- Manage SUB_DIR (ie Ghost v4 and v5)
31
- cmd `v` is broken
32
-
33
44
TODO
34
45
Add Dockerfile FLAG to update version
35
46
@@ -319,6 +330,16 @@ function version { # User_
319
330
Condition_Attr_2_Must_Be_Provided
320
331
Condition_Version_Must_Be_Valid
321
332
333
+ # ## Update version in Dockerfile
334
+ _file_is=" Dockerfile" _file_path_is=" $( pwd) /${_file_is} " && Condition_File_Must_Be_Present
335
+ if [[ " ${_file_do_not_exist} " != " true" ]]; then
336
+ sed -i ' ' " s|VERSION=\" [^\" ]*\" |VERSION=\" ${input_2} \" |" " ${_file_path_is} "
337
+ elif [[ " ${_file_do_not_exist} " == " true" ]]; then
338
+ echo " No Dockerfile, lets continue" > /dev/null 2>&1
339
+ else
340
+ my_message=" FATAL: (version)" && Print_Fatal
341
+ fi
342
+
322
343
# See FLAG 902
323
344
_file_is=${_where_to_save_version} _file_path_is=" $( pwd) /${_file_is} " && Condition_File_Must_Be_Present
324
345
sed -i ' ' " s/^APP_VERSION=.*$/APP_VERSION=\" ${input_2} \" /" " ${_file_path_is} "
@@ -1016,6 +1037,7 @@ function Condition_File_Must_Be_Present {
1016
1037
echo " idempotent checkpoint passed" > /dev/null 2>&1
1017
1038
elif [[ ! -f " ${_file_path_is} " ]]; then
1018
1039
my_message=" Warning: no file: ${_file_path_is} " && Print_Warning_Stop
1040
+ _file_do_not_exist=" true"
1019
1041
else
1020
1042
my_message=" FATAL: Condition_File_Must_Be_Present | ${_file_path_is} " && Print_Fatal
1021
1043
fi
0 commit comments