CN118132136A - Automatic packaging method and device for application program - Google Patents

Automatic packaging method and device for application program Download PDF

Info

Publication number
CN118132136A
CN118132136A CN202410350268.1A CN202410350268A CN118132136A CN 118132136 A CN118132136 A CN 118132136A CN 202410350268 A CN202410350268 A CN 202410350268A CN 118132136 A CN118132136 A CN 118132136A
Authority
CN
China
Prior art keywords
packaging
file
code
packaged
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410350268.1A
Other languages
Chinese (zh)
Inventor
黄苗炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lvlian Technology Co Ltd
Original Assignee
Shenzhen Lvlian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lvlian Technology Co Ltd filed Critical Shenzhen Lvlian Technology Co Ltd
Priority to CN202410350268.1A priority Critical patent/CN118132136A/en
Publication of CN118132136A publication Critical patent/CN118132136A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/51Source to source
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of computers, and discloses an automatic packaging method and device for application programs, wherein the method comprises the following steps: after a packaging request about a target application is acquired, determining packaging configuration parameters corresponding to the packaging request; determining a source code path corresponding to the packaging request according to the packaging configuration parameters; determining an engineering code path corresponding to the packaging request according to the packaging configuration parameters; based on the source code path, the engineering code path and the code cloning command, performing cloning operation on the source code file to obtain a cloning code file corresponding to the source code, and storing the cloning code file as the engineering code file into a storage space corresponding to the engineering code path; based on the determined automatic packaging flow, packaging the determined files to be packaged to obtain application program files corresponding to the target application; the file to be packaged includes an engineering code file. Therefore, the application program packaging method and device can improve the packaging efficiency of the application program, and are beneficial to improving the deployment efficiency of the application program.

Description

