技术领域Technical field
本发明涉及软件领域,具体涉及一种多个工程文件上传代码仓库的方法及装置、计算设备。The invention relates to the field of software, and in particular to a method and device for uploading multiple engineering files to a code warehouse, and computing equipment.
背景技术Background technique
代码仓库可以用于存储并整理各种代码包,用户可以上传自己的工程文件存储至代码仓库中,还可以提供给用户从代码仓库中下载工程文件以便共享工程文件。在上传工程文件至代码仓库时,需要用户针对每个工程文件均配置上传至代码仓库的路径、上传版本信息、代码仓库相关登录信息等配置文件。这样处理使得用户必须对每个工程文件均配置对应的配置文件,用户的工作量较大。The code warehouse can be used to store and organize various code packages. Users can upload their own project files and store them in the code warehouse. It also allows users to download project files from the code warehouse to share project files. When uploading project files to the code warehouse, users are required to configure configuration files such as the path to upload to the code warehouse, upload version information, code warehouse-related login information, etc. for each project file. This processing requires the user to configure the corresponding configuration file for each project file, which requires a large workload for the user.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的多个工程文件上传代码仓库的方法及装置、计算设备、计算机存储介质。In view of the above problems, the present invention is proposed to provide a method and device, a computing device, and a computer storage medium for uploading multiple engineering files to a code warehouse that overcome the above problems or at least partially solve the above problems.
根据本发明的一个方面,提供了一种多个工程文件上传代码仓库的方法,其包括:According to one aspect of the present invention, a method for uploading multiple project files to a code warehouse is provided, which includes:
预先配置多个工程文件的共用配置文件;Pre-configure common configuration files for multiple project files;
建立多个工程文件与共用配置文件的引用关系;Establish reference relationships between multiple project files and shared configuration files;
遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。Traverse multiple project files, call the upload tasks of multiple project files in sequence, and complete uploading multiple project files to the code warehouse.
根据本发明的另一方面,提供了一种多个工程文件上传代码仓库的装置,其包括:According to another aspect of the present invention, a device for uploading multiple project files to a code warehouse is provided, which includes:
配置模块,适于预先配置多个工程文件的共用配置文件;Configuration module, suitable for pre-configuring common configuration files for multiple project files;
引用模块,适于建立多个工程文件与共用配置文件的引用关系;Reference module, suitable for establishing reference relationships between multiple project files and shared configuration files;
上传模块,适于遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。The upload module is suitable for traversing multiple project files, calling the upload tasks of multiple project files in sequence, and completing uploading multiple project files to the code warehouse.
根据本发明的又一方面,提供了一种计算设备,包括:处理器、存储器、通信接口和通信总线,处理器、存储器和通信接口通过通信总线完成相互间的通信;According to another aspect of the present invention, a computing device is provided, including: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus;
存储器用于存放至少一可执行指令,可执行指令使处理器执行上述多个工程文件上传代码仓库的方法对应的操作。The memory is used to store at least one executable instruction. The executable instruction causes the processor to perform operations corresponding to the above method of uploading multiple project files to the code warehouse.
根据本发明的再一方面,提供了一种计算机存储介质,存储介质中存储有至少一可执行指令,可执行指令使处理器执行如上述多个工程文件上传代码仓库的方法对应的操作。According to yet another aspect of the present invention, a computer storage medium is provided. The storage medium stores at least one executable instruction. The executable instruction causes the processor to perform operations corresponding to the above method of uploading multiple project files to a code warehouse.
根据本发明提供的多个工程文件上传代码仓库的方法及装置、计算设备,预先配置多个工程文件的共用配置文件;建立多个工程文件与共用配置文件的引用关系;遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。通过共用配置文件,可以减少为多个工程文件分别设置配置文件所需的工作量,且多个工程文件与共用配置文件间建立引用关系,在上传时通过引用共用配置文件实现上传,避免在多个工程文件中均设置配置文件的繁琐操作,也方便在每次上传时直接修改共用配置文件即可完成上传,操作更便利。进一步,通过遍历多个工程文件,依次调用多个工程文件的上传任务,自动完成上传操作,无需手动上传操作,避免人工操作可能的错误。According to the method, device and computing device for uploading multiple engineering files to a code warehouse provided by the present invention, a common configuration file of multiple engineering files is pre-configured; a reference relationship between multiple engineering files and the common configuration file is established; multiple engineering files are traversed, Call the upload tasks of multiple project files in sequence to complete uploading multiple project files to the code warehouse. By sharing configuration files, the workload required to set up configuration files for multiple project files can be reduced, and a reference relationship is established between multiple project files and the shared configuration file. When uploading, uploading is achieved by referencing the shared configuration file, avoiding the need for multiple project files to be uploaded. The cumbersome operation of setting configuration files in each project file is also convenient. You can directly modify the shared configuration file each time you upload to complete the upload, making the operation more convenient. Furthermore, by traversing multiple project files and calling the upload tasks of multiple project files in sequence, the upload operation is automatically completed without the need for manual upload operations, thus avoiding possible errors in manual operations.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to have a clearer understanding of the technical means of the present invention, it can be implemented according to the content of the description, and in order to make the above and other objects, features and advantages of the present invention more obvious and understandable. , the specific embodiments of the present invention are listed below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be construed as limiting the invention. Also throughout the drawings, the same reference characters are used to designate the same components. In the attached picture:
图1示出了根据本发明一个实施例的多个工程文件上传代码仓库的方法的流程图;Figure 1 shows a flow chart of a method for uploading multiple project files to a code warehouse according to an embodiment of the present invention;
图2示出了根据本发明另一个实施例的多个工程文件上传代码仓库的方法的流程图;Figure 2 shows a flow chart of a method for uploading multiple project files to a code warehouse according to another embodiment of the present invention;
图3示出了根据本发明一个实施例的多个工程文件上传代码仓库的装置的功能框图;Figure 3 shows a functional block diagram of a device for uploading multiple project files to a code warehouse according to one embodiment of the present invention;
图4示出了根据本发明一个实施例的一种计算设备的结构示意图。Figure 4 shows a schematic structural diagram of a computing device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a thorough understanding of the disclosure, and to fully convey the scope of the disclosure to those skilled in the art.
本发明中代码仓库可以保存工程文件,将需要保存的工程文件上传至代码仓库后,代码仓库还可以提供给其他工程远程访问其所保存的工程文件。在本发明中代码仓库以Jcenter为例进行说明,但不仅限于Jcenter。The code warehouse in the present invention can save project files. After the project files that need to be saved are uploaded to the code warehouse, the code warehouse can also provide other projects with remote access to the saved project files. In the present invention, the code warehouse is explained using Jcenter as an example, but it is not limited to Jcenter.
图1示出了根据本发明一个实施例的多个工程文件上传代码仓库的方法的流程图。如图1所示,多个工程文件上传代码仓库的方法具体包括如下步骤:Figure 1 shows a flow chart of a method for uploading multiple project files to a code warehouse according to an embodiment of the present invention. As shown in Figure 1, the method of uploading multiple project files to the code warehouse specifically includes the following steps:
步骤S101,预先配置多个工程文件的共用配置文件。Step S101: Pre-configure a common configuration file for multiple project files.
在将工程上传代码仓库时,需要为工程配置专门的配置文件,以满足上传代码仓库的需求,这使得在对多个工程文件均上传代码仓库时,需要设置多个配置文件。为减少设置配置文件的工作量,在本实施例中,预先配置一个共用配置文件,多个工程文件可以均使用该一个共用配置文件,实现多个工程文件上传代码仓库。When uploading a project to the code warehouse, a special configuration file needs to be configured for the project to meet the needs of uploading the code warehouse. This requires setting multiple configuration files when uploading multiple project files to the code warehouse. In order to reduce the workload of setting the configuration file, in this embodiment, a common configuration file is pre-configured, and multiple project files can all use this common configuration file to realize uploading of multiple project files to the code warehouse.
共用配置文件包含了代码仓库登录相关信息、代码仓库地址信息、工程文件上传地址信息、工程文件版本信息等。代码仓库登录相关信息包括如代码仓库登录用户名、密码、认证信息等,方便上传时根据代码仓库登录相关信息完成对当前上传操作的登录认证。代码仓库地址信息标明了上传代码仓库的地址,包括如网站地址、Git地址(远程代码仓库地址)等信息。工程文件上传地址信息标明了多个工程文件上传至代码仓库中保存的地址信息。工程文件版本信息记录了工程文件更新的版本号等信息。除以上信息外,共用配置文件可以根据具体实施需要,包含其他上传代码仓库所需的配置信息,如工程文件组别信息、项目名称信息、工程文件类型等信息。The shared configuration file includes code warehouse login related information, code warehouse address information, project file upload address information, project file version information, etc. Code warehouse login related information includes code warehouse login user name, password, authentication information, etc., which facilitates the login authentication for the current upload operation based on the code warehouse login related information when uploading. The code warehouse address information indicates the address of the uploaded code warehouse, including information such as website address, Git address (remote code warehouse address) and other information. The project file upload address information indicates the address information where multiple project files are uploaded to the code warehouse. The project file version information records the updated version number of the project file and other information. In addition to the above information, the shared configuration file can contain other configuration information required for uploading the code warehouse according to specific implementation needs, such as project file group information, project name information, project file type and other information.
步骤S102,建立多个工程文件与共用配置文件的引用关系。Step S102: Establish reference relationships between multiple project files and a common configuration file.
上传代码仓库时,需要多个工程文件均配置有配置文件。虽然可以将共用配置文件分别拷贝至每个工程文件中,但这样使得每上传一次新版本的工程文件,都需要将配置的共用配置文件拷贝至每个工程文件中,容易发生错拷贝、漏拷贝等问题,导致上传代码仓库失败。When uploading a code repository, multiple project files need to be configured with configuration files. Although the shared configuration file can be copied to each project file separately, this means that every time a new version of the project file is uploaded, the configured shared configuration file needs to be copied to each project file, which is prone to incorrect or missing copies. and other problems, resulting in failure to upload the code repository.
为避免多次上传重复拷贝所导致的上传代码仓库失败问题,将多个工程文件与共用配置文件建立引用关系。具体的,遍历多个工程文件,依次在各个工程文件中加入共用配置文件的路径信息,以建立多个工程文件与共用配置文件的引用关系。即在上传代码仓库时,根据共用配置文件的路径信息,完成工程文件对共用配置文件的引用,而无需在每个工程文件的路径下保存实际的共用配置文件。本步骤在第一次建立多个工程文件与共用配置文件的引用关系后,若共用配置文件路径不发生改变,之后的每一次上传代码仓库,可以仅修改共用配置文件,即可完成再次上传,大大减少上传所需的工作量。In order to avoid the problem of failure to upload the code repository caused by uploading duplicate copies multiple times, establish a reference relationship between multiple project files and the shared configuration file. Specifically, multiple project files are traversed, and the path information of the shared configuration file is added to each project file in order to establish a reference relationship between multiple project files and the shared configuration file. That is, when uploading the code repository, the reference of the project file to the shared configuration file is completed based on the path information of the shared configuration file, without saving the actual shared configuration file under the path of each project file. After this step establishes the reference relationship between multiple project files and the shared configuration file for the first time, if the path of the shared configuration file does not change, each time you upload the code repository, you can only modify the shared configuration file to complete the upload again. Dramatically reduce the amount of work required for uploading.
进一步,该步骤可以通过预设脚本文件自动执行完成,由预设脚本文件遍历多个工程文件,并在多个工程文件中加入共用配置文件的路径信息,完成多个工程文件与共用配置文件的引用关系的建立。Furthermore, this step can be automatically executed through a preset script file. The preset script file traverses multiple project files and adds the path information of the shared configuration file to the multiple project files to complete the integration of multiple project files and the shared configuration file. Establishment of reference relationships.
步骤S103,遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。Step S103: Traverse multiple project files, sequentially call the upload tasks of multiple project files, and complete uploading multiple project files to the code warehouse.
通过读取包含多个工程文件路径信息的工程列表,可以获取到多个工程文件路径信息。根据多个工程文件路径信息依次遍历多个工程文件,可以找到具体的工程文件,调用各个工程文件的上传任务,完成上传多个工程文件至代码仓库。在调用工程文件的上传任务时,由于工程文件与共用配置文件为引用关系,共用配置文件没有存在工程文件所在路径下,因此,还需要根据多个工程文件与共用配置文件的引用关系,去读取共用配置文件的信息。利用读取到的共用配置文件中的信息,完成代码仓库的登录验证等操作,从而将多个工程文件上传至代码仓库。By reading a project list containing multiple project file path information, multiple project file path information can be obtained. By traversing multiple project files in sequence according to the path information of multiple project files, you can find the specific project file, call the upload task of each project file, and complete the upload of multiple project files to the code warehouse. When calling the upload task of the project file, since the project file has a reference relationship with the shared configuration file, the shared configuration file does not exist in the path where the project file is located. Therefore, it is also necessary to read based on the reference relationship between multiple project files and the shared configuration file. Get information about the shared configuration file. Use the information in the read shared configuration file to complete operations such as login verification of the code warehouse, thereby uploading multiple project files to the code warehouse.
进一步,该步骤可以通过预设脚本文件自动执行完成,由预设脚本文件来读取工程列表,遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。Furthermore, this step can be automatically executed through a preset script file. The preset script file reads the project list, traverses multiple project files, and calls the upload tasks of multiple project files in sequence to complete uploading multiple project files to the code warehouse. .
在本实施例中通过预设脚本文件将方法的各个步骤串联执行,实现自动完成多个工程文件上传代码仓库,减少人工上传多个工程文件的工作量。In this embodiment, each step of the method is executed in series through a preset script file, thereby automatically completing the uploading of multiple project files to the code warehouse and reducing the workload of manually uploading multiple project files.
根据本发明提供的多个工程文件上传代码仓库的方法,预先配置多个工程文件的共用配置文件;建立多个工程文件与共用配置文件的引用关系;遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。通过共用配置文件,可以减少为多个工程文件分别设置配置文件所需的工作量,且多个工程文件与共用配置文件间建立引用关系,在上传时通过引用共用配置文件实现上传,避免在多个工程文件中均设置配置文件的繁琐操作,也方便在每次上传时直接修改共用配置文件即可完成上传,操作更便利。进一步,通过遍历多个工程文件,依次调用多个工程文件的上传任务,自动完成上传操作,无需手动上传操作,避免人工操作可能的错误。According to the method for uploading multiple engineering files to a code warehouse provided by the present invention, a common configuration file of multiple engineering files is pre-configured; a reference relationship between multiple engineering files and the common configuration file is established; multiple engineering files are traversed and multiple projects are called in sequence File upload task, complete uploading multiple project files to the code warehouse. By sharing configuration files, the workload required to set up configuration files for multiple project files can be reduced, and a reference relationship is established between multiple project files and the shared configuration file. When uploading, uploading is achieved by referencing the shared configuration file, avoiding the need for multiple project files to be uploaded. The cumbersome operation of setting configuration files in each project file is also convenient. You can directly modify the shared configuration file each time you upload to complete the upload, making the operation more convenient. Furthermore, by traversing multiple project files and calling the upload tasks of multiple project files in sequence, the upload operation is automatically completed without the need for manual upload operations, thus avoiding possible errors in manual operations.
图2示出了根据本发明另一个实施例的多个工程文件上传代码仓库的方法的流程图。如图2所示,多个工程文件上传代码仓库的方法具体包括如下步骤:Figure 2 shows a flow chart of a method for uploading multiple project files to a code warehouse according to another embodiment of the present invention. As shown in Figure 2, the method of uploading multiple project files to the code warehouse specifically includes the following steps:
步骤S201,预先配置多个工程文件的共用配置文件。Step S201: Pre-configure a common configuration file for multiple project files.
为方便自动地将多个工程文件上传代码仓库,以及多个工程文件在每次更新版本后自动上传代码仓库,共用配置文件可以预先设置与工程文件本身以及与工程文件更新版本无关的信息,如代码仓库登录相关信息、代码仓库地址信息等,这些信息可以适用于不同工程文件上传,也与工程文件的版本信息无关。In order to facilitate the automatic uploading of multiple project files to the code warehouse, and the automatic uploading of multiple project files to the code warehouse after each version update, the shared configuration file can be pre-set with information unrelated to the project file itself and the updated version of the project file, such as Code warehouse login related information, code warehouse address information, etc. This information can be applied to uploading different project files and has nothing to do with the version information of the project files.
对于涉及工程文件本身以及与工程文件更新版本相关的信息,可以通过对工程文件本身的信息自动设置共用配置文件中所需的信息。For information related to the project file itself and the updated version of the project file, the information required in the shared configuration file can be automatically set by using the information of the project file itself.
步骤S202,根据多个工程文件的名称,查找代码仓库中已上传的工程文件的工程文件旧版本信息。Step S202: Search the project file old version information of the uploaded project files in the code warehouse based on the names of the multiple project files.
步骤S203,对工程文件旧版本信息进行升版本处理,得到共用配置文件的工程文件版本信息。Step S203: Upgrade the old version information of the project file to obtain the project file version information of the shared configuration file.
针对工程文件版本信息,可以根据工程文件已经上传至代码仓库的历史记录来设置。具体的,根据需要上传的多个工程文件的名称,查找代码仓库中与工程文件名称一致的已上传的工程文件,获取到工程文件旧版本信息。根据工程文件更新版本的具体规则,对工程文件旧版本信息进行升版本处理,得到本次共用配置文件的工程文件版本信息。如工程文件旧版本信息为2.3.0,进行升版本处理后,得到共用配置文件的工程文件版本信息为2.3.1。通过执行该步骤可以自动得到共用配置文件的工程文件版本信息,而无需用户手动配置。Project file version information can be set based on the history of project files uploaded to the code repository. Specifically, according to the names of multiple project files that need to be uploaded, the uploaded project files with the same name as the project files in the code warehouse are searched, and the old version information of the project files is obtained. According to the specific rules for project file update version, the old version information of the project file is upgraded to obtain the project file version information of this shared configuration file. For example, the old version information of the project file is 2.3.0. After the version upgrade process, the project file version information of the shared configuration file is 2.3.1. By executing this step, the project file version information of the shared configuration file can be automatically obtained without the need for manual configuration by the user.
步骤S204,根据多个工程文件的名称,查找代码仓库已上传的工程文件上传地址信息。Step S204: Search the upload address information of project files that have been uploaded to the code warehouse based on the names of multiple project files.
步骤S205,根据已上传的工程文件上传地址信息,得到共用配置文件的工程文件上传地址信息。Step S205: Obtain the project file upload address information of the shared configuration file based on the uploaded project file upload address information.
针对工程文件上传地址信息,可以根据工程文件已经上传至代码仓库的历史记录来设置。具体的,根据需要上传的多个工程文件的名称,查找代码仓库中与工程文件名称一致的已上传的工程文件,获取到已上传的工程文件上传地址信息。将已上传的工程文件上传地址信息作为本次共用配置文件的工程文件上传地址信息,使得再次上传的新的工程文件可以覆盖之前的工程文件。通过执行该步骤可以自动得到共用配置文件的工程文件上传地址信息,而无需用户手动配置。The project file upload address information can be set based on the history of project files uploaded to the code warehouse. Specifically, according to the names of multiple project files that need to be uploaded, the uploaded project files in the code warehouse that have the same name as the project files are searched, and the upload address information of the uploaded project files is obtained. Use the uploaded project file upload address information as the project file upload address information for this shared configuration file, so that the new project file uploaded again can overwrite the previous project file. By executing this step, the project file upload address information of the shared configuration file can be automatically obtained without the need for manual configuration by the user.
在本实施例中,一次设置完成共用配置文件中与工程文件本身以及与工程文件更新版本无关的信息后,该共用配置文件可以适用于任何多个工程文件的上传,不受任何工程文件上传地址、版本的影响,可以重复使用。减少因工程文件上传地址信息不同、版本更新等影响,需要反复修改共用配置文件的问题,减少修改的工作量。在上传前,通过工程文件的名称,自动查找定位工程文件上传地址信息、更新工程文件版本信息,减少整个上传过程中的工作量,节省人员成本,提高上传处理效率,更加快捷方便。In this embodiment, after once setting the information in the shared configuration file that is irrelevant to the project file itself and the updated version of the project file, the shared configuration file can be applied to the upload of any multiple project files, regardless of any project file upload address. , version influence, can be reused. Reduce the problem of repeatedly modifying shared configuration files due to different project file upload address information, version updates, etc., and reduce the workload of modifications. Before uploading, through the name of the project file, it can automatically find and locate the project file upload address information and update the project file version information, reducing the workload in the entire upload process, saving personnel costs, improving upload processing efficiency, and making it faster and more convenient.
上述步骤S202、S203和S204、S205的执行顺序不做限定,可以先执行步骤S202、S203,再执行步骤S204、S205,也可以先执行步骤S204、S205,再执行步骤S202、S203。The execution order of the above-mentioned steps S202, S203 and S204, S205 is not limited. Steps S202 and S203 may be executed first, and then steps S204 and S205. Alternatively, steps S204 and S205 may be executed first, and then steps S202 and S203 are executed.
步骤S206,建立多个工程文件与共用配置文件的引用关系。Step S206: Establish reference relationships between multiple project files and the common configuration file.
步骤S207,遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。Step S207: Traverse multiple project files, sequentially call the upload tasks of multiple project files, and complete uploading multiple project files to the code warehouse.
以上步骤可参考图1实施例中步骤S102-S103的描述,在此不再赘述。需要说明的是,此处,上传任务可以手动添加至多个工程文件中,更优选地,在根据多个工程文件路径信息确定工程文件后,为各个工程文件自动添加上传任务,再依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库,使得整个方法执行更减少工作量,节省人员成本。For the above steps, reference may be made to the description of steps S102-S103 in the embodiment of FIG. 1, which will not be described again here. It should be noted that here, the upload task can be manually added to multiple project files. More preferably, after the project file is determined based on the path information of multiple project files, the upload task is automatically added to each project file, and then multiple The project file upload task is completed by uploading multiple project files to the code warehouse, which reduces the workload of the entire method execution and saves personnel costs.
根据本发明提供的多个工程文件上传代码仓库的方法,在共用配置文件中配置与工程文件本身以及与工程文件更新版本无关的信息,在上传前,通过工程文件的名称,自动查找定位工程文件上传地址信息、更新工程文件版本信息,使得该共用配置文件可以适用于任何多个工程文件的上传,不受任何工程文件上传地址、版本的影响,可以重复使用。减少因工程文件上传地址信息不同、版本更新等影响,需要反复修改共用配置文件的问题,减少修改的工作量,节省人员成本,提高上传处理效率,更加快捷方便。According to the method for uploading multiple project files to a code warehouse provided by the present invention, information unrelated to the project file itself and the updated version of the project file is configured in the common configuration file. Before uploading, the project file is automatically searched and positioned through the name of the project file. Upload address information and update project file version information, so that the shared configuration file can be applied to the upload of any multiple project files, is not affected by any project file upload address and version, and can be reused. It reduces the problem of repeatedly modifying shared configuration files due to different project file upload address information, version updates, etc., reduces the workload of modifications, saves personnel costs, improves upload processing efficiency, and makes it faster and more convenient.
图3示出了根据本发明一个实施例的多个工程文件上传代码仓库的装置的功能框图。如图3所示,多个工程文件上传代码仓库的装置包括如下模块:Figure 3 shows a functional block diagram of a device for uploading multiple project files to a code warehouse according to an embodiment of the present invention. As shown in Figure 3, the device for uploading multiple project files to the code warehouse includes the following modules:
配置模块310适于:预先配置多个工程文件的共用配置文件。The configuration module 310 is adapted to pre-configure a common configuration file for multiple project files.
引用模块320适于:建立多个工程文件与共用配置文件的引用关系。The reference module 320 is adapted to establish reference relationships between multiple project files and a common configuration file.
上传模块330适于:遍历多个工程文件,依次调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。The upload module 330 is adapted to: traverse multiple project files, sequentially call upload tasks of multiple project files, and complete uploading multiple project files to the code warehouse.
可选地,引用模块320进一步适于:遍历多个工程文件,依次在各个工程文件中加入共用配置文件的路径信息,以建立多个工程文件与共用配置文件的引用关系。Optionally, the reference module 320 is further adapted to: traverse multiple project files, and add the path information of the common configuration file to each project file in turn, so as to establish a reference relationship between the multiple project files and the common configuration file.
可选地,配置模块310还包括:版本模块311。Optionally, the configuration module 310 also includes: a version module 311.
版本模块311适于:根据多个工程文件的名称,查找代码仓库中已上传的工程文件的工程文件旧版本信息;对工程文件旧版本信息进行升版本处理,得到共用配置文件的工程文件版本信息。The version module 311 is suitable for: searching for the old version information of project files of the uploaded project files in the code warehouse based on the names of multiple project files; upgrading the old version information of the project files to obtain the project file version information of the shared configuration file .
可选地,配置模块310还包括:地址模块312。Optionally, the configuration module 310 also includes: an address module 312.
地址模块312适于:根据多个工程文件的名称,查找代码仓库已上传的工程文件上传地址信息;根据已上传的工程文件上传地址信息,得到共用配置文件的工程文件上传地址信息。The address module 312 is adapted to: search the uploaded project file upload address information of the code warehouse according to the names of multiple project files; obtain the project file upload address information of the shared configuration file based on the uploaded project file upload address information.
可选地,上传模块330进一步适于:读取包含多个工程文件路径信息的工程列表;根据获取的多个工程文件路径信息,依次遍历多个工程文件,调用多个工程文件的上传任务,完成上传多个工程文件至代码仓库。Optionally, the upload module 330 is further adapted to: read a project list containing path information of multiple project files; traverse multiple project files in sequence according to the obtained path information of multiple project files, and call upload tasks of multiple project files, Completed uploading multiple project files to the code warehouse.
可选地,上传模块330进一步适于:调用多个工程文件的上传任务,并根据多个工程文件与共用配置文件的引用关系,读取共用配置文件;根据共用配置文件,实现代码仓库的登录验证,完成上传多个工程文件至代码仓库。Optionally, the upload module 330 is further adapted to: call the upload task of multiple project files, and read the common configuration file according to the reference relationship between the multiple project files and the common configuration file; implement the login of the code warehouse according to the common configuration file Verify and complete uploading multiple project files to the code warehouse.
以上各模块的描述参照方法实施例中对应的描述,在此不再赘述。For the description of each module above, refer to the corresponding description in the method embodiment, and will not be described again here.
本申请还提供了一种非易失性计算机存储介质,所述计算机存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的多个工程文件上传代码仓库的方法。This application also provides a non-volatile computer storage medium that stores at least one executable instruction. The computer executable instruction can execute multiple project file upload code warehouses in any of the above method embodiments. method.
图4示出了根据本发明一个实施例的一种计算设备的结构示意图,本发明具体实施例并不对计算设备的具体实现做限定。Figure 4 shows a schematic structural diagram of a computing device according to an embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the computing device.
如图4所示,该计算设备可以包括:处理器(processor)402、通信接口(Communications Interface)404、存储器(memory)406、以及通信总线408。As shown in FIG. 4 , the computing device may include: a processor 402 , a communications interface 404 , a memory 406 , and a communications bus 408 .
其中:in:
处理器402、通信接口404、以及存储器406通过通信总线408完成相互间的通信。The processor 402, the communication interface 404, and the memory 406 complete communication with each other through the communication bus 408.
通信接口404,用于与其它设备比如客户端或其它服务器等的网元通信。The communication interface 404 is used to communicate with network elements of other devices such as clients or other servers.
处理器402,用于执行程序410,具体可以执行上述多个工程文件上传代码仓库的方法实施例中的相关步骤。The processor 402 is configured to execute the program 410. Specifically, it can execute the relevant steps in the method embodiment of uploading multiple project files to the code warehouse.
具体地,程序410可以包括程序代码,该程序代码包括计算机操作指令。Specifically, program 410 may include program code including computer operating instructions.
处理器402可能是中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。计算设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the computing device may be the same type of processor, such as one or more CPUs; or they may be different types of processors, such as one or more CPUs and one or more ASICs.
存储器406,用于存放程序410。存储器406可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。Memory 406 is used to store programs 410. The memory 406 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
程序410具体可以用于使得处理器402执行上述任意方法实施例中的多个工程文件上传代码仓库的方法。程序410中各步骤的具体实现可以参见上述多个工程文件上传代码仓库的实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。The program 410 may be specifically used to cause the processor 402 to execute the method of uploading multiple project files to the code repository in any of the above method embodiments. For the specific implementation of each step in the program 410, please refer to the corresponding steps and corresponding descriptions in the units in the embodiment of uploading multiple project files to the code warehouse, and will not be described again here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be described again here.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently associated with any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. From the above description, the structure required to construct such a system is obvious. Furthermore, this invention is not specific to any specific programming language. It should be understood that a variety of programming languages may be utilized to implement the invention described herein, and that the above descriptions of specific languages are intended to disclose the best mode of carrying out the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the instructions provided here, a number of specific details are described. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, in order to streamline the disclosure and aid in the understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together into a single embodiment. figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that modules in the devices in the embodiment can be adaptively changed and arranged in one or more devices different from that in the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of the equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features of different embodiments are meant to be within the scope of the invention. within and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的多个工程文件上传代码仓库的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all components of the device for uploading multiple engineering files to a code warehouse according to embodiments of the present invention. Full functionality. The invention may also be implemented as an apparatus or apparatus program (eg, computer program and computer program product) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the element claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, third, etc. does not indicate any order. These words can be interpreted as names.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811526278.7ACN111324373B (en) | 2018-12-13 | 2018-12-13 | Method and device for sub-coding warehouse on multiple engineering files and computing equipment |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811526278.7ACN111324373B (en) | 2018-12-13 | 2018-12-13 | Method and device for sub-coding warehouse on multiple engineering files and computing equipment |
| Publication Number | Publication Date |
|---|---|
| CN111324373A CN111324373A (en) | 2020-06-23 |
| CN111324373Btrue CN111324373B (en) | 2023-12-05 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811526278.7AActiveCN111324373B (en) | 2018-12-13 | 2018-12-13 | Method and device for sub-coding warehouse on multiple engineering files and computing equipment |
| Country | Link |
|---|---|
| CN (1) | CN111324373B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113282541B (en)* | 2021-06-04 | 2023-08-11 | 网易(杭州)网络有限公司 | File calling method and device and electronic equipment |
| CN113268288B (en)* | 2021-07-19 | 2022-06-03 | 天聚地合(苏州)数据股份有限公司 | Shared file configuration method and device |
| CN114090067A (en)* | 2021-11-29 | 2022-02-25 | 海光信息技术股份有限公司 | Software combination version control method, control device and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2011126507A1 (en)* | 2010-04-07 | 2011-10-13 | Apple Inc. | Apparatus and method for matching users for online sessions |
| CN105653253A (en)* | 2014-12-02 | 2016-06-08 | 中兴通讯股份有限公司 | Method and device for centralized configuration |
| CN105760168A (en)* | 2016-02-23 | 2016-07-13 | 深圳竹信科技有限公司 | Automatic code file generation method and system |
| WO2017071494A1 (en)* | 2015-10-26 | 2017-05-04 | 阿里巴巴集团控股有限公司 | Application deployment method and apparatus |
| CN107122203A (en)* | 2017-03-20 | 2017-09-01 | 武汉斗鱼网络科技有限公司 | The method to set up and device of a kind of configuration file |
| CN107291458A (en)* | 2017-06-06 | 2017-10-24 | 北京知道创宇信息技术有限公司 | A kind of plug-in unit construction method, system and the server of Web applications |
| CN107357571A (en)* | 2017-06-20 | 2017-11-17 | 珠海格力电器股份有限公司 | Maintenance method and system of equipment component program and component server |
| CN107579865A (en)* | 2017-10-18 | 2018-01-12 | 北京奇虎科技有限公司 | Authority management method, device and system of distributed code server |
| US9875097B2 (en)* | 2015-02-25 | 2018-01-23 | Red Hat, Inc. | Applying configuration alignment in build projects |
| CN107656734A (en)* | 2017-08-21 | 2018-02-02 | 北京北信源软件股份有限公司 | Update method, system, computer-readable recording medium and the storage control of code release information |
| CN107729031A (en)* | 2017-08-25 | 2018-02-23 | 上海壹账通金融科技有限公司 | Code administration method, apparatus, computer equipment and computer-readable recording medium |
| CN108563435A (en)* | 2018-04-19 | 2018-09-21 | 北京百度网讯科技有限公司 | The method and device of code building |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2011126507A1 (en)* | 2010-04-07 | 2011-10-13 | Apple Inc. | Apparatus and method for matching users for online sessions |
| CN105653253A (en)* | 2014-12-02 | 2016-06-08 | 中兴通讯股份有限公司 | Method and device for centralized configuration |
| US9875097B2 (en)* | 2015-02-25 | 2018-01-23 | Red Hat, Inc. | Applying configuration alignment in build projects |
| WO2017071494A1 (en)* | 2015-10-26 | 2017-05-04 | 阿里巴巴集团控股有限公司 | Application deployment method and apparatus |
| CN105760168A (en)* | 2016-02-23 | 2016-07-13 | 深圳竹信科技有限公司 | Automatic code file generation method and system |
| CN107122203A (en)* | 2017-03-20 | 2017-09-01 | 武汉斗鱼网络科技有限公司 | The method to set up and device of a kind of configuration file |
| CN107291458A (en)* | 2017-06-06 | 2017-10-24 | 北京知道创宇信息技术有限公司 | A kind of plug-in unit construction method, system and the server of Web applications |
| CN107357571A (en)* | 2017-06-20 | 2017-11-17 | 珠海格力电器股份有限公司 | Maintenance method and system of equipment component program and component server |
| CN107656734A (en)* | 2017-08-21 | 2018-02-02 | 北京北信源软件股份有限公司 | Update method, system, computer-readable recording medium and the storage control of code release information |
| CN107729031A (en)* | 2017-08-25 | 2018-02-23 | 上海壹账通金融科技有限公司 | Code administration method, apparatus, computer equipment and computer-readable recording medium |
| CN107579865A (en)* | 2017-10-18 | 2018-01-12 | 北京奇虎科技有限公司 | Authority management method, device and system of distributed code server |
| CN108563435A (en)* | 2018-04-19 | 2018-09-21 | 北京百度网讯科技有限公司 | The method and device of code building |
| Title |
|---|
| Mining the Modern Code Review Repositories: A Dataset of People, Process and Product;Xin Yang 等;《2016 IEEE/ACM 13th Working Conference on Mining Software Repositories》;460-463* |
| 基于PaaS的容器引擎管理平台的设计及实现;张婧茹;《中国优秀硕士学位论文全文数据库 信息科技辑》;I139-407* |
| Publication number | Publication date |
|---|---|
| CN111324373A (en) | 2020-06-23 |
| Publication | Publication Date | Title |
|---|---|---|
| US11513789B2 (en) | Application deployment method, apparatus, and system | |
| WO2021135584A1 (en) | Front-end project framework construction method and apparatus, computer device, and storage medium | |
| CN111324373B (en) | Method and device for sub-coding warehouse on multiple engineering files and computing equipment | |
| CN111782339A (en) | Container creation method and device, electronic equipment and storage medium | |
| WO2020233058A1 (en) | Code download method and apparatus, and electronic device and computer storage medium | |
| JP2015018295A (en) | Application management device, application management system, and program | |
| CN108416449B (en) | Operation and maintenance method and device | |
| US8793535B2 (en) | Optimizing system usage when running quality tests in a virtual machine environment | |
| CN108595191A (en) | A kind of application installation method and device | |
| CN108563440A (en) | The automatic adding method of List Controller code, device and readable storage medium storing program for executing | |
| US20160217058A1 (en) | Legacy system | |
| CN114328453A (en) | KV database data management method, device, computing device and storage medium | |
| US20190171989A1 (en) | Dynamic Workflow Control Based on Database Logic | |
| CN112905225A (en) | Method and device for creating continuous integration tool construction task | |
| KR101632288B1 (en) | Method and apparatus for prefetching device drivers for peripheral devices connected to a smartphone prior to high-level operating system(hlos) boot | |
| CN102831002B (en) | Patch discharging method and device | |
| CN102902564B (en) | Method and the device of patch are installed | |
| CN110764911A (en) | Order-based resource scheduling method, device and control system | |
| US20230259347A1 (en) | Container based generation of inputs for generic functions | |
| WO2019091216A1 (en) | Data management method and apparatus, computing device and storage medium | |
| CN114816482A (en) | Upgrading method, device, computer equipment and storage medium for block storage service | |
| CN109150993B (en) | A method, terminal device and storage medium for obtaining a network request aspect | |
| CN115756549A (en) | Method and device for downloading data of big data middlebox and storage medium | |
| US11238013B2 (en) | Scalable access to shared files in a distributed system | |
| WO2017076180A1 (en) | Virtual machine upgrading method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |