[DEV] add basic documentation in the action parts

This commit is contained in:
Edouard DUPIN 2019-07-30 23:36:00 +02:00
parent 3e432ffc21
commit 00b2544511
12 changed files with 253 additions and 46 deletions

View File

@ -18,17 +18,35 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Ckeckout a specific branch in all repository"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
my_args.add("r", "remote", haveParam=True, desc="Name of the remote server")
my_args.add_arg("branch", optionnal=False, desc="Branch to checkout")
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
argument_remote_name = ""
branch_to_checkout = ""
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "remote":
debug.info("find remote name: '" + elem.get_arg() + "'")
argument_remote_name = elem.get_arg()

View File

@ -18,15 +18,32 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Write the command you want to be executed in every repository"
##
## @brief Set the option argument are not able to check if the argument are correct or not
## @return (boolean) have parameter without arguments
##
def have_unknow_argument():
return True
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
cmd = ""
for elem in arguments:
for elem in _arguments:
debug.info("Get data element: " + str(elem.get_arg()))
cmd += elem.get_arg() + " "

View File

@ -18,23 +18,37 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Commit in all repository"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
my_args.add("m", "message", haveParam=True, desc="Message to commit data")
my_args.add("a", "all", desc="Commit all elements")
my_args.add("", "amend", desc="Ammend data at the previous commit")
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
argument_message = ""
argument_amend = ""
argument_all = ""
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "message":
debug.info("find message: '" + elem.get_arg() + "'")
argument_message = " --message \"" + elem.get_arg() + "\" ";

View File

@ -17,16 +17,33 @@ from island import manifest
from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Push a delover (develop & master & tag) on the remotre server"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
my_args.add("r", "remote", haveParam=True, desc="Name of the remote server")
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
argument_remote_name = ""
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "remote":
debug.info("find remote name: '" + elem.get_arg() + "'")
argument_remote_name = elem.get_arg()

View File

@ -18,19 +18,36 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Deliver the current repository (develop & master MUST be up to date and you MUST be on master)"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(_my_args, _section):
pass
default_behind_message = "[DEV] update dev tag version"
default_update_message = "[VERSION] update dev tag version"
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
argument_remote_name = ""
for elem in arguments:
for elem in _arguments:
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
# check if .XXX exist (create it if needed)

View File

@ -18,15 +18,33 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Fecth all the repository (get all modification on the server)"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
my_args.add("r", "remote", haveParam=True, desc="Name of the remote server")
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
argument_remote_name = ""
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "remote":
debug.info("find remote name: '" + elem.get_arg() + "'")
argument_remote_name = elem.get_arg()

View File

@ -16,23 +16,40 @@ from island import commands
from island import multiprocess
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Init a island repository (need 'fetch' after)"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
my_args.add("b", "branch", haveParam=True, desc="Select branch to display")
my_args.add("m", "manifest", haveParam=True, desc="Name of the manifest")
def execute(arguments):
if len(arguments) == 0:
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
if len(_arguments) == 0:
debug.error("Missing argument to execute the current action ...")
# the configuration availlable:
branch = "master"
manifest_name = "default.xml"
address_manifest = ""
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "branch":
debug.info("find branch name: '" + elem.get_arg() + "'")
branch = elem.get_arg()

View File

@ -18,15 +18,32 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Syncronize all the repository referenced"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
pass
def execute(arguments):
for elem in arguments:
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
for elem in _arguments:
debug.error("pull Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
# check if .XXX exist (create it if needed)

View File

@ -18,19 +18,33 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Push all repository to the upper server"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
my_args.add("r", "remote", haveParam=True, desc="Name of the remote server")
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
argument_remote_name = ""
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "remote":
debug.info("find remote name: '" + elem.get_arg() + "'")
argument_remote_name = elem.get_arg()

View File

@ -18,20 +18,36 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Get the status of all the repositories"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(_my_args, _section):
_my_args.add("r", "remote", haveParam=True, desc="Name of the remote server")
_my_args.add("t", "tags", haveParam=False, desc="Display if the commit is on a tag (and display it)")
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
argument_remote_name = ""
argument_display_tag = False
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "remote":
debug.info("find remote name: '" + elem.get_arg() + "'")
argument_remote_name = elem.get_arg()

View File

@ -18,19 +18,38 @@ from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Update all the branche to the trackin branch in local (no remote access)"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
#my_args.add("d", "download", haveParam=False, desc="Just download the 'not download' repository")
pass
my_args.add("r", "reset", haveParam=False, desc="Rebase the repository instead of 'reset --hard'")
def execute(arguments):
for elem in arguments:
"""if elem.get_option_name() == "download":
just_download = True
debug.info("find remote name: '" + elem.get_arg() + "'")
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -5 : env.ret_manifest_is_not_existing : Manifest does not exit
## -10 : env.ret_action_is_not_existing : ACTION is not existing
## -11 : env.ret_action_executing_system_error : ACTION execution system error
## -12 : env.ret_action_wrong_parameters : ACTION Wrong parameters
## -13 : env.ret_action_partial_done : ACTION partially done
##
def execute(_arguments):
reset_instead_of_rebase = False
for elem in _arguments:
if elem.get_option_name() == "rebase":
reset_instead_of_rebase = True
debug.info("==> Request reset instead of rebase")
else:
"""

View File

@ -17,17 +17,40 @@ from island import manifest
from island import commands
import os
##
## @brief Get the global description of the current action
## @return (string) the description string (fist line if reserved for the overview, all is for the specific display)
##
def help():
return "Syncronize all the repository referenced"
##
## @brief at the end of the help wa have the example section
## @return (string) the Example description string
##
def help_example():
return "island init https://git.heeroyui.org/atria-tools/island.git"
##
## @brief Add argument to the specific action
## @param[in,out] my_args (death.Arguments) Argument manager
## @param[in] section Name of the currect action
##
def add_specific_arguments(my_args, section):
my_args.add("d", "download", haveParam=False, desc="Just download the 'not download' repository")
def execute(arguments):
##
## @brief Execute the action required.
##
## @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want.
## None : No error (return program out 0)
## -10 : ACTION is not existing
## -11 : ACTION execution system error
## -12 : ACTION Wrong parameters
##
def execute(_arguments):
just_download = False
for elem in arguments:
for elem in _arguments:
if elem.get_option_name() == "download":
just_download = True
debug.info("find remote name: '" + elem.get_arg() + "'")