CN113032006A - Plug-in construction method, device, equipment and storage medium - Google Patents

Plug-in construction method, device, equipment and storage medium Download PDF

Info

Publication number
CN113032006A
CN113032006A CN202110411905.8A CN202110411905A CN113032006A CN 113032006 A CN113032006 A CN 113032006A CN 202110411905 A CN202110411905 A CN 202110411905A CN 113032006 A CN113032006 A CN 113032006A
Authority
CN
China
Prior art keywords
component
plug
packaging
code
configuration parameters
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.)
Granted
Application number
CN202110411905.8A
Other languages
Chinese (zh)
Other versions
CN113032006B (en
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110411905.8A priority Critical patent/CN113032006B/en
Publication of CN113032006A publication Critical patent/CN113032006A/en
Application granted granted Critical
Publication of CN113032006B publication Critical patent/CN113032006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • 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)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a plug-in construction method, a plug-in construction device, a plug-in construction equipment and a storage medium, wherein the method comprises the following steps: obtaining a component code library and component configuration parameters of each at least one component required for building the plug-in, wherein the component configuration parameters of the component comprise: dependency information of the components; determining a component packaging sequence corresponding to at least one component by combining the dependency relationship information in the component configuration parameters of each component; and sequentially packaging the component code base of each component in at least one component according to the component packaging sequence. The scheme of the application can reduce the complexity of plug-in construction.

Description

