parameters: ()
return_statement: return arch_time_stamp
docstring: The tag will always contain the timestamp and platform architecture.
      If provided as a command line argument it will add an additional string,
      if not it will check for environmental variables set in build servers to
      create an identification tag.
      :return: String with the final tag.
docstring_summary: The tag will always contain the timestamp and platform architecture.
      If provided as a command line argument it will add an additional string,
      if not it will check for environmental variables set in build servers to
      create an identification tag.
      :return: String with the final tag.
docstring_tokens: The tag will always contain the timestamp and platform architecture . If provided as a command line argument it will add an additional string if not it will check for environmental variables set in build servers to create an identification tag . : return : String with the final tag .
function: def get_build_tag():
      """
      The tag will always contain the timestamp and platform architecture.
      If provided as a command line argument it will add an additional string,
      if not it will check for environmental variables set in build servers to
      create an identification tag.
      :return: String with the final tag.
      """
      # All tags begging with architecture type (based on the Python version) and
      # the current time stamp
      arch_time_stamp = "%s%s_%s" % (platform.system(),
                                     (struct.calcsize('P') * 8),
                                     time.strftime("%Y-%m-%d_%H.%M"))
  
      # Check if a command line argument has been given
      if len(sys.argv) > 1:
          # Take the first argument and use it as a tag appendage
          print(script_tab + "Command line argument '%s' found and will be used "
                             "for package tag." % sys.argv[1])
          return "%s_%s" % (arch_time_stamp, sys.argv[1])
      else:
          print(script_tab + "No command line argument found")
  
      # Check for Travis-CI environmental variables to create tag appendage
      print(script_tab + "Checking Travis-CI environment variables for tag:")
      travis_tag = tag_from_ci_env_vars(ci_name="Travis-CI",
                                        pull_request_var="TRAVIS_PULL_REQUEST",
                                        branch_var="TRAVIS_BRANCH",
                                        commit_var="TRAVIS_COMMIT")
      if travis_tag:
          return "%s_%s" % (arch_time_stamp, travis_tag)
  
      # Check for AppVeyor environmental variables to create tag appendage
      print(script_tab + "Checking AppVeyor environment variables for tag:")
      appveyor_tag = tag_from_ci_env_vars(
          ci_name="AppVeyor",
          pull_request_var="APPVEYOR_PULL_REQUEST_NUMBER",
          branch_var="APPVEYOR_REPO_BRANCH",
          commit_var="APPVEYOR_REPO_COMMIT")
      if appveyor_tag:
          return "%s_%s" % (arch_time_stamp, appveyor_tag)
  
      # Check for Circle CI environmental variables to create tag appendage
      print(script_tab + "Checking Circleci environment variables for tag:")
      circleci_tag = tag_from_ci_env_vars(
          ci_name="Circleci",
          pull_request_var="CI_PULL_REQUEST",
          branch_var="CIRCLE_BRANCH",
          commit_var="CIRCLE_SHA1")
      if circleci_tag:
          return "%s_%s" % (arch_time_stamp, circleci_tag)
  
      return arch_time_stamp
function_tokens: def get_build_tag ( ) : # All tags begging with architecture type (based on the Python version) and # the current time stamp arch_time_stamp = "%s%s_%s" % ( platform . system ( ) , ( struct . calcsize ( 'P' ) * 8 ) , time . strftime ( "%Y-%m-%d_%H.%M" ) ) # Check if a command line argument has been given if len ( sys . argv ) > 1 : # Take the first argument and use it as a tag appendage print ( script_tab + "Command line argument '%s' found and will be used " "for package tag." % sys . argv [ 1 ] ) return "%s_%s" % ( arch_time_stamp , sys . argv [ 1 ] ) else : print ( script_tab + "No command line argument found" ) # Check for Travis-CI environmental variables to create tag appendage print ( script_tab + "Checking Travis-CI environment variables for tag:" ) travis_tag = tag_from_ci_env_vars ( ci_name = "Travis-CI" , pull_request_var = "TRAVIS_PULL_REQUEST" , branch_var = "TRAVIS_BRANCH" , commit_var = "TRAVIS_COMMIT" ) if travis_tag : return "%s_%s" % ( arch_time_stamp , travis_tag ) # Check for AppVeyor environmental variables to create tag appendage print ( script_tab + "Checking AppVeyor environment variables for tag:" ) appveyor_tag = tag_from_ci_env_vars ( ci_name = "AppVeyor" , pull_request_var = "APPVEYOR_PULL_REQUEST_NUMBER" , branch_var = "APPVEYOR_REPO_BRANCH" , commit_var = "APPVEYOR_REPO_COMMIT" ) if appveyor_tag : return "%s_%s" % ( arch_time_stamp , appveyor_tag ) # Check for Circle CI environmental variables to create tag appendage print ( script_tab + "Checking Circleci environment variables for tag:" ) circleci_tag = tag_from_ci_env_vars ( ci_name = "Circleci" , pull_request_var = "CI_PULL_REQUEST" , branch_var = "CIRCLE_BRANCH" , commit_var = "CIRCLE_SHA1" ) if circleci_tag : return "%s_%s" % ( arch_time_stamp , circleci_tag ) return arch_time_stamp