Automatic packaging method and device for application program
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an automatic packaging method and apparatus for an application program.
Background
Currently, in the existing Application (APP) packaging mechanism, a developer needs to manually control and manually monitor a packaging process corresponding to an Application according to a current development requirement, and then manually transmit and deploy a packaged Application file to a corresponding terminal.
However, it is found that the application program packaging method requires a developer to manually monitor the packaging flow, consumes a great deal of labor cost, has low packaging efficiency, and is difficult to be suitable for large-scale software development projects. Therefore, it is important to provide a technical solution that can improve the packaging efficiency of the application program to improve the deployment efficiency of the application program.
Disclosure of Invention
The invention provides an automatic packaging method and device for application programs, which can improve the packaging efficiency of the application programs and are beneficial to improving the deployment efficiency of the application programs.
In order to solve the technical problem, the first aspect of the present invention discloses an automatic packaging method for application programs, which comprises the following steps:
after a packaging request about a target application is acquired, determining packaging configuration parameters corresponding to the packaging request;
Determining a source code path corresponding to the packaging request according to the packaging configuration parameters; the storage space corresponding to the source code path is used for storing source code files required by the packaging request;
determining an engineering code path corresponding to the packaging request according to the packaging configuration parameters; the storage space corresponding to the engineering code path is used for storing code files to be packaged;
Based on the source code path, the engineering code path and the determined code cloning command, performing cloning operation on the source code file to obtain a cloning code file corresponding to the source code, and storing the cloning code file as an engineering code file into a storage space corresponding to the engineering code path;
Based on the determined automatic packaging flow, packaging the determined files to be packaged to obtain application program files corresponding to the target application; the file to be packaged comprises an engineering code file.
As an optional implementation manner, in the first aspect of the present invention, the file to be packaged further includes a Pod configuration file and a library file corresponding to the Pod configuration file;
wherein the method further comprises:
based on the engineering code file, acquiring a Pod configuration file corresponding to the engineering code file from a resource management space corresponding to the target application;
searching whether Pod cache resources matched with the Pod configuration file exist in the resource management space according to the file identification of the Pod configuration file, and obtaining a searching result;
And determining a library file acquisition mode corresponding to the search result, and acquiring the library file corresponding to the Pod configuration file based on the library file acquisition mode.
In an optional implementation manner, in a first aspect of the present invention, the searching, according to the file identifier of the Pod configuration file, whether a Pod cache resource matched with the Pod configuration file exists in the resource management space, to obtain a searching result includes:
Determining an identification encryption value corresponding to the file identification based on the determined encryption algorithm according to the file identification of the Pod configuration file;
judging whether a target encryption value matched with the identification encryption value exists in the resource management space;
When judging that the target encryption value matched with the identification encryption value exists in the resource management space, determining that the searching result is that Pod cache resources matched with the Pod configuration file exist in the resource management space;
And when judging that the target encryption value matched with the identification encryption value does not exist in the resource management space, determining that the Pod cache resource matched with the Pod configuration file does not exist in the resource management space as the search result.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
Acquiring code version information corresponding to the file to be packaged;
verifying whether the file to be packaged meets the file verification conditions corresponding to the packaging request according to the packaging configuration parameters and the code version information, and obtaining a verification result;
And when the verification result is used for indicating that the file to be packaged meets the file verification condition corresponding to the packaging request, triggering and executing the automatic packaging flow based on the determination, and packaging the determined file to be packaged to obtain the operation of the application program file corresponding to the target application.
As an optional implementation manner, in the first aspect of the present invention, the packing configuration parameter includes a packing branch; the code version information corresponding to the file to be packaged comprises a version submitting record corresponding to the engineering code file; the version commit record includes a commit branch;
And verifying whether the file to be packaged meets the file verification condition corresponding to the packaging request according to the packaging configuration parameters and the code version information to obtain a verification result, wherein the verification result comprises the following steps:
judging whether a packaging branch in the packaging configuration parameters is consistent with a submitting branch in the code version information or not;
When judging that the packaging branches in the packaging configuration parameters are consistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged meets the file verification condition corresponding to the packaging request;
And when judging that the packaging branches in the packaging configuration parameters are inconsistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged does not meet the file verification condition corresponding to the packaging request.
As an optional implementation manner, in the first aspect of the present invention, the automated packing procedure includes at least one packing step and an execution sequence corresponding to each packing step;
the step of packaging the determined files to be packaged based on the determined automatic packaging flow to obtain application program files corresponding to the target application comprises the following steps:
determining a current packaging step and a step processing object of the current packaging step about the file to be packaged based on the determined automatic packaging flow and the file to be packaged;
executing the current packaging step on the step processing object to obtain an intermediate result file corresponding to the current packaging step, and recording log information corresponding to the current packaging step;
determining a step execution state corresponding to the current packaging step according to the log information;
When the step execution state is used for indicating that the current packaging step is successfully executed, re-executing the automatic packaging flow and the file to be packaged based on the determination, and determining the operation of the current packaging step and the current packaging step on a step processing object of the file to be packaged until no non-executed packaging step exists in the automatic packaging flow or the step execution state corresponding to any packaging step is used for indicating that the packaging step is failed to execute;
and when no unexecuted packaging step exists in the automatic packaging flow, determining the intermediate result file corresponding to the current packaging step as the application program file corresponding to the target application.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
deploying the application program file to a target terminal corresponding to the packaging request;
The deploying the application program file to the target terminal corresponding to the packaging request includes:
when the packaging configuration parameters comprise a packaging mode corresponding to the packaging request, determining a pushing mode corresponding to the application program file according to the packaging mode;
Generating deployment pushing information corresponding to the pushing mode according to the application program file;
Determining a push receiving end according to the packaging request and the push mode, and sending the deployment push information to the push receiving end;
When response information returned by the push receiving end is received as target response information, deploying the application program file to a target terminal corresponding to the packaging request according to the target response information; and the target response information is used for indicating that the application program file is allowed to be deployed at the target terminal corresponding to the packaging request.
The second aspect of the invention discloses an automatic packaging device for application programs, which comprises:
The determining module is used for determining packaging configuration parameters corresponding to the packaging request after the packaging request about the target application is acquired;
The determining module is further configured to determine a source code path corresponding to the packaging request according to the packaging configuration parameter; the storage space corresponding to the source code path is used for storing source code files required by the packaging request;
The determining module is further configured to determine an engineering code path corresponding to the packaging request according to the packaging configuration parameter; the storage space corresponding to the engineering code path is used for storing code files to be packaged;
The cloning module is used for executing cloning operation on the source code file based on the source code path, the engineering code path and the determined code cloning command to obtain a cloning code file corresponding to the source code, and storing the cloning code file as an engineering code file into a storage space corresponding to the engineering code path;
The packaging module is used for packaging the determined files to be packaged based on the determined automatic packaging flow to obtain application program files corresponding to the target application; the file to be packaged comprises an engineering code file.
As an optional implementation manner, in the second aspect of the present invention, the file to be packaged further includes a Pod configuration file and a library file corresponding to the Pod configuration file;
Wherein the apparatus further comprises:
The first acquisition module is used for acquiring a Pod configuration file corresponding to the engineering code file from a resource management space corresponding to the target application based on the engineering code file;
The searching module is used for searching whether Pod cache resources matched with the Pod configuration file exist in the resource management space according to the file identification of the Pod configuration file to obtain a searching result;
the determining module is further used for determining a library file acquisition mode corresponding to the search result;
The first obtaining module is further configured to obtain a library file corresponding to the Pod configuration file based on the library file obtaining mode.
In a second aspect of the present invention, as an optional implementation manner, the searching module searches whether a Pod cache resource matched with the Pod configuration file exists in the resource management space according to the file identifier of the Pod configuration file, and a specific manner of obtaining a searching result includes:
Determining an identification encryption value corresponding to the file identification based on the determined encryption algorithm according to the file identification of the Pod configuration file;
judging whether a target encryption value matched with the identification encryption value exists in the resource management space;
When judging that the target encryption value matched with the identification encryption value exists in the resource management space, determining that the searching result is that Pod cache resources matched with the Pod configuration file exist in the resource management space;
And when judging that the target encryption value matched with the identification encryption value does not exist in the resource management space, determining that the Pod cache resource matched with the Pod configuration file does not exist in the resource management space as the search result.
As an alternative embodiment, in the second aspect of the present invention, the apparatus further includes:
The second acquisition module is used for acquiring code version information corresponding to the file to be packaged;
the verification module is used for verifying whether the file to be packaged meets the file verification conditions corresponding to the packaging request according to the packaging configuration parameters and the code version information, and obtaining a verification result; and when the verification result is used for indicating that the file to be packaged meets the file verification condition corresponding to the packaging request, triggering the packaging module to execute the automatic packaging flow based on the determination, and packaging the determined file to be packaged to obtain the operation of the application program file corresponding to the target application.
As an optional implementation manner, in the second aspect of the present invention, the packing configuration parameter includes a packing branch; the code version information corresponding to the file to be packaged comprises a version submitting record corresponding to the engineering code file; the version commit record includes a commit branch;
the verification module verifies whether the file to be packaged meets the file verification condition corresponding to the packaging request according to the packaging configuration parameters and the code version information, and the specific mode for obtaining the verification result comprises the following steps:
judging whether a packaging branch in the packaging configuration parameters is consistent with a submitting branch in the code version information or not;
When judging that the packaging branches in the packaging configuration parameters are consistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged meets the file verification condition corresponding to the packaging request;
And when judging that the packaging branches in the packaging configuration parameters are inconsistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged does not meet the file verification condition corresponding to the packaging request.
As an optional implementation manner, in the second aspect of the present invention, the automated packaging process includes at least one packaging step and an execution sequence corresponding to each packaging step;
the specific mode of the packing module for packing the determined files to be packed based on the determined automatic packing flow to obtain the application program files corresponding to the target application comprises the following steps:
determining a current packaging step and a step processing object of the current packaging step about the file to be packaged based on the determined automatic packaging flow and the file to be packaged;
executing the current packaging step on the step processing object to obtain an intermediate result file corresponding to the current packaging step, and recording log information corresponding to the current packaging step;
determining a step execution state corresponding to the current packaging step according to the log information;
When the step execution state is used for indicating that the current packaging step is successfully executed, re-executing the automatic packaging flow and the file to be packaged based on the determination, and determining the operation of the current packaging step and the current packaging step on a step processing object of the file to be packaged until no non-executed packaging step exists in the automatic packaging flow or the step execution state corresponding to any packaging step is used for indicating that the packaging step is failed to execute;
and when no unexecuted packaging step exists in the automatic packaging flow, determining the intermediate result file corresponding to the current packaging step as the application program file corresponding to the target application.
As an alternative embodiment, in the second aspect of the present invention, the apparatus further includes:
The deployment module is used for deploying the application program file to a target terminal corresponding to the packaging request;
the specific way for the deployment module to deploy the application program file to the target terminal corresponding to the packaging request includes:
when the packaging configuration parameters comprise a packaging mode corresponding to the packaging request, determining a pushing mode corresponding to the application program file according to the packaging mode;
Generating deployment pushing information corresponding to the pushing mode according to the application program file;
Determining a push receiving end according to the packaging request and the push mode, and sending the deployment push information to the push receiving end;
When response information returned by the push receiving end is received as target response information, deploying the application program file to a target terminal corresponding to the packaging request according to the target response information; and the target response information is used for indicating that the application program file is allowed to be deployed at the target terminal corresponding to the packaging request.
In a third aspect, the present invention discloses another automatic packaging device for application programs, the device comprising:
A memory storing executable program code;
A processor coupled to the memory;
the processor invokes the executable program code stored in the memory to execute the application program automation packaging method disclosed in the first aspect of the present invention.
A fourth aspect of the present invention discloses a computer storage medium storing computer instructions that, when invoked, are adapted to perform the method of automated packaging of applications disclosed in the first aspect of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
After the packaging request about the target application is obtained, the packaging configuration parameters corresponding to the packaging request can be determined, the corresponding files to be packaged are obtained according to the packaging configuration parameters, the files to be packaged are packaged based on the determined automatic packaging flow, the application program files corresponding to the target application are obtained, automatic packaging of the application program can be realized based on a continuous delivery mode, the packaging flow is not required to be controlled manually, so that the packaging efficiency of the application program is improved, the deployment efficiency of the application program is improved, the subsequent development test efficiency of the application program is improved, and the software development efficiency is improved; in addition, a source code path and an engineering code path corresponding to the packaging request can be determined according to the packaging configuration parameters, and the source code file is cloned to a storage space corresponding to the engineering code path based on the source code path, the engineering code path and the determined code cloning command to obtain the engineering code file, so that the determination accuracy of the code path can be improved, the acquisition accuracy of the file to be packaged is improved, and the packaging accuracy of an application program is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an automated packaging method for application programs according to an embodiment of the present invention;
FIG. 2 is a flow chart of another automated packaging method for application programs according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an automated packaging device for application programs according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an automated packaging device for application programs according to an embodiment of the present invention;
Fig. 5 is a schematic structural diagram of an automatic packaging device for application programs according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention discloses an automatic packaging method and device for application programs, which can determine packaging configuration parameters corresponding to a packaging request after the packaging request about a target application is acquired, acquire corresponding files to be packaged according to the packaging configuration parameters, package the files to be packaged based on the determined automatic packaging flow to obtain application program files corresponding to the target application, realize automatic packaging of the application programs based on a continuous delivery mode, and avoid manual control of the packaging flow, thereby improving the packaging efficiency of the application programs, being beneficial to improving the deployment efficiency of the application programs, and further being beneficial to improving the subsequent development and test efficiency of the application programs so as to improve the software development efficiency; in addition, a source code path and an engineering code path corresponding to the packaging request can be determined according to the packaging configuration parameters, and the source code file is cloned to a storage space corresponding to the engineering code path based on the source code path, the engineering code path and the determined code cloning command to obtain the engineering code file, so that the determination accuracy of the code path can be improved, the acquisition accuracy of the file to be packaged is improved, and the packaging accuracy of an application program is improved. The following will describe in detail.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of an automatic packaging method for application programs according to an embodiment of the invention. The automatic packaging method of the application program described in fig. 1 may be applied to an automatic packaging device of the application program, where the device may include one of an automatic packaging terminal, an automatic packaging device, an automatic packaging system and a server, where the server may include a local server or a cloud server, where the embodiment of the invention is not limited, and the device may also be applied to a software development management platform, where the platform may be used to store and manage development data in a software development process, where the development data may include a code file and/or a resource file and/or test data, and may also include other data related to software development, where the embodiment of the invention is not limited. As shown in fig. 1, the application automation packaging method may include the following operations:
101. After a packaging request about a target application is acquired, a packaging configuration parameter corresponding to the packaging request is determined.
In the embodiment of the invention, a plurality of code versions of target applications can exist, and the content contained in each code version of target application can be different; the packaging request is used for requesting to package the target application of at least one code version so as to acquire an application program file related to the target application; the application program file can be used for being issued and/or deployed on a target terminal corresponding to the packaging request, and the application program file can be an application program file which takes an application program file format corresponding to a target operating system as a file format and can run on the target operating system; the application files may include IPA packages (iPhoneApplication, apple application files) corresponding to the iOS system and/or APKs (Android application package, android application packages) corresponding to the Android system, or may include application files that may use application file formats corresponding to other operating systems as file formats, which is not limited in the embodiment of the present invention.
In the embodiment of the present invention, the packing configuration parameter corresponding to the packing request may include one or more combinations of a code warehouse address corresponding to the target application, a working space identifier corresponding to the target application, a branch corresponding to the target application, an item identifier corresponding to the packing request, a packing mode corresponding to the packing request, a packing sequence number corresponding to the packing request, and a packing description corresponding to the packing request, which is not limited in the embodiment of the present invention; among them, exemplary: the code repository address corresponding to the target application may be a Git address corresponding to the target application; the workspace identifier corresponding to the target application may be a workspace name corresponding to the target application; when packaging is performed based on the Xcode development tool, the item identifier corresponding to the packaging request can be the name of a certain Target of the Target application in the Xcode development tool; the packaging mode corresponding to the packaging request may include a Debug mode (Debug mode) or a Release mode (Release mode); the package description corresponding to the package request may be used to describe a difference between content contained in the target application of the code version required to be packaged by the package request compared to content contained in the target application of the previous code version, for example: the embodiment of the invention is not limited by the newly added content and the repaired problem.
In the embodiment of the invention, optionally, the package configuration parameters corresponding to the package request can be obtained by analyzing the input parameters corresponding to the package request, and the embodiment of the invention is not limited.
102. And determining a source code path corresponding to the packaging request according to the packaging configuration parameters.
In the embodiment of the invention, the storage space corresponding to the source code path is used for storing the source code file required by the package request.
In the embodiment of the invention, optionally, the source code path corresponding to the packaging request can be determined according to the code warehouse address corresponding to the target application, the working space identifier corresponding to the target application, the packaging branch corresponding to the packaging request, the item identifier corresponding to the packaging request and the packaging mode corresponding to the packaging request.
103. And determining an engineering code path corresponding to the packaging request according to the packaging configuration parameters.
In the embodiment of the invention, the storage space corresponding to the engineering code path is used for storing the code file to be packaged.
In an embodiment of the present invention, optionally, after step 103, the method may further include the following operations:
judging whether a working catalog corresponding to the engineering code path exists or not; when the working catalog corresponding to the engineering code path is judged not to exist, the working catalog corresponding to the engineering code path is created, and the embodiment of the invention is not limited.
104. And executing cloning operation on the source code file based on the source code path, the engineering code path and the determined code cloning command to obtain a cloning code file corresponding to the source code, and storing the cloning code file as the engineering code file into a storage space corresponding to the engineering code path.
105. And based on the determined automatic packaging flow, packaging the determined files to be packaged to obtain application program files corresponding to the target application.
In the embodiment of the invention, the determined file to be packaged can comprise at least one file corresponding to the content contained in the target application of the code version to be packaged and/or at least one file required for deploying the target application; the files to be packaged may include engineering code files, pod configuration files (e.g. Podfile), library files corresponding to the Pod configuration files (e.g. third party library files), and resource files (e.g. images, audio and video), and the embodiment of the invention is not limited.
In an embodiment of the present invention, the automated packaging process may include at least one packaging step and an execution order corresponding to each packaging step. Optionally, when the target operating system is an iOS system, the automatic packaging process may be integrated with an Xcode development tool bottom layer execution command, which is not limited in the embodiment of the present invention.
Therefore, after the method described by the embodiment of the invention is implemented, the packing configuration parameters corresponding to the packing request can be determined after the packing request about the target application is obtained, then the corresponding files to be packed are obtained according to the packing configuration parameters, and then the files to be packed are packed based on the determined automatic packing flow, so that the application program files corresponding to the target application are obtained, the automatic packing of the application program can be realized based on the continuous delivery mode, the packing flow is not required to be controlled manually, the packing efficiency of the application program is improved, the deployment efficiency of the application program is improved, the subsequent development test efficiency of the application program is improved, and the software development efficiency is improved; in addition, a source code path and an engineering code path corresponding to the packaging request can be determined according to the packaging configuration parameters, and the source code file is cloned to a storage space corresponding to the engineering code path based on the source code path, the engineering code path and the determined code cloning command to obtain the engineering code file, so that the determination accuracy of the code path can be improved, the acquisition accuracy of the file to be packaged is improved, and the packaging accuracy of an application program is improved.
In an alternative embodiment, before determining the package configuration parameter corresponding to the package request, the method may further include the following operations:
Detecting whether an operation execution terminal is in an occupied state; the operation execution terminal is a terminal for executing the packing operation corresponding to the packing request;
when the operation execution terminal is detected not to be in an occupied state, acquiring an operation execution environment parameter corresponding to the operation execution terminal and a terminal configuration parameter corresponding to the operation execution terminal; wherein the operation execution environment parameters comprise software environment parameters and operation environment parameters;
judging whether the operation execution terminal meets the environment conditions corresponding to the packing operation or not according to the operation execution environment parameters and the terminal configuration parameters;
When the operation execution terminal is judged to meet the environmental conditions corresponding to the packing operation, triggering and executing the operation of determining the packing configuration parameters corresponding to the packing request.
The request initiator corresponding to the packaging request may remotely log in the operation execution terminal, and if other personnel use the operation execution terminal or cannot log in the operation execution terminal at the same time, it is determined that the operation execution terminal is in an occupied state, which is not limited in the embodiment of the present invention.
As can be seen, in this optional embodiment, when it is detected that the operation execution terminal is not in an occupied state, an operation execution environment parameter and a terminal configuration parameter corresponding to the operation execution terminal are obtained, and whether the operation execution terminal meets an environment condition is determined according to the obtained parameter, if yes, an operation in step 101 may be performed, so that a current packaging task monopolizes the operation execution terminal, and the occurrence possibility that the operation environment parameter is modified is reduced, thereby improving the environmental stability of the execution packaging operation; and the subsequent operation can be executed when the operation execution terminal meets the environmental conditions, the configuration requirements on hardware equipment and an operation environment are high, and the execution speed of the packing operation is improved, so that the packing efficiency of the application program is further improved.
In another alternative embodiment, before determining the package configuration parameter corresponding to the package request, the method may further include the following operations:
detecting the residual capacity of the hard disk of the operation execution terminal;
Scanning the hard disk to obtain a hard disk scanning result;
When the hard disk scanning result is used for indicating that the target cleaning object exists in the hard disk, executing hard disk cleaning operation on the target cleaning object in the hard disk, and triggering and executing operation of determining the packing configuration parameters corresponding to the packing request after the hard disk cleaning operation is executed.
The target cleaning object may include an expired history application file and/or a history packaging cache resource, which is not limited in the embodiment of the present invention.
Optionally, when detecting that the remaining capacity of the hard disk of the operation execution terminal is lower than or equal to the early warning capacity, generating capacity early warning information, and the embodiment of the invention is not limited.
Alternatively, the above operation of the present optional embodiment may be performed after it is determined that the operation performing terminal satisfies the environmental condition corresponding to the packaging operation, or the above operation of the present optional embodiment may be directly performed without performing the operation of the previous optional embodiment, which is not limited by the embodiment of the present invention.
Therefore, the optional embodiment can automatically check the use condition of the hard disk of the operation execution terminal, automatically clear the overdue cache, and be beneficial to timely managing the capacity of the hard disk, thereby being beneficial to reducing the possibility of incapability of packing caused by the insufficient capacity of the hard disk in the packing process, and further being beneficial to improving the execution reliability of packing operation; and, reserving enough hard disk capacity can be beneficial to improving the packing integrity and packing reliability of the application program.
In yet another alternative embodiment, the method may further comprise the operations of:
acquiring code version information corresponding to a file to be packaged;
Verifying whether the file to be packaged meets the file verification conditions corresponding to the packaging request according to the packaging configuration parameters and the code version information, and obtaining a verification result;
when the verification result is used for indicating that the file to be packaged meets the file verification condition corresponding to the packaging request, triggering and executing the operation of packaging the determined file to be packaged based on the determined automatic packaging flow to obtain the application program file corresponding to the target application.
The code version information corresponding to the file to be packaged may include a version submission record corresponding to the engineering code file contained in the file to be packaged; alternatively, the version Commit record may include one or more of a Commit version (e.g., commit branch), a version Commit person, a version Commit time, a version Commit ID (e.g., unique Commit ID may be generated by an application that commits any version at Git), and a version Commit log, as embodiments of the present invention are not limited.
It can be seen that, in this optional embodiment, whether the file to be packaged meets the corresponding file verification condition can be verified according to the obtained code version information and the packaging configuration parameter of the file to be packaged, and when the verification that the file to be packaged meets the corresponding file verification condition is obtained, the operation of executing step 103 is triggered, and whether the obtained file to be packaged is the file required by the packaging request can be verified, so that the reliability and accuracy of the file to be packaged are improved, further the execution accuracy and reliability of the packaging operation are improved, and the packaging accuracy of the application program is improved.
In this optional embodiment, optionally, according to the package configuration parameter and the code version information, verifying whether the file to be packaged meets the file verification condition corresponding to the package request, to obtain the verification result may include the following operations:
Judging whether a packaging branch in the packaging configuration parameters is consistent with a submitting branch in the code version information or not;
when the packaging branches in the packaging configuration parameters are judged to be consistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged meets the file verification conditions corresponding to the packaging request;
When the packaging branches in the packaging configuration parameters are inconsistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged does not meet the file verification conditions corresponding to the packaging request.
Therefore, the optional embodiment can also determine whether the file to be packaged meets the file verification conditions by judging whether the packaging branch in the packaging configuration parameters is consistent with the submitting branch in the code version information, so that the verification accuracy of the file to be packaged can be improved, and the reliability and the accuracy of the file to be packaged are further improved.
In yet another alternative embodiment, based on the determined automatic packaging flow, packaging the determined file to be packaged to obtain an application file corresponding to the target application, which may include the following operations:
determining a current packaging step and a step processing object of the current packaging step about the file to be packaged based on the determined automatic packaging flow and the file to be packaged;
Executing the current packaging step on the step processing object to obtain an intermediate result file corresponding to the current packaging step, and recording log information corresponding to the current packaging step;
Determining a step execution state corresponding to the current packaging step according to the log information;
When the step execution state is used for indicating that the current packaging step is successfully executed, re-executing the operation of determining the step processing object of the current packaging step and the current packaging step on the file to be packaged based on the determined automatic packaging flow and the file to be packaged until no non-executed packaging step exists in the automatic packaging flow or the step execution state corresponding to any packaging step is used for indicating that the packaging step is failed to execute;
and when no unexecuted packaging step exists in the automatic packaging flow, determining the intermediate result file corresponding to the current packaging step as the application program file corresponding to the target application.
Wherein, all the packaging steps may include one or more of compiling step, resource file processing step, code signing step, description file configuration step and compressing step, and the embodiment of the present invention is not limited.
The log information corresponding to the current packaging step may include one or more combinations of operation details corresponding to the current packaging step, execution time consumption corresponding to the current packaging step, and execution progress corresponding to the current packaging step, which is not limited in the embodiment of the present invention.
It can be seen that, this optional embodiment can determine, based on the determined automatic packaging procedure and the file to be packaged, a current packaging step and a corresponding step processing object, then execute the current packaging step on the step processing object to obtain a corresponding intermediate result file, record log information corresponding to the current packaging step, then determine, according to the log information, a step execution state corresponding to the current packaging step, if the step execution state indicates that the current packaging step is successfully executed, re-execute the operation of determining the current packaging step and the corresponding step processing object until there is no unexecuted packaging step or no failure in executing any packaging step, and when there is no unexecuted packaging step, determine, as an application file corresponding to the target application, a middle result file corresponding to the current packaging step, can be used to wait for a next step of the packaging procedure for a long time without manual monitoring and controlling the packaging procedure, thereby implementing automatic packaging of the application program, and improving packaging efficiency and packaging convenience of the application program; and log printing can be carried out on each packaging step, specific packaging execution conditions can be provided, and the accuracy and comprehensiveness of information recording in the application program packaging process are improved, so that the positioning efficiency of the packaging process is improved.
In this optional embodiment, optionally, determining, based on the determined automatic packaging procedure and the file to be packaged, the current packaging step and the step processing object of the current packaging step with respect to the file to be packaged may include the following operations:
when the current packaging step is determined for the first time, determining the packaging step with the first execution sequence in the determined automatic packaging flow as the current packaging step, and determining the file to be packaged as a step processing object corresponding to the current packaging step;
And when the current packaging step is not determined for the first time, determining the next packaging step adjacent to the execution sequence of the current packaging step determined last in the automatic packaging flow as the current packaging step, and determining an intermediate result file corresponding to the current packaging step determined last as a step processing object corresponding to the current packaging step.
It can be seen that, in this alternative embodiment, when the current packaging step is determined for the first time, the packaging step with the first execution order is determined as the current packaging step, and the file to be packaged is determined as the step processing object, when the current packaging step is not determined for the first time, the packaging step after the packaging step with the last execution order is determined as the current packaging step, and the intermediate result file of the packaging step with the last execution order is determined as the step processing object, so that the packaging step in the automatic packaging process to be executed next time can be automatically determined, and the execution efficiency of the packaging process is improved, thereby improving the packaging efficiency of the application program.
In this alternative embodiment, optionally, the method may further comprise the operations of:
When the step execution state corresponding to any packing step is used for indicating that the packing step fails to be executed, interrupting the execution of an automatic packing flow of the file to be packed, and generating packing failure information corresponding to the file to be packed according to the log information corresponding to the current packing step.
The packaging failure information corresponding to the file to be packaged comprises a current packaging step of the execution failure and a corresponding packaging failure reason.
It can be seen that, in this optional embodiment, when any of the packing steps fails to be executed, the packing flow is interrupted, and packing failure information is generated according to the corresponding log information, so that an operator can be assisted to quickly locate the failed step and quickly obtain the failure cause, which is beneficial to improving the efficiency of subsequently solving the problem, thereby improving the reliability of the packing flow of the application program.
In yet another alternative embodiment, the method may further comprise:
Generating a packaging record corresponding to the application program file;
Determining export parameters corresponding to the application program file; the export parameters may include an export name and an export path corresponding to the application file;
And exporting the application program file and the package record information to a storage space corresponding to the export path based on the export parameters.
Therefore, the optional embodiment can generate the package record corresponding to the application program file, determine the export parameter corresponding to the application program file, export the application program file and the package record information to the corresponding storage space based on the export parameter, and facilitate the subsequent operation to use the application program file and facilitate the understanding of the content of the application program file, thereby improving the deployment efficiency of the application program file.
In yet another alternative embodiment, the method may further comprise the operations of:
And deploying the application program file to a target terminal corresponding to the packaging request.
Therefore, the optional embodiment can deploy the application program file to the target terminal after the application program file is obtained by packing, and can improve the deployment efficiency of the application program, thereby being beneficial to improving the development test efficiency and the use efficiency of the application program.
In this optional embodiment, optionally, deploying the application file to the target terminal corresponding to the packaging request may include the following operations:
When the packing configuration parameters comprise a packing mode corresponding to the packing request, determining a pushing mode corresponding to the application program file according to the packing mode;
generating deployment pushing information corresponding to the pushing mode according to the application program file;
according to the packaging request and the pushing mode, a pushing receiving end is determined, and deployment pushing information is sent to the pushing receiving end;
When response information returned by the push receiving end is received as target response information, deploying the application program file to a target terminal corresponding to the packaging request according to the target response information; the target response information is used for indicating that the application program file is allowed to be deployed at the target terminal corresponding to the packaging request.
Optionally, when the packaging mode is the debug mode, the pushing mode corresponding to the application program may include a direct deployment pushing mode; when the packaging mode is the release mode, the push mode corresponding to the application program may include a demand confirmation push mode, and the embodiment of the invention is not limited.
The method includes the steps that when a packaging mode is a debugging mode, a pushing mode corresponding to an application program is determined to be a direct deployment pushing mode, deployment pushing information containing two-dimension codes corresponding to the direct deployment pushing mode is generated according to application program files and packaging records corresponding to the application program files, then a terminal corresponding to a request initiating person corresponding to a packaging request is determined to be a pushing receiving end according to the packaging request and the pushing mode, the deployment pushing information is sent to the pushing receiving end, after the request initiating person scans the two-dimension codes in the deployment pushing information, the pushing receiving end returns target response information, the terminal corresponding to the request initiating person is used as a target terminal corresponding to the packaging request, and the application program files are deployed to the target terminal.
When the packaging mode is the release mode, the pushing mode corresponding to the application program is determined to be a demand confirmation pushing mode, the application program file needs to be released to an application store platform corresponding to the target application program first, deployment pushing information corresponding to the demand confirmation pushing mode is generated according to the application program file and a packaging record corresponding to the application program file, then a terminal installed with the target application is determined to be a pushing receiving end according to a packaging request and the pushing mode, the deployment pushing information is sent to the pushing receiving end, and when the pushing receiving end installed with the target application returns target response information (for example, the response information returned by the pushing receiving end comprises a version allowing updating of the installed target application to the version corresponding to the current packaged application program file), the terminal installed with the target application, which returns the target response information, is used as a target terminal corresponding to the packaging request, and the application program file is deployed to the target terminal.
It can be seen that, in this optional embodiment, the push manner corresponding to the application file may be determined according to the packaging mode, deployment push information corresponding to the push manner may be regenerated, then the push receiving end may be determined according to the packaging request and the push manner, the deployment push information may be sent to the push receiving end, if response information returned by the push receiving end is received as target corresponding information, the application file may be deployed to the target terminal according to the target corresponding information, so that the execution accuracy of the deployment operation may be improved, and thus the deployment accuracy of the application may be improved.
Example two
Referring to fig. 2, fig. 2 is a flow chart of an automatic packaging method for application programs according to an embodiment of the invention. The automatic packaging method of the application program described in fig. 2 may be applied to an automatic packaging device of the application program, where the device may include one of an automatic packaging terminal, an automatic packaging device, an automatic packaging system and a server, where the server may include a local server or a cloud server, where the embodiment of the invention is not limited, and the device may also be applied to a software development management platform, where the platform may be used to store and manage development data in a software development process, where the development data may include a code file and/or a resource file and/or test data, and may also include other data related to software development, where the embodiment of the invention is not limited. As shown in fig. 2, the application automation packaging method may include the following operations:
201. after a packaging request about a target application is acquired, a packaging configuration parameter corresponding to the packaging request is determined.
202. And determining a source code path corresponding to the packaging request according to the packaging configuration parameters.
203. And determining an engineering code path corresponding to the packaging request according to the packaging configuration parameters.
204. And executing cloning operation on the source code file based on the source code path, the engineering code path and the determined code cloning command to obtain a cloning code file corresponding to the source code, and storing the cloning code file as the engineering code file into a storage space corresponding to the engineering code path.
205. Based on the engineering code file, acquiring a Pod configuration file corresponding to the engineering code file from a resource management space corresponding to the target application.
In the embodiment of the invention, optionally, the Pod configuration file associated with the engineering code file may be obtained from the resource management space; furthermore, the Pod configuration file required by compiling/executing the code corresponding to the engineering code file can be obtained from the resource management space by analyzing the content recorded by the engineering code file; the embodiment of the invention is not limited.
206. And searching whether the Pod cache resource matched with the Pod configuration file exists in the resource management space according to the file identification of the Pod configuration file, and obtaining a searching result.
207. And determining a library file acquisition mode corresponding to the search result.
208. Based on the library file acquisition mode, library files corresponding to the Pod configuration files are acquired.
In the embodiment of the present invention, the library file may be a third party library file/a third party dependency file by way of example, and the embodiment of the present invention is not limited thereto.
209. And based on the determined automatic packaging flow, packaging the determined files to be packaged to obtain application program files corresponding to the target application.
In the embodiment of the invention, the files to be packaged can comprise engineering code files, pod configuration files and library files corresponding to the Pod configuration files.
In the embodiment of the present invention, for other detailed descriptions of step 201 to step 204 and step 209, please refer to the detailed descriptions of step 101 to step 105 in the first embodiment, and the detailed descriptions of the embodiment of the present invention are omitted.
Therefore, after the method described by the embodiment of the invention is implemented, the packing configuration parameters corresponding to the packing request can be determined after the packing request about the target application is obtained, then the corresponding files to be packed are obtained according to the packing configuration parameters, and then the files to be packed are packed based on the determined automatic packing flow, so that the application program files corresponding to the target application are obtained, the automatic packing of the application program can be realized based on the continuous delivery mode, the packing flow is not required to be controlled manually, the packing efficiency of the application program is improved, the deployment efficiency of the application program is improved, the subsequent development test efficiency of the application program is improved, and the software development efficiency is improved. In addition, a source code path and an engineering code path corresponding to the packaging request can be determined according to the packaging configuration parameters, and the source code file is cloned to a storage space corresponding to the engineering code path based on the source code path, the engineering code path and the determined code cloning command to obtain the engineering code file, so that the determination accuracy of the code path can be improved, the acquisition accuracy of the file to be packaged is improved, and the packaging accuracy of an application program is improved. In addition, the Pod configuration file corresponding to the engineering code file can be obtained from the resource management space corresponding to the target application, then according to the file identification of the Pod configuration file, whether Pod cache resources matched with the Pod configuration file exist in the resource management space or not is searched for to obtain a search result, then a library file obtaining mode corresponding to the search result is determined, and a library file corresponding to the Pod configuration file is obtained based on the library file obtaining mode, so that the obtaining efficiency of the Pod configuration file can be improved, the searching efficiency of the Pod cache resources is improved, the obtaining flexibility and the obtaining efficiency of the library file are improved, and the packaging efficiency of the application program is improved.
In an alternative embodiment, according to the file identifier of the Pod configuration file, searching whether the Pod cache resource matched with the Pod configuration file exists in the resource management space to obtain a searching result may include the following operations:
determining an identification encryption value corresponding to the file identification based on the determined encryption algorithm according to the file identification of the Pod configuration file;
Judging whether a target encryption value matched with the identification encryption value exists in the resource management space;
When judging that the target encryption value matched with the identification encryption value exists in the resource management space, determining that the search result is that Pod cache resources matched with the Pod configuration file exist in the resource management space;
and when judging that the target encryption value matched with the identification encryption value does not exist in the resource management space, determining that the searching result is that the Pod cache resource matched with the Pod configuration file does not exist in the resource management space.
Optionally, the encryption algorithm may be any hash algorithm, for example: MD5 Algorithm (MESSAGE DIGEST Algorithm 5, information summary Algorithm), embodiments of the present invention are not limited; further, when the encryption algorithm is the MD5 algorithm, the identification encryption value corresponding to the file identification may be a hash value.
Optionally, the target encryption value matched with the identifier encryption value may be a target encryption value consistent with the identifier encryption value, or may be a target encryption value associated with the identifier encryption value, which is not limited in the embodiment of the present invention; further, the target encryption value may be used to represent a directory identifier of one of the cached resource directories in the resource management space, which is not limited by the embodiment of the present invention.
It can be seen that, this optional embodiment can also determine, based on an encryption algorithm, an identifier encryption value corresponding to a file identifier of a Pod configuration file, then determine whether a target encryption value matched with the identifier encryption value exists in the resource management space, if yes, determine that a search result is that a cache resource matched with the Pod configuration file exists, and if no, determine that a search result is that a cache resource matched with the Pod configuration file does not exist, so that the resource storage security is improved, and meanwhile, the search accuracy of the Pod cache resource is improved, thereby improving the acquisition accuracy of the library file.
In this optional embodiment, optionally, determining the library file acquisition manner corresponding to the search result may include the following operations:
When the search result is used for indicating that Pod cache resources matched with the Pod configuration file exist in the resource management space, determining that the library file acquisition mode is a cache copy mode; the cache copy mode is used for copying the Pod cache resource and taking a copy result as a library file corresponding to the Pod configuration file;
When the search result is used for indicating that the Pod cache resource matched with the Pod configuration file does not exist in the resource management space, determining that the library file acquisition mode is a network acquisition mode; the network acquisition mode is used for pulling the library file corresponding to the Pod configuration file from the network.
It can be seen that, in this optional embodiment, when the Pod cache resource is found to exist, it is further determined that the library file obtaining mode is a cache copy mode, when the Pod cache resource is found not to exist, it is determined that the library file obtaining mode is a network obtaining mode, the cache resource can be quickly copied when the third party library is cached, the cache resource does not need to be repeatedly downloaded, and therefore obtaining time consumption of the library file is reduced, obtaining efficiency of the library file is improved, and packaging efficiency of an application program is further improved.
In another alternative embodiment, after step 201, the method may further include the operations of:
acquiring a plurality of preset parameter types and parameter conditions corresponding to each preset parameter type;
For each preset parameter type, checking whether the preset parameter type exists in all parameter types contained in the packaging configuration parameters and whether parameters corresponding to the preset parameter type in the packaging configuration parameters meet parameter conditions corresponding to the preset parameter type, and obtaining a first checking result corresponding to the preset parameter type;
Determining a second verification result corresponding to the packaging configuration parameters according to the first verification results corresponding to all the preset parameter types;
When the second check result is used to indicate that the package configuration parameter check passes, the operation of step 202 is triggered to be performed.
Wherein different parameter conditions can be set for different preset parameter types, for example: the parameter condition corresponding to the package description type may be set as: if the value of the package description in the package configuration parameter is not null, the corresponding first verification result may be: "no package description" and embodiments of the present invention are not limited. Optionally, if there is a value corresponding to a certain preset parameter type that does not conform to the corresponding value format, the corresponding first verification result may be: the parameter verification of the preset parameter type is not passed. Further optionally, if there are more than a preset number of first check results for indicating that the parameter check of the preset parameter type fails, determining that the second check result is that the package configuration parameter check fails, and the embodiment of the invention is not limited.
Therefore, after the packaging configuration parameters are determined, whether the parameters corresponding to each preset parameter type in the packaging configuration parameters exist or not and whether the parameters meet the corresponding parameter conditions can be checked one by one, a first check result corresponding to each preset parameter type is obtained, and then, a second check result corresponding to the packaging configuration parameters is determined by combining all the first check results.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an automatic packaging device for application programs according to an embodiment of the invention. The automatic packaging device for the application program described in fig. 3 may include one of an automatic packaging terminal, an automatic packaging device, an automatic packaging system and a server, where the server may include a local server or a cloud server, and the embodiment of the invention is not limited, and the device may also be applied to a software development management platform, where the platform may be used to store and manage development data in a software development process, and the development data may include a code file and/or a resource file and/or test data, and may also include other data related to software development, where the embodiment of the invention is not limited. As shown in fig. 3, the application automation packaging device may include:
A determining module 301, configured to determine a packaging configuration parameter corresponding to a packaging request after obtaining the packaging request about the target application;
The determining module 301 is further configured to determine a source code path corresponding to the packaging request according to the packaging configuration parameter; the storage space corresponding to the source code path is used for storing source code files required by the packaging request;
The determining module 301 is further configured to determine an engineering code path corresponding to the packaging request according to the packaging configuration parameter; the storage space corresponding to the engineering code path is used for storing the code file to be packaged;
The cloning module 302 is configured to execute a cloning operation on the source code file based on the source code path, the engineering code path and the determined code cloning command, obtain a cloning code file corresponding to the source code, and store the cloning code file as the engineering code file into a storage space corresponding to the engineering code path;
The packaging module 303 is configured to package the determined file to be packaged based on the determined automatic packaging flow, so as to obtain an application program file corresponding to the target application; the file to be packaged includes an engineering code file.
Therefore, after the device described by the embodiment of the invention is implemented, the packaging configuration parameters corresponding to the packaging request can be determined after the packaging request about the target application is obtained, the corresponding files to be packaged are obtained according to the packaging configuration parameters, and then the files to be packaged are packaged based on the determined automatic packaging flow, so that the application program files corresponding to the target application are obtained, the automatic packaging of the application program can be realized based on the continuous delivery mode, the packaging flow is not required to be controlled manually, the packaging efficiency of the application program is improved, the deployment efficiency of the application program is improved, the subsequent development test efficiency of the application program is improved, and the software development efficiency is improved. In addition, a source code path and an engineering code path corresponding to the packaging request can be determined according to the packaging configuration parameters, and the source code file is cloned to a storage space corresponding to the engineering code path based on the source code path, the engineering code path and the determined code cloning command to obtain the engineering code file, so that the determination accuracy of the code path can be improved, the acquisition accuracy of the file to be packaged is improved, and the packaging accuracy of an application program is improved.
In an alternative embodiment, the files to be packaged further include Pod configuration files and library files corresponding to the Pod configuration files;
Wherein, as shown in fig. 4, the device may further include:
A first obtaining module 304, configured to obtain, based on the engineering code file, a Pod configuration file corresponding to the engineering code file from a resource management space corresponding to the target application;
The searching module 305 is configured to search whether a Pod cache resource matched with the Pod configuration file exists in the resource management space according to the file identifier of the Pod configuration file, so as to obtain a searching result;
The determining module 301 is further configured to determine a library file acquisition manner corresponding to the search result;
the first obtaining module 304 is further configured to obtain a library file corresponding to the Pod configuration file based on the library file obtaining manner.
It can be seen that the device described in this optional embodiment can also obtain the Pod configuration file corresponding to the engineering code file from the resource management space corresponding to the target application, then find whether there is a Pod cache resource matching with the Pod configuration file in the resource management space according to the file identifier of the Pod configuration file, obtain the search result, determine the library file obtaining mode corresponding to the search result, and obtain the library file corresponding to the Pod configuration file based on the library file obtaining mode, so that the obtaining efficiency of the Pod configuration file can be improved, thereby improving the searching efficiency of the Pod cache resource, further improving the obtaining flexibility and obtaining efficiency of the library file, and being beneficial to improving the packaging efficiency of the application program.
In this optional embodiment, optionally, the searching module 305 searches whether a Pod cache resource matched with the Pod configuration file exists in the resource management space according to the file identifier of the Pod configuration file, and a specific manner of obtaining the searching result may include:
determining an identification encryption value corresponding to the file identification based on the determined encryption algorithm according to the file identification of the Pod configuration file;
Judging whether a target encryption value matched with the identification encryption value exists in the resource management space;
When judging that the target encryption value matched with the identification encryption value exists in the resource management space, determining that the search result is that Pod cache resources matched with the Pod configuration file exist in the resource management space;
and when judging that the target encryption value matched with the identification encryption value does not exist in the resource management space, determining that the searching result is that the Pod cache resource matched with the Pod configuration file does not exist in the resource management space.
It can be seen that the device described in this optional embodiment may further determine, based on an encryption algorithm, an identifier encryption value corresponding to a file identifier of the Pod configuration file, and then determine whether a target encryption value matched with the identifier encryption value exists in the resource management space, if yes, determine that a search result is that a cache resource matched with the Pod configuration file exists, and if no, determine that the search result is that no cache resource matched with the Pod configuration file exists, thereby improving the storage security of the resource and the search accuracy of the Pod cache resource, and further improving the acquisition accuracy of the library file.
In another alternative embodiment, as shown in fig. 4, the apparatus may further include:
The second obtaining module 306 is configured to obtain code version information corresponding to a file to be packaged;
The verification module 307 is configured to verify whether the file to be packaged meets the file verification condition corresponding to the packaging request according to the packaging configuration parameter and the code version information, and obtain a verification result; when the verification result is used for indicating that the file to be packaged meets the file verification condition corresponding to the packaging request, the packaging module 303 is triggered to execute the operation of packaging the determined file to be packaged based on the determined automatic packaging flow, and the application program file corresponding to the target application is obtained.
It can be seen that the device described in this optional embodiment is capable of verifying whether the file to be packaged meets the corresponding file verification condition according to the obtained code version information and the packaging configuration parameter of the file to be packaged, and triggering the operation of executing step 103 when the verification results in that the file to be packaged meets the corresponding file verification condition, so as to verify whether the obtained file to be packaged is the file required by the packaging request, thereby improving the reliability and accuracy of the file to be packaged, further being beneficial to improving the execution accuracy and reliability of the packaging operation, and being beneficial to improving the packaging accuracy of the application program.
In this alternative embodiment, the packaging configuration parameters include packaging branches; the code version information corresponding to the file to be packaged comprises a version submitting record corresponding to the engineering code file; the version commit record includes a commit branch;
the verification module 307 may verify whether the file to be packaged meets the file verification condition corresponding to the packaging request according to the packaging configuration parameter and the code version information, and the specific manner of obtaining the verification result may include:
Judging whether a packaging branch in the packaging configuration parameters is consistent with a submitting branch in the code version information or not;
when the packaging branches in the packaging configuration parameters are judged to be consistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged meets the file verification conditions corresponding to the packaging request;
When the packaging branches in the packaging configuration parameters are inconsistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged does not meet the file verification conditions corresponding to the packaging request.
It can be seen that the device described in this optional embodiment can also determine whether the file to be packaged meets the above-mentioned file verification condition by determining whether the packaging branch in the packaging configuration parameter is consistent with the submitting branch in the code version information, so that the verification accuracy of the file to be packaged can be improved, and the reliability and accuracy of the file to be packaged can be further improved.
In yet another alternative embodiment, the automated packaging process includes at least one packaging step and a corresponding order of execution for each packaging step;
The specific manner of the packing module 303 to pack the determined file to be packed to obtain the application program file corresponding to the target application based on the determined automatic packing flow may include:
determining a current packaging step and a step processing object of the current packaging step about the file to be packaged based on the determined automatic packaging flow and the file to be packaged;
Executing the current packaging step on the step processing object to obtain an intermediate result file corresponding to the current packaging step, and recording log information corresponding to the current packaging step;
Determining a step execution state corresponding to the current packaging step according to the log information;
When the step execution state is used for indicating that the current packaging step is successfully executed, re-executing the operation of determining the step processing object of the current packaging step and the current packaging step on the file to be packaged based on the determined automatic packaging flow and the file to be packaged until no non-executed packaging step exists in the automatic packaging flow or the step execution state corresponding to any packaging step is used for indicating that the packaging step is failed to execute;
and when no unexecuted packaging step exists in the automatic packaging flow, determining the intermediate result file corresponding to the current packaging step as the application program file corresponding to the target application.
It can be seen that, the device described in this optional embodiment is implemented to determine, based on the determined automatic packaging procedure and the file to be packaged, a current packaging step and a corresponding step processing object, then execute the current packaging step on the step processing object to obtain a corresponding intermediate result file, record log information corresponding to the current packaging step, and then determine, according to the log information, a step execution state corresponding to the current packaging step, if the step execution state indicates that the current packaging step is successfully executed, re-execute the operation of determining the current packaging step and the corresponding step processing object until there is no unexecuted packaging step or no packaging step fails to execute, and when there is no unexecuted packaging step, determine, as an application file corresponding to the target application, a next step of waiting for the packaging procedure manually for a long time is not needed, and perform corresponding selection, that is, without manually monitoring and controlling the packaging procedure, so as to implement automatic packaging of the application program, thereby improving packaging efficiency and packaging convenience of the application program; and log printing can be carried out on each packaging step, specific packaging execution conditions can be provided, and the accuracy and comprehensiveness of information recording in the application program packaging process are improved, so that the positioning efficiency of the packaging process is improved.
In yet another alternative embodiment, as shown in fig. 4, the apparatus may further include:
a deployment module 308, configured to deploy an application file to a target terminal corresponding to the packaging request;
The specific manner of the deployment module 308 deploying the application file to the target terminal corresponding to the packaging request may include:
When the packing configuration parameters comprise a packing mode corresponding to the packing request, determining a pushing mode corresponding to the application program file according to the packing mode;
generating deployment pushing information corresponding to the pushing mode according to the application program file;
according to the packaging request and the pushing mode, a pushing receiving end is determined, and deployment pushing information is sent to the pushing receiving end;
When response information returned by the push receiving end is received as target response information, deploying the application program file to a target terminal corresponding to the packaging request according to the target response information; the target response information is used for indicating that the application program file is allowed to be deployed at the target terminal corresponding to the packaging request.
Therefore, the device described by implementing the optional embodiment can deploy the application program file to the target terminal after the application program file is obtained by packing, so that the deployment efficiency of the application program can be improved, and the development test efficiency and the use efficiency of the application program can be improved; and the deployment push information corresponding to the push mode can be regenerated according to the push mode corresponding to the application program file, then the push receiving end is determined according to the package request and the push mode, the deployment push information is sent to the push receiving end, if the response information returned by the push receiving end is received as the target corresponding information, the application program file is deployed to the target terminal according to the target corresponding information, and the execution accuracy of the deployment operation can be improved, so that the deployment accuracy of the application program is improved.
Example IV
Referring to fig. 5, fig. 5 is a schematic structural diagram of an automatic packaging device for application programs according to another embodiment of the present invention. As shown in fig. 5, the application automation packaging device may include:
A memory 401 storing executable program codes;
A processor 402 coupled with the memory 401;
the processor 402 invokes executable program code stored in the memory 401 to perform the steps in the application automation packaging method described in the first or second embodiment of the present invention.
Example five
The embodiment of the invention discloses a computer storage medium which stores computer instructions for executing the steps in the automatic packaging method for application programs described in the first or second embodiment of the invention when the computer instructions are called.
Example six
Embodiments of the present invention disclose a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps of the application automation packaging method described in embodiment one or embodiment two.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that: the embodiment of the invention discloses an automatic packaging method and device for application programs, which are disclosed as preferred embodiments of the invention, and are only used for illustrating the technical scheme of the invention, but not limiting the technical scheme; although the invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that; the technical scheme recorded in the various embodiments can be modified or part of technical features in the technical scheme can be replaced equivalently; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. An automated packaging method for an application program, the method comprising:
after a packaging request about a target application is acquired, determining packaging configuration parameters corresponding to the packaging request;
Determining a source code path corresponding to the packaging request according to the packaging configuration parameters; the storage space corresponding to the source code path is used for storing source code files required by the packaging request;
determining an engineering code path corresponding to the packaging request according to the packaging configuration parameters; the storage space corresponding to the engineering code path is used for storing code files to be packaged;
Based on the source code path, the engineering code path and the determined code cloning command, performing cloning operation on the source code file to obtain a cloning code file corresponding to the source code, and storing the cloning code file as an engineering code file into a storage space corresponding to the engineering code path;
Based on the determined automatic packaging flow, packaging the determined files to be packaged to obtain application program files corresponding to the target application; the file to be packaged comprises an engineering code file.
2. The automated packaging method of an application program according to claim 1, wherein the file to be packaged further comprises a Pod configuration file and a library file corresponding to the Pod configuration file;
wherein the method further comprises:
based on the engineering code file, acquiring a Pod configuration file corresponding to the engineering code file from a resource management space corresponding to the target application;
searching whether Pod cache resources matched with the Pod configuration file exist in the resource management space according to the file identification of the Pod configuration file, and obtaining a searching result;
And determining a library file acquisition mode corresponding to the search result, and acquiring the library file corresponding to the Pod configuration file based on the library file acquisition mode.
3. The method for automatically packaging an application program according to claim 2, wherein searching whether a Pod cache resource matched with the Pod configuration file exists in the resource management space according to the file identifier of the Pod configuration file to obtain a search result comprises:
Determining an identification encryption value corresponding to the file identification based on the determined encryption algorithm according to the file identification of the Pod configuration file;
judging whether a target encryption value matched with the identification encryption value exists in the resource management space;
When judging that the target encryption value matched with the identification encryption value exists in the resource management space, determining that the searching result is that Pod cache resources matched with the Pod configuration file exist in the resource management space;
And when judging that the target encryption value matched with the identification encryption value does not exist in the resource management space, determining that the Pod cache resource matched with the Pod configuration file does not exist in the resource management space as the search result.
4. The automated application packaging method of any one of claims 1-3, further comprising:
Acquiring code version information corresponding to the file to be packaged;
verifying whether the file to be packaged meets the file verification conditions corresponding to the packaging request according to the packaging configuration parameters and the code version information, and obtaining a verification result;
And when the verification result is used for indicating that the file to be packaged meets the file verification condition corresponding to the packaging request, triggering and executing the automatic packaging flow based on the determination, and packaging the determined file to be packaged to obtain the operation of the application program file corresponding to the target application.
5. The automated packaging method of application of claim 4, wherein the packaging configuration parameters comprise packaging branches; the code version information corresponding to the file to be packaged comprises a version submitting record corresponding to the engineering code file; the version commit record includes a commit branch;
And verifying whether the file to be packaged meets the file verification condition corresponding to the packaging request according to the packaging configuration parameters and the code version information to obtain a verification result, wherein the verification result comprises the following steps:
judging whether a packaging branch in the packaging configuration parameters is consistent with a submitting branch in the code version information or not;
When judging that the packaging branches in the packaging configuration parameters are consistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged meets the file verification condition corresponding to the packaging request;
And when judging that the packaging branches in the packaging configuration parameters are inconsistent with the submitting branches in the code version information, determining that the verification result is that the file to be packaged does not meet the file verification condition corresponding to the packaging request.
6. The automated packaging method of an application of claim 1,2,3 or 5, wherein the automated packaging process comprises at least one packaging step and a corresponding execution order for each packaging step;
the step of packaging the determined files to be packaged based on the determined automatic packaging flow to obtain application program files corresponding to the target application comprises the following steps:
determining a current packaging step and a step processing object of the current packaging step about the file to be packaged based on the determined automatic packaging flow and the file to be packaged;
executing the current packaging step on the step processing object to obtain an intermediate result file corresponding to the current packaging step, and recording log information corresponding to the current packaging step;
determining a step execution state corresponding to the current packaging step according to the log information;
When the step execution state is used for indicating that the current packaging step is successfully executed, re-executing the automatic packaging flow and the file to be packaged based on the determination, and determining the operation of the current packaging step and the current packaging step on a step processing object of the file to be packaged until no non-executed packaging step exists in the automatic packaging flow or the step execution state corresponding to any packaging step is used for indicating that the packaging step is failed to execute;
and when no unexecuted packaging step exists in the automatic packaging flow, determining the intermediate result file corresponding to the current packaging step as the application program file corresponding to the target application.
7. The automated application packaging method of claim 1, 2, 3 or 5, further comprising:
deploying the application program file to a target terminal corresponding to the packaging request;
The deploying the application program file to the target terminal corresponding to the packaging request includes:
when the packaging configuration parameters comprise a packaging mode corresponding to the packaging request, determining a pushing mode corresponding to the application program file according to the packaging mode;
Generating deployment pushing information corresponding to the pushing mode according to the application program file;
Determining a push receiving end according to the packaging request and the push mode, and sending the deployment push information to the push receiving end;
When response information returned by the push receiving end is received as target response information, deploying the application program file to a target terminal corresponding to the packaging request according to the target response information; and the target response information is used for indicating that the application program file is allowed to be deployed at the target terminal corresponding to the packaging request.
8. An automated packaging apparatus for an application, the apparatus comprising:
The determining module is used for determining packaging configuration parameters corresponding to the packaging request after the packaging request about the target application is acquired;
The determining module is further configured to determine a source code path corresponding to the packaging request according to the packaging configuration parameter; the storage space corresponding to the source code path is used for storing source code files required by the packaging request;
The determining module is further configured to determine an engineering code path corresponding to the packaging request according to the packaging configuration parameter; the storage space corresponding to the engineering code path is used for storing code files to be packaged;
The cloning module is used for executing cloning operation on the source code file based on the source code path, the engineering code path and the determined code cloning command to obtain a cloning code file corresponding to the source code, and storing the cloning code file as an engineering code file into a storage space corresponding to the engineering code path;
The packaging module is used for packaging the determined files to be packaged based on the determined automatic packaging flow to obtain application program files corresponding to the target application; the file to be packaged comprises an engineering code file.
9. An automated packaging apparatus for an application, the apparatus comprising:
A memory storing executable program code;
A processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the application automation packaging method of any one of claims 1-7.
10. A computer storage medium storing computer instructions which, when invoked, are adapted to perform the application automation packaging method of any one of claims 1 to 7.
CN202410350268.1A 2024-03-25 2024-03-25 Automatic packaging method and device for application program Pending CN118132136A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410350268.1A CN118132136A (en) 2024-03-25 2024-03-25 Automatic packaging method and device for application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410350268.1A CN118132136A (en) 2024-03-25 2024-03-25 Automatic packaging method and device for application program