Plug-in construction method, device, equipment and storage medium
Technical Field
The present application relates to the field of program development technologies, and in particular, to a plug-in building method, apparatus, device, and storage medium.
Background
There may be differences in the applications to which different types of electronic devices, or having different operating systems, are adapted. In order to adapt to different electronic devices, for the same application service, multiple applications adapted to different electronic devices need to be developed in a differentiated manner, so that application development projects are more and more complex. In order to reduce the complexity of application development, the plug-ins involved in the application can be customized and decoupled through componentization.
In the componentized plug-in construction process, the component codes of all the components required by the plug-in are required to be packaged, and after the packaging of all the components required by the plug-in is completed, the plug-in codes of the plug-in are packaged, so that the plug-in construction is completed. However, in the process of building the plug-in, developers are required to confirm the packing sequence of each component and manually trigger the packing of each component one by one, so that the complexity of building the plug-in is high.
Disclosure of Invention
In view of this, the present application provides a plug-in construction method, apparatus, device and storage medium to reduce complexity of plug-in construction.
In order to achieve the purpose, the application provides the following technical scheme:
in one aspect, the present application provides a plug-in construction method, including:
obtaining a set of configuration information for at least one component required to build a plug-in, the set of configuration information comprising: a component code library and component configuration parameters of each component of the at least one component, wherein the component configuration parameters of the component at least comprise: dependency information of the component, wherein the dependency information includes component information of other components required to be depended on by the component, and the other components required to be depended on by the component belong to the at least one component;
determining a component packaging sequence corresponding to the at least one component by combining the dependency relationship information in the component configuration parameters of each component;
and sequentially packaging the component code base of each component in the at least one component according to the component packaging sequence.
In one possible implementation manner, before packaging the component code library of the component, the method further includes:
detecting whether the component code library of the component in a code server is updated or not, wherein the code server stores the latest versions of the component code libraries of different components;
if there is an update to the component code library for the component in the code server, the component code library for the component in the local is updated with the latest version of the component code library for the component in the server.
In yet another possible implementation manner, the component configuration parameters of the component further include: packaging configuration parameters of the component;
the sequentially packaging the component code libraries of each component in the at least one component according to the component packaging sequence comprises:
and sequentially determining target components to be packaged from at least one component according to the component packaging sequence, and packaging the component code library of the target components based on the packaging configuration parameters of the target components until the packaging of at least one component is completed.
In another possible implementation manner, the obtaining of the configuration information set of the at least one component required for building the plug-in includes:
obtaining a configuration information set of at least one component required by the plug-in to be updated based on the plug-in update indication;
the component configuration parameters of the component further include: packaging configuration parameters for a component, the packaging configuration parameters for the component comprising: packaging use of the assembly;
packaging a component code library of the component, including:
if the packaging purpose of the component is testing and the component code library of the component in the code server is updated, packaging the locally updated component code library of the component to update the component packaging file of the component in the plug-in;
if the packaging purpose of the component is testing and the component code of the component in the code server is not updated, maintaining the component packaging file of the component in the plug-in unchanged.
In yet another possible implementation manner, the package configuration parameters of the component include: a packaging mode of the component;
the packaging the component code library of the target component based on the packaging configuration parameters of the target component comprises:
calling the component packaging code matched with the packaging mode of the target component, and executing packaging of the component code library of the target component through the component packaging code.
In another possible implementation manner, after the at least one component is packaged, the method further includes:
obtaining a plug-in code library of the plug-in and a configured packaging configuration parameter of the plug-in;
and executing the packaging operation of the plug-in code library based on the packaging configuration parameters of the plug-in.
In another possible implementation manner, before the performing the packaging operation of the plug-in code library based on the packaging configuration parameter of the plug-in, the method further includes:
detecting whether a plug-in code base of the plug-in is updated in a code server, wherein the code server stores the latest version of the plug-in code base of the plug-in;
if the plug-in code base of the plug-in the code server is updated, the plug-in code base of the plug-in the local is updated by using the latest version of the plug-in code base of the plug-in the code server.
In another aspect, the present application further provides an inserter building apparatus, including:
a configuration obtaining unit, configured to obtain a configuration information set of at least one component required for building a plug-in, where the configuration information set includes: dependency information of the component, wherein the dependency information includes component information of other components required to be depended on by the component, and the other components required to be depended on by the component belong to the at least one component;
the order determining unit is used for determining the packaging order of the components corresponding to the at least one component by combining the dependency relationship information in the component configuration parameters of the components;
and the packaging control unit is used for sequentially packaging the component code base of each component in the at least one component according to the component packaging sequence.
In yet another aspect, the present application further provides a computer device comprising a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the plug-in construction method according to any one of the above.
In yet another aspect, the present application further provides a storage medium for storing a program, which when executed, is configured to implement the plug-in construction method according to any one of the above.
From the above, when the plug-in is built, the component code library and the component configuration parameters of each component required for building the plug-in can be obtained. Because the dependency relationship information of the components is configured in the component configuration parameters of the components, and the dependency relationship information can indicate other components which need to be depended on for packaging the components, the component packaging sequence corresponding to each component can be reasonably determined according to the dependency relationship information of each component, so that each component needed by the plug-ins can be sequentially packaged directly according to the determined component packaging sequence, the condition that the component packaging sequence is manually confirmed and the component packaging is manually triggered one by one is avoided, the complexity of the component packaging related to the plug-in construction is reduced, and the complexity of the plug-in construction is also reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating a plug-in construction method of the present application;
FIG. 2 is a schematic flow chart diagram illustrating a plug-in construction method according to the present application;
FIG. 3 is a schematic diagram of a component structure of an interposer build device of the present application;
FIG. 4 is a schematic diagram of another embodiment of an insert construction device according to the present application;
fig. 5 is a schematic diagram illustrating a component structure of a computer device according to the present application.
Detailed Description
The scheme of the application is suitable for a plug-in construction scene, and the plug-in construction can be a brand-new plug-in construction, and can also be a plug-in construction related to the situation that the plug-in needs to be updated.
Correspondingly, the scheme of the application can be applied to building any plug-in building platform formed by a single computer or a plurality of computers related to plug-in building.
For ease of understanding, the terms to which this application may refer will be explained first:
components, components are simple encapsulations of data and methods.
For example, a component is defined as: a physical, replaceable component that encapsulates the implementation and provides some usable interfaces. A component represents a physical part that can be implemented in a system, and includes software code (e.g., source code, binary code, or executable code) or some similar content (e.g., script or command file), which is not limited specifically.
The plug-in is a program written by an application program interface conforming to a certain specification. For example, a plug-in may run on a specified system platform (possibly supporting multiple platforms simultaneously), but may not run separately from the specified platform. An insert is also understood to be a particular component, and an insert may include one or more components, with the components within the insert not being exposed to the outside and not being particularly limited.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present disclosure.
Fig. 1 shows a flowchart of an embodiment of a plug-in building method according to the present application, and the method of the present embodiment may be applied to a plug-in building platform, where the plug-in building platform may be a single device or multiple devices, and for example, the plug-in building platform may be a platform loaded with Jenkins, and Jenkins is an open-source continuous integration tool providing a friendly operation interface, and is mainly used for continuously and automatically building/testing software items, monitoring the operation of external tasks, and the like.
The method of the embodiment may include:
s101, obtaining a configuration information set of at least one component required by the plug-in.
The set of configuration information includes: a component code base and component configuration parameters for each of the at least one component.
The component code library of the component includes component codes corresponding to the components.
Wherein the component configuration parameters of the component at least comprise: dependency information of a component the dependency information of the component includes component information of other components that need to be relied upon to package the component. Other components that need to be relied upon to package the component also belong to the at least one component that is needed to build the plug-in.
It can be appreciated that if a component depends on other one or more components, the packaging of the component may need to be performed after the packaging of the other one or more components on which the component depends is completed, otherwise a component packaging exception or other exception condition may result.
For example, the dependency information of the component may include component identification and other information of other components that need to be depended on for packaging the component. For example, the packaging component a needs to depend on the component B, and the information of the component B can be recorded in the dependency relationship information of the component a.
It is understood that, for a certain component, if the component does not need to depend on other components in the package, the dependency information of the component may be null, that is, information such as identification information of any component may not exist in the dependency information. In an alternative, the configuration information set of the component may further include: packaging configuration parameters for the component. The packaging configuration parameters of a component include packaging parameters configured for the component according to which the component is packaged.
For example, the packaging configuration parameters for the component may include a packaging schema for the component. The packaging mode essentially reflects the architectural environment that the component or the plug-in which the component is located needs to run, wherein the architectural environment refers to the operating system running the component and the device type of the electronic device.
For example, the device types of the electronic device may be classified into a mobile phone, a tablet, a desktop computer, and the like, and the operating system deployed on the electronic device may be classified into android, window, and IOS, and the like. In the case where the device types and operating systems of the electronic devices are different, the packaging modes for packaging components suitable for the electronic devices are also different.
For another example, the packaging configuration parameter of the component may also be a packaging purpose including the component, and the packaging purpose may also be referred to as a plug-in purpose or a component building purpose, for example, the packaging purpose may be divided into: release and test, etc.
Of course, the package configuration parameters of the component may also include other package related parameters of the component, which is not limited to this.
Correspondingly, the packaging configuration parameters of the components are different, and the packaging process or the programs to be called in the packaging process are also different, and the description is omitted in the following description in combination with several cases.
It can be understood that the plug-in building in the plug-in building platform can be divided into two cases, wherein one case is that a new plug-in needs to be built; another situation is that in the case of an existing plug-in that needs to be upgraded, the plug-in build to which the plug-in is updated relates. The insert to be constructed in the present application may be either of these two cases.
In a possible implementation manner, a version number of a plug-in to be constructed may be obtained first, and on this basis, a configuration information set of at least one component corresponding to the version number of the plug-in may be obtained based on the version number of the plug-in. For example, a set of configuration information that is pre-configured for the version number of the plug-in is obtained.
Optionally, the component version number of the at least one component required for building the plug-in may be determined according to the version number of the plug-in to be built. On the basis, if the component version number of the component exists, the component code library and the component configuration parameters corresponding to the component version number of the component can be obtained. If the component version number of the component does not exist (for example, the component version number is not upgraded to the version number due to a configuration error of the component version number and the like), determining a component code library and component configuration parameters corresponding to the latest updated historical version number of the component as the component code library and component configuration parameters of the component;
of course, after obtaining the version number of the plug-in to be constructed, it may also be detected whether the version number of the plug-in is correct, such as whether the format of the version number is correct or whether the version number exists, for example, there may be no letter in the version number of the plug-in. If the version number of the plug-in is abnormal, the user is prompted to re-input.
And S102, determining a component packaging sequence corresponding to at least one component by combining the dependency relationship information in the component configuration parameters of each component.
The component packaging order is the sequential order in which the at least one component is packaged.
It can be understood that the dependency relationship existing between the at least one component can be determined by the dependency relationship information in the component configuration parameters of each component, and the dependency relationship existing between the components reflects the packaging sequence of the components, so that the packaging sequence of the at least one component can be determined based on the dependency relationship, that is, the packaging sequence of the components is obtained.
For example, assume that it is determined that packaging component a requires packaging of dependent component B based on dependency information of component a, and therefore, component a needs to be packaged after packaging component B; and the dependency relationship information of the component B is that the component B depends on the component C, and based on the knowledge, the component B can be packed only after the component C is packed, so that the dependency relationship among the three components is that the component A depends on the component B, and the component B needs to depend on the component C for packing, so that the component C, the component B and the component A can be obtained in turn based on the component packing sequence.
It is to be understood that if there is no interdependence between two or more components, the packing order of the two or more components can be randomly determined. For example, the component a depends on the component B, and the component C depends on the component D, but the component B and the component D do not have a dependency relationship therebetween, the packing order of the component B and the component D may be determined randomly, for example, the component B may be packed first and then the component D may be packed, or the component D may be packed first and then the component B may be packed.
In an optional manner, when there are a plurality of components that the plug-in needs to construct, the configuration information set may also pre-configure a sorting order of some or all of the components, and based on this, a packaging order of each component may be comprehensively determined in combination with the dependency relationship information of each component and the configured sorting order of the components.
For example, only the component sorting order among the components without dependency relationship may be configured in the configuration information set, and therefore, the packaging order of each component may be determined comprehensively by combining the dependency relationship information of each component and the component sorting order among the components without dependency relationship.
For another example, the component sorting order of all the components may be configured in the configuration set, the packaging order of the components may be determined by preferentially combining the dependency relationship information of each component, and for at least two components for which the packaging order cannot be determined based on the dependency relationship, the packaging order of the at least two components may be determined by combining the component sorting order, so that the component packaging order of the multiple components is finally obtained.
S103, sequentially packaging the component code base of each component in the at least one component according to the component packaging sequence.
It can be understood that, in order to enable automatic triggering of sequentially packaging components according to a component packaging order, after one component is packaged, if there are still components that have not been packaged in at least one component, components to be packaged are determined from the remaining components that have not been packaged according to the component packaging order, and packaging is continued until all components required by plug-in construction are completely packaged.
For example, the target components to be packaged can be determined from the at least one component in sequence according to the component packaging order, and the component code library of the target components is packaged until the packaging of the at least one component is completed. Wherein, the target component is the component which is not packed yet in the at least one component and is positioned at the most front in the packing order of the components.
It can be understood that the packaging of the component refers to packaging of the component code of the target component, and the component code of the component in this application exists in the form of a component code library, so that the component packaging file of the component can be obtained by packaging the component code library of the target component in this step. The component package file is a binary file.
In an optional manner, if the component configuration parameters of the component further include a packaging configuration parameter of the component, when the target component to be packaged is determined and the component code library of the target component is packaged, the component code library of the target component may be packaged based on the packaging configuration parameter of the target component.
The specific implementation of generating the component package file by packaging the component code library of the component according to the package configuration parameters may be various, and the implementation is not limited. In an alternative, the packaging configuration parameter of the component may include a packaging mode of the component, and accordingly, a component packaging code matching the packaging mode may be determined based on the packaging mode of the target component, and then the component packaging code is called and the component code library is packaged by using the component packaging code to obtain a binary file after the target component is packaged.
In one possible implementation manner, after the component code library of the component is packaged, the packaged component package file of the component obtained by packaging can be uploaded to the package file repository of the specified platform. The designated platform may be a designated cloud platform or other server system, and the like, without limitation. Wherein the packed file repository of the specified platform is for storing binary files for the components and plug-ins.
It can be understood that after the component packaged file after the component package is uploaded to the packaged file repository of the specified platform, after the plug-in where the component is located runs, if the component needs to be called, the component can be called from the file repository of the specified platform.
It is to be understood that, in order to be able to distinguish between the components, while uploading the component package file of a component to the package file repository of the specified platform, the library description file of the component may also be obtained from the plug-in building platform and uploaded into the code description library of the specified platform.
The library description file of the component is used for recording information such as the name and the version number of the component, and the component package file corresponding to the component can be determined from the package file repository based on the library description file of the component. For example, the library description file may be a podspec file or the like, and the specific file form of the library description file is not limited.
It is understood that the plug-in may include some basic codes related to the plug-in addition to the components, and on this basis, after the packaging of the components related to the plug-in is completed, the plug-in code library of the plug-in may be obtained, and accordingly, the packaging operation of the plug-in code library may be performed.
Wherein the plug-in code library of the plug-in comprises plug-in related codes.
In an alternative, while obtaining the plug-in code library of the plug-in, the packaging configuration parameter of the plug-in may also be obtained, where the plug-in packaging configuration parameter may include related parameters involved in packaging the plug-in, for example, the plug-in packaging configuration parameter may include one or more of parameter information such as a packaging mode of the plug-in and a packaging purpose of the plug-in, and the like. On this basis, the plug-in code library of the plug-in may be packaged based on the packaged configuration parameters of the plug-in.
When the plug-in is built, the component code base and the component configuration parameters of each component required by the plug-in can be obtained. Because the dependency relationship information of the components is configured in the component configuration parameters of the components, and the dependency relationship information can indicate other components which need to be depended on for packaging the components, the component packaging sequence corresponding to each component can be reasonably determined according to the dependency relationship information of each component, so that each component needed by the plug-ins can be sequentially packaged directly according to the determined component packaging sequence, the condition that the component packaging sequence is manually confirmed and the component packaging is manually triggered one by one is avoided, the complexity of the component packaging related to the plug-in construction is reduced, and the complexity of the plug-in construction is also reduced.
Meanwhile, if the component packaging relates to the configuration of packaging configuration parameters such as a packaging mode or packaging purposes, the packaging configuration parameters of the components can be configured in advance in the component configuration parameters of the components, so that the packaging configuration parameter information related to the components does not need to be manually reconfigured in the packaging process of each component, and the complexity caused by the fact that the component packaging configuration parameters need to be configured again when each component is used is avoided.
It can be understood that, during the process of plug-in update or new plug-in construction, there may be update of the component involved in plug-in construction, and in order to update the component involved in plug-in time, the application may also perform update check and automatic update on the component involved in plug-in construction.
For ease of understanding, the following description is made in conjunction with an implementation, and as shown in fig. 2, it shows another flow diagram of a plug-in construction method according to the present application, and the method of the present embodiment may include:
s201, obtaining a configuration information set of at least one component required by the plug-in.
The set of configuration information includes: a component code base and component configuration parameters for each of the at least one component. The component configuration parameters of the component include at least: dependency information of a component and packaging configuration parameters of the component.
Wherein the packaging configuration parameters of the component at least comprise: packaging mode of the components.
S202, determining a component packaging sequence corresponding to at least one component by combining the dependency relationship information in the component configuration parameters of each component.
S203, determining a target component which is not packaged yet and has the highest sequence in the packaging sequence of the components from at least one component.
The above steps S201 to S203 can refer to the related description of the previous embodiment, and are not described herein again.
S204, detecting whether the component code library of the target component in the code server is updated, if so, executing the step S205, and if not, executing the step S207.
The code server may be used to store the component code libraries of the developed components, and therefore the latest versions of the component code libraries of the components are stored in the code server. On the basis, in order to enable the constructed plug-in to have the latest version of the component, the method can detect whether the component code library of the target component belongs to the latest version of the component code library of the target component in the code server so as to judge whether the target component in the code server has the update of the component code library.
It will be appreciated that the code server may also have stored therein plug-in code libraries of different versions of plug-ins developed, such that the code server has stored therein at least the latest version of the plug-in code library of plug-ins.
S205, if the component code library of the target component in the code server is updated, the component code library of the target component in the local is updated by using the latest version of the component code library corresponding to the target component in the code server.
It is understood that, the code in the component code library of the target component in the plug-in building platform may be updated according to the latest version of the component code library corresponding to the target component in the code server, so that the component code library of the target component is the latest version of the code.
S206, calling the component packaging code matched with the packaging mode of the target component, and packaging the locally updated component code library of the target component through the component packaging code to obtain a component packaging file of the target component.
It can be understood that after the plug-in building platform updates the component code base of the target component, the plug-in building platform packs the component code base of the updated target component directly so that the components in the plug-in keep the latest version.
S207, calling the component packaging code matched with the packaging mode of the target component, and executing packaging of the component code library of the target component through the component packaging code.
For example, different component packaging code can be configured according to different packaging schemes that the components may be involved in. For example, a shell script protocol based component packaging code may be configured.
It is to be understood that, in the present embodiment, the example is that the corresponding component code is called based on the packaging mode of the target component to perform packaging of the component, and the present embodiment is also applicable to other cases.
It should be noted that, if the packaging modes and the like of the components involved in the plug-in building platform are all fixed, the packaging configuration parameters do not need to be configured. Therefore, in this embodiment, only to clearly understand one possible case of the solution of the present application, the component configuration parameters include the packing configuration parameters of the component, and the packing configuration parameters at least include the packing mode is taken as an example for illustration. It is to be understood that the same applies to the present embodiment for the case where the component configuration parameters do not include the packaged configuration parameters.
And S208, uploading the component package file of the target component to a package file storage library of a specified platform.
S209, obtaining the library description file of the target component, and uploading the library description file of the target component to the code description repository of the specified platform.
It is understood that, in the case that the constructed plug-in is a plug-in that needs to be updated, since there may be an update to the version number of the target component, etc., after step S209, the application may also modify the library description file, such as the version number corresponding to the target component, in the plug-in.
S210, detecting whether the at least one component still has a component which is not packaged, if so, returning to the step S203; if not, step S211 is performed.
S211, obtaining a plug-in code base of the plug-in and a packaging configuration parameter of the plug-in.
Wherein, the packaging configuration parameters of the plug-in at least comprise: packaging mode of plug-ins.
The packaging configuration parameters of the plug-in can also comprise a packaging architecture mode of the plug-in, wherein the packaging architecture mode comprises a real machine architecture and a double architecture mode, and the double architecture mode comprises a real machine architecture and a simulator double architecture. In practical applications, if the purpose of plug-in build is for testing, the packaging architecture mode of the plug-in may be set to true machine architecture. If the plug-in is constructed for online release, the packaging architecture mode can be a dual architecture mode, and two modes of a real machine and a simulator need to be packaged simultaneously.
Of course, the packaging configuration parameter of the plug-in may also package other related parameters, which is not limited to this.
It is understood that, similar to the previous plug-in, in the present embodiment, only if the packaging mode of the plug-in is fixed, a fixed packaging mode can be defaulted without separately acquiring the packaging configuration parameters of the plug-in.
S212, calling a plug-in packaging code matched with the packaging mode of the plug-in, and packaging the plug-in code library of the plug-in through the plug-in packaging code to obtain a plug-in packaging file of the plug-in.
In an optional manner, in the process of packaging the plug-in code base of the plug-in by the plug-in packaging code, the packaging applicable to the real machine architecture or the dual architecture mode may be performed on the plug-in code base of the plug-in combination with the packaging architecture mode of the plug-in.
S213, the plug-in package file of the plug-in is stored in the package file storage library of the specified platform.
Similar to the component packaging, the packaging operation of the plug-ins at least comprises packaging of plug-in code libraries of the plug-ins, and uploading packaged plug-in files and the like.
In this embodiment, a case of performing a packaging operation of a plug-in code library based on a plug-in packaging configuration parameter is taken as an example for explanation, and in practical application, packaging a plug-in code library of a plug-in by other manners is also applicable to this embodiment.
S214, obtaining the library description file of the plug-in, and uploading the library description file of the plug-in to the code description repository of the specified platform.
Wherein, the library description file of the plug-in can comprise the component information of each component composing the plug-in.
Similar to the foregoing components, the steps S213 and S214 in this embodiment may also be an optional operation of performing a packaging operation on the plug-in, and there may be other possible situations in a specific implementation process, which is not limited to this.
Therefore, in the embodiment, in the process of constructing the plug-in, each component forming the plug-in can be updated and detected, and in the process of constructing the plug-in, the latest version code of the component is used for packaging, so that the components in the plug-in can be updated synchronously, and the synchronous updating of each component in the process of updating and rebuilding the plug-in is facilitated.
It can be understood that, in the above embodiments of the present application, before performing a packaging operation on the plug-in code library of a plug-in, it may also be detected whether there is an update in the plug-in code library of the plug-in the code server; if the plug-in code base of the plug-in the server is updated, the plug-in code base of the plug-in the local plug-in building platform can be updated by using the latest version of the plug-in code base corresponding to the plug-in the server. Accordingly, the locally updated plug-in code library of the plug-in can be packaged based on the plug-in packaging configuration parameters of the plug-in.
It can be understood that, if the plug-in to be built is to rebuild the existing plug-in, on this basis, if the plug-in is to post the update and then to publish the online, in the plug-in building process, for each component, regardless of whether the component code library of the component has a code update, the component needs to be repackaged.
However, if the updated plug-in is for testing, in the plug-in building process, if the code in the component code library of the component is not updated, the component may not be repackaged, and the uploaded component of the component may be directly utilized to package the file.
Correspondingly, in an implementation scenario, the obtaining of the configuration information set of the at least one component required for building the plug-in may be: based on the plug-in update indication, a set of configuration information of at least one component required by the plug-in to be updated is obtained. In this case, the packaging configuration parameters of the component may include: packaging use of the assembly. As previously mentioned, the packaging purpose may be release or testing.
Accordingly, the packaging operation performed on the component code library of the component can be divided into the following two cases:
if the packaging purpose of the component is testing and the component code base of the component in the code server is updated, after the component code base of the local component is updated based on the latest version of the component code base of the component in the code server, packaging the locally updated component code base of the target component to update the component packaging file of the target component in the plug-in.
For example, in the embodiment of fig. 2, if the plug-in is a plug-in to be updated and there is a code update in the component code library of the target component in the code server, then S205 and S206 are executed, and corresponding S208 and S209, etc. are executed.
If the packaging purpose of the component is testing and the component code base of the component in the code server is not updated, maintaining the component packaging file of the component in the plug-in unchanged. For example, in the embodiment of fig. 2, if the plug-in is a plug-in to be updated and there is no update in the component code library of the target component in the code server, the step S207 does not need to be executed, and related operations such as uploading a packaged component package file are not naturally required.
It can be understood that, if the plug-in to be constructed is the plug-in that needs to be updated and the packaging purpose of the target component is publishing, no matter whether the component code library of the target component in the code server has a code update, the component code library of the target component needs to be packaged again, and the specific implementation is similar to that in fig. 2, and is not described again.
It can be understood that, in an actual application, the packaging configuration parameters of the component may include a packaging purpose of the component and a packaging mode of the component at the same time, and on this basis, after the component packaging code is called based on the packaging mode of the component, the component packaging operation corresponding to the component may be executed by executing the component packaging code in combination with the packaging purpose of the component, which is not described herein again.
The application also provides a plug-in constructing device corresponding to the plug-in constructing method.
As shown in fig. 3, which shows a schematic structural diagram of an embodiment of an inserter building apparatus according to the present application, a method of the embodiment may include:
a configuration obtaining unit 301, configured to obtain a configuration information set of at least one component required for building a plug-in, where the configuration information set includes: dependency information of the component, wherein the dependency information includes component information of other components required to be depended on by the component, and the other components required to be depended on by the component belong to the at least one component;
a sequence determining unit 302, configured to determine, by combining dependency information in the component configuration parameters of each component, a component packaging sequence corresponding to the at least one component;
a packing control unit 303, configured to sequentially pack the component code libraries of each component in the at least one component according to the component packing sequence.
In a possible implementation manner, the obtaining of the component configuration parameters by the configuration obtaining unit further includes: packaging configuration parameters of the component;
the packaging control unit is specifically configured to determine a target component to be packaged from the at least one component in sequence according to the component packaging sequence, and package the component code library of the target component based on the packaging configuration parameters of the target component until the packaging of the at least one component is completed.
In an alternative, the configuring the packaging configuration parameters of the components obtained by the configuration obtaining unit includes: a packaging mode of the component;
the packaging control unit is specifically configured to determine a target component to be packaged from at least one component in sequence according to the component packaging sequence, call a component packaging code matched with the packaging mode of the target component, and execute packaging of a component code library of the target component through the component packaging code until the packaging of the at least one component is completed.
As shown in fig. 4, which shows a schematic diagram of another composition structure of an inserter constructing apparatus according to the present application, the apparatus of the present embodiment is different from the apparatus shown in fig. 3 in that the apparatus of the present embodiment may further include:
a component detecting unit 304, configured to detect whether there is an update in the component code library of the component in a code server before the packaging control unit packages the component code library of the component, where the code server stores the latest versions of the component code libraries of different components;
a component updating unit 305, configured to update the component code library of the component in the local area with the latest version of the component code library of the component in the server if there is an update in the component code library of the component in the code server.
In an alternative, the configuration obtaining unit includes:
a configuration obtaining subunit, configured to obtain, based on the plug-in update indication, a configuration information set of at least one component required by the plug-in to be updated, where a packaged configuration parameter of the component includes: packaging use of the assembly;
the packing control unit includes:
and the target component determining unit is used for sequentially determining the target components to be packaged from the at least one component according to the component packaging sequence until the packaging of the at least one component is finished.
The first packing subunit is used for packing the locally updated component code library of the target component to update the component packing file of the target component in the plug-in if the packing purpose of the target component is testing and the component code library of the target component in the code server is updated;
and the second packaging subunit is used for maintaining the component packaging file of the target component in the plug-in unchanged if the packaging purpose of the target component is testing and the component code of the target component in the code server is not updated.
In another possible implementation manner, in any one of the above embodiments of the present application, the apparatus further includes:
the plug-in information obtaining unit is used for obtaining a plug-in code base of the plug-in and the configured packaging configuration parameters of the plug-in after the packaging control unit finishes packaging the at least one component;
and the plug-in packaging unit is used for executing the packaging operation of the plug-in code library based on the packaging configuration parameters of the plug-ins.
In an alternative, the apparatus further comprises:
a plug-in detection unit, configured to detect whether a plug-in code library of a plug-in a code server has an update before a plug-in packing unit performs a packing operation of the plug-in code library based on a packing configuration parameter of the plug-in, where the code server stores a latest version of the plug-in code library of the plug-in;
and the plug-in updating unit is used for updating the plug-in code base of the plug-in the local by using the latest version of the plug-in code base of the plug-in the code server if the plug-in code base of the plug-in the code server is updated.
In yet another aspect, the present application further provides a computer device, which may be a computer device or a server in a plug-in build platform, or the like. Fig. 5 is a schematic diagram illustrating an architecture of a computer device provided in the present application. In fig. 5, the computer device 500 may include: a processor 501 and a memory 502.
Optionally, the computer device may further include: a communication interface 503, an input unit 504, and a display 505 and a communication bus 506.
The processor 501, the memory 502, the communication interface 503, the input unit 504 and the display 505 all communicate with each other through the communication bus 506.
In the embodiment of the present application, the processor 501 may be a central processing unit, an application specific integrated circuit, or the like.
The processor may call a program stored in the memory 502, and in particular, the processor may execute the plug-in construction method in any of the above embodiments.
The memory 502 is used for storing one or more programs, which may include program codes including computer operation instructions, and in the embodiment of the present application, at least a program for implementing the plug-in construction method in any one of the above embodiments is stored in the memory.
In one possible implementation, the memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, the above-mentioned programs, and the like; the storage data area may store data created during use of the computer device.
The communication interface 503 may be an interface of a communication module.
The present application may also include an input unit 504, which may include a touch sensing unit, a keyboard, and the like.
The display 505 includes a display panel, such as a touch display panel or the like.
Of course, the computer device structure shown in fig. 5 does not constitute a limitation of the computer device in the embodiment of the present application, and in practical applications, the computer device may include more or less components than those shown in fig. 5, or some components may be combined.
In another aspect, the present application further provides a storage medium, where computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the method for constructing a plug-in is implemented as in any one of the above embodiments.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. Meanwhile, the features described in the embodiments of the present specification may be replaced or combined with each other, so that those skilled in the art can implement or use the present application. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (10)

1. A plug-in construction method, comprising:
obtaining a set of configuration information for at least one component required to build a plug-in, the set of configuration information comprising: a component code library and component configuration parameters of each component of the at least one component, wherein the component configuration parameters of the component at least comprise: dependency information of the component, wherein the dependency information includes component information of other components required to be depended on by the component, and the other components required to be depended on by the component belong to the at least one component;
determining a component packaging sequence corresponding to the at least one component by combining the dependency relationship information in the component configuration parameters of each component;
and sequentially packaging the component code base of each component in the at least one component according to the component packaging sequence.
2. The method of claim 1, further comprising, prior to packaging the component code library for the component:
detecting whether the component code library of the component in a code server is updated or not, wherein the code server stores the latest versions of the component code libraries of different components;
if there is an update to the component code library for the component in the code server, the component code library for the component in the local is updated with the latest version of the component code library for the component in the server.
3. The method of claim 1, wherein the component configuration parameters for the component further comprise: packaging configuration parameters of the component;
the sequentially packaging the component code libraries of each component in the at least one component according to the component packaging sequence comprises:
and sequentially determining target components to be packaged from at least one component according to the component packaging sequence, and packaging the component code library of the target components based on the packaging configuration parameters of the target components until the packaging of at least one component is completed.
4. The method of claim 2, wherein obtaining the set of configuration information for the at least one component required to build the plug-in comprises:
obtaining a configuration information set of at least one component required by the plug-in to be updated based on the plug-in update indication;
the component configuration parameters of the component further include: packaging configuration parameters for a component, the packaging configuration parameters for the component comprising: packaging use of the assembly;
packaging a component code library of the component, including:
if the packaging purpose of the component is testing and the component code library of the component in the code server is updated, packaging the locally updated component code library of the component to update the component packaging file of the component in the plug-in;
if the packaging purpose of the component is testing and the component code of the component in the code server is not updated, maintaining the component packaging file of the component in the plug-in unchanged.
5. The method of claim 3, wherein the packaging configuration parameters of the component comprise: a packaging mode of the component;
the packaging the component code library of the target component based on the packaging configuration parameters of the target component comprises:
calling the component packaging code matched with the packaging mode of the target component, and executing packaging of the component code library of the target component through the component packaging code.
6. The method of claim 1, further comprising, after the at least one component is packaged:
obtaining a plug-in code library of the plug-in and a configured packaging configuration parameter of the plug-in;
and executing the packaging operation of the plug-in code library based on the packaging configuration parameters of the plug-in.
7. The method of claim 6, further comprising, prior to performing the packaging operation of the plug-in codebase based on the packaged configuration parameters of the plug-in:
detecting whether a plug-in code base of the plug-in is updated in a code server, wherein the code server stores the latest version of the plug-in code base of the plug-in;
if the plug-in code base of the plug-in the code server is updated, the plug-in code base of the plug-in the local is updated by using the latest version of the plug-in code base of the plug-in the code server.
8. An insert construction apparatus comprising:
a configuration obtaining unit, configured to obtain a configuration information set of at least one component required for building a plug-in, where the configuration information set includes: dependency information of the component, wherein the dependency information includes component information of other components required to be depended on by the component, and the other components required to be depended on by the component belong to the at least one component;
the order determining unit is used for determining the packaging order of the components corresponding to the at least one component by combining the dependency relationship information in the component configuration parameters of the components;
and the packaging control unit is used for sequentially packaging the component code base of each component in the at least one component according to the component packaging sequence.
9. A computer device comprising a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, which when executed is specifically configured to implement the plug-in construction method according to any one of claims 1 to 7.
10. A storage medium storing a program for implementing the plug-in construction method according to any one of claims 1 to 7 when executed.
CN202110411905.8A 2021-04-16 2021-04-16 Plug-in construction method, device, equipment and storage medium Active CN113032006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110411905.8A CN113032006B (en) 2021-04-16 2021-04-16 Plug-in construction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110411905.8A CN113032006B (en) 2021-04-16 2021-04-16 Plug-in construction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113032006A true CN113032006A (en) 2021-06-25
CN113032006B CN113032006B (en) 2023-09-08

Family

ID=76457970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110411905.8A Active CN113032006B (en) 2021-04-16 2021-04-16 Plug-in construction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113032006B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060184925A1 (en) * 2005-02-15 2006-08-17 Olivier Ficatier Plug-in for adapting an integrated development environment to a programming language
US20070088707A1 (en) * 2004-09-15 2007-04-19 Scott Durgin Method for providing extensible software components within a distributed synchronization system
US20100153920A1 (en) * 2008-12-17 2010-06-17 Michael Stavros Bonnet Method for building and packaging sofware
CN101861567A (en) * 2007-11-16 2010-10-13 诺基亚公司 Methods, apparatuses and computer program product for automatic download of software dependencies on installation
CN104462352A (en) * 2014-12-04 2015-03-25 北京国双科技有限公司 Data packing method and device
US20150363192A1 (en) * 2014-06-16 2015-12-17 Silverthread, Inc. Computer-implemented tools and methods for extracting information about the structure of a large computer software system, exploring its structure, discovering problems in its design, and enabling refactoring
US20180203680A1 (en) * 2015-07-27 2018-07-19 Nec Corporation Deployment device, deployment method, and recording medium
CN110442376A (en) * 2019-07-19 2019-11-12 精硕科技(北京)股份有限公司 A kind of method and device for realizing Software package
CN111273898A (en) * 2020-02-25 2020-06-12 安徽以萨数据技术有限公司 Web front-end code automatic construction method, system and storage medium
CN112214219A (en) * 2019-06-24 2021-01-12 腾讯科技(深圳)有限公司 Component processing method and device, server and storage medium
CN112256321A (en) * 2020-11-18 2021-01-22 腾讯科技(深圳)有限公司 Static library packaging method and device, computer equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070088707A1 (en) * 2004-09-15 2007-04-19 Scott Durgin Method for providing extensible software components within a distributed synchronization system
US20060184925A1 (en) * 2005-02-15 2006-08-17 Olivier Ficatier Plug-in for adapting an integrated development environment to a programming language
CN101861567A (en) * 2007-11-16 2010-10-13 诺基亚公司 Methods, apparatuses and computer program product for automatic download of software dependencies on installation
US20100153920A1 (en) * 2008-12-17 2010-06-17 Michael Stavros Bonnet Method for building and packaging sofware
US20150363192A1 (en) * 2014-06-16 2015-12-17 Silverthread, Inc. Computer-implemented tools and methods for extracting information about the structure of a large computer software system, exploring its structure, discovering problems in its design, and enabling refactoring
CN104462352A (en) * 2014-12-04 2015-03-25 北京国双科技有限公司 Data packing method and device
US20180203680A1 (en) * 2015-07-27 2018-07-19 Nec Corporation Deployment device, deployment method, and recording medium
CN112214219A (en) * 2019-06-24 2021-01-12 腾讯科技(深圳)有限公司 Component processing method and device, server and storage medium
CN110442376A (en) * 2019-07-19 2019-11-12 精硕科技(北京)股份有限公司 A kind of method and device for realizing Software package
CN111273898A (en) * 2020-02-25 2020-06-12 安徽以萨数据技术有限公司 Web front-end code automatic construction method, system and storage medium
CN112256321A (en) * 2020-11-18 2021-01-22 腾讯科技(深圳)有限公司 Static library packaging method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113032006B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
CN109358858B (en) Automatic deployment method, device, medium and electronic equipment
CN111309336B (en) Deployment method and device of distributed application
CN108920359B (en) Application program testing method and device, storage medium and electronic device
CN112764753A (en) Project deployment method and device, electronic equipment and storage medium
CN110032505B (en) Software quality determination apparatus and method, and non-transitory computer readable medium
CN112506525A (en) Continuous integration and continuous delivery method, device, electronic equipment and storage medium
CN111782523A (en) Cloud service deployment test method and device, electronic equipment and storage medium
CN111984342A (en) Method and related device for loading dynamic link library
CN113254033A (en) Master disk file generation method and device, electronic equipment and storage medium
CN110908670A (en) Method and device for automatically publishing service
CN112306552A (en) System software version management method, device and storage medium
CN110716786B (en) Page display method, system and storage medium
CN113050984A (en) Resource calling method and device, electronic equipment and storage medium
CN112732300A (en) Data packet updating method and device, electronic equipment and readable storage medium
CN106909434B (en) Method and device for detecting undefined function in executable program
CN110990833B (en) SDK safety detection method and related equipment
CN112506518A (en) Compiling method and device based on configuration file
CN109408133B (en) Method and equipment for starting assembly
CN110471828B (en) Operating system testing method, device and equipment thereof
CN113032006A (en) Plug-in construction method, device, equipment and storage medium
CN111352631A (en) Interface compatibility detection method and device
CN111176653B (en) Program compiling and packaging method and device, electronic equipment and storage medium
CN115048082A (en) Micro front-end system construction method and device, server and readable storage medium
CN112486511A (en) Method for generating operating system installation mirror image through web
CN111651189A (en) Product delivery method and device of continuous integration system 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
GR01 Patent grant
GR01 Patent grant