Пример #1
0
    def _getScmRev(self, aPath):
        rev, err_msg = VersionCtrlUtils.get_svn_revision(aPath)
        if err_msg:
            print("ERROR: failed to get SVN version for %s : %s" %
                  (aPath, err_msg))
            sys.exit(1)

        return rev
Пример #2
0
    def __init__(self, aCmdLineOptions):
        super().__init__(ForceCmdLineOptions.cOptions, aCmdLineOptions)

        force_path = self.mAppParameters.parameter("path")
        force_bin_dir, _ = PathUtils.split_path(force_path)
        force_dir = PathUtils.real_path(
            PathUtils.include_trailing_path_delimiter(force_bin_dir) + "../"
        )

        if not PathUtils.check_exe(force_path):
            raise Exception(force_path + " does not exist or is not executable, confirm valid exe")

        # determine svn revision information and store as a parameter
        version_data = VersionCtrlUtils.get_scm_revisions(force_dir)
        version_output = VersionCtrlUtils.get_version_output(version_data)

        Msg.info("Force Version Data:\n%s" % version_output)

        self.mAppParameters.setParameter("version", version_data)
        self.mAppParameters.setParameter("version_dir", force_dir)
Пример #3
0
    def __init__(self, aCmdLineOptions):
        """Iintialize the object

        :param CmdLineOptions aCmdLineOptions:
        """
        super().__init__(RtlCmdLineOptions.cOptions, aCmdLineOptions)

        rtl_root = self.mAppParameters.parameter("root")
        if not PathUtils.check_dir(rtl_root):
            raise Exception(rtl_root + " is not a directory.")

        meta_conv_path = PathUtils.append_path(aCmdLineOptions.mProgramPath,
                                               "metaargs_to_plusargs.py")
        self.mAppParameters.setParameter("meta_converter", meta_conv_path)

        # determine svn revision information and store as a parameter
        version_data = VersionCtrlUtils.get_scm_revisions(rtl_root)
        version_output = VersionCtrlUtils.get_version_output(version_data)

        Msg.info("RTL Version Data:\n%s" % version_output)

        self.mAppParameters.setParameter("version", version_data)
        self.mAppParameters.setParameter("version_dir", rtl_root)
Пример #4
0
    def __init__(self, aCmdLineOptions):
        super().__init__(ForceCmdLineOptions.cOptions, aCmdLineOptions)

        force_path = self.mAppParameters.parameter('path')
        force_bin_dir, _ = PathUtils.split_path(force_path)
        force_dir = PathUtils.real_path(
            PathUtils.include_trailing_path_delimiter(force_bin_dir) + '../')

        if not PathUtils.check_exe(force_path):
            raise Exception(
                force_path +
                " does not exist or is not executable, confirm valid exe")

        #determine svn revision information and store as a parameter
        version_info = VersionCtrlUtils.get_svn_revision(force_dir)
        if version_info[1] is not None:
            Msg.info("Failed to determine Force svn version: " +
                     version_info[1])
            self.mAppParameters.setParameter("version", -1)
        else:
            self.mAppParameters.setParameter("version", version_info[0])
        self.mAppParameters.setParameter("version_dir", force_dir)