Publications (1)

Publication Number Publication Date
CN118132136A true CN118132136A (en) 2024-06-04

Family

ID=91241769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410350268.1A Pending CN118132136A (en) 2024-03-25 2024-03-25 Automatic packaging method and device for application program

Country Status (1)

Country Link
CN (1) CN118132136A (en)

Similar Documents

Publication Publication Date Title
CN106371940B (en) Method and device for solving program crash
EP2210183B1 (en) Managing updates to create a virtual machine facsimile
US8296758B2 (en) Deployment and versioning of applications
US7080357B2 (en) Software package verification
CN106951345B (en) Consistency test method and device for disk data of virtual machine
CN113342745A (en) Method and device for verifying mirror image file, electronic equipment and storage medium
CN111610989A (en) Application release/update method and system for offline container cloud environment
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
CN111831554B (en) Code checking method and device
CN112099880B (en) Method and system for reducing application program driven by scene
US8799716B2 (en) Heap dump occurrence detection
CN112286543B (en) Application service deployment method and device
CN112631621A (en) Dependency package management method, device, server and storage medium
CN111352631B (en) Interface compatibility detection method and device
CN111694724B (en) Test method and device of distributed form system, electronic equipment and storage medium
US8682944B2 (en) File system location verification using a sentinel
CN116795486A (en) Analysis method and device for container mirror image file purification, storage medium and terminal
CN118132136A (en) Automatic packaging method and device for application program
CN110750270A (en) Method and device for deploying packaged software
CN115145596A (en) OTA (over the air) upgrading method and device for robot upgrading package
CN114895916A (en) Code deployment method, device, storage medium and electronic equipment
CN115373885A (en) Fault repairing method and device, storage medium and electronic equipment
CN112883205A (en) Multimedia material warehousing method, medium, device and computing equipment
CN116303067B (en) Testing method, device, equipment and medium based on cloud testing platform
CN117762561A (en) Container operation method, container mirror image creation method and device and electronic equipment

Legal Events

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