Web application packaging method, device, equipment and storage medium

By obtaining and injecting the version information of web page applications during the compilation process and generating packaging files, the problem of inefficient web page application management and packaging in the existing technology is solved, and efficient version management and source code repair are achieved.

CN114489774BActive Publication Date: 2025-07-01BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210132344.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2025-07-01
Estimated Expiration
2042-02-14

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently manage and package web applications, resulting in inefficient positioning and repairing source codes.

Method used

By obtaining the version information of the web application during the compilation process, writing the version description file, and generating a packaging file based on the version description file and the compilation file, automatic version injection and packaging are achieved.

Benefits of technology

It improves the packaging efficiency and accuracy of web applications, reduces labor costs, and can quickly locate and repair the source code of web applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489774B_ABST
    Figure CN114489774B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, apparatus, device, and storage medium for packaging a web application, belonging to the field of computer technology, and particularly relating to the field of cloud computing technology. The specific implementation solution is as follows: during the compilation of the web application to be packaged, according to the configuration information of the web application to be packaged, obtain the version information of the web application to be packaged; write the version information into a version description file; generate a packaged file of the web application to be packaged according to the version description file and the compilation file of the web application to be packaged. Through the above technical solution, the packaging efficiency and accuracy of the web application are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of cloud computing technology, and more particularly to a method, apparatus, device, and storage medium for packaging web applications. Background Art

[0002] With the development of computer technology, the update frequency of web applications (i.e., web apps) is getting faster and faster. Therefore, how to package web applications for subsequent precise management of web applications, such as quickly locating the source code of web applications for repair, is crucial. Summary of the Invention

[0003] The present disclosure provides a method, apparatus, device, and storage medium for packaging web applications.

[0004] According to one aspect of the present disclosure, there is provided a method for packaging a web application, the method comprising:

[0005] During the compilation of the web application to be packaged, obtaining the version information of the web application to be packaged according to the configuration information of the web application to be packaged;

[0006] Writing the version information into a version description file;

[0007] Generating a packaged file of the web application to be packaged according to the version description file and the compilation file of the web application to be packaged.

[0008] According to another aspect of the present disclosure, there is provided an electronic device, the electronic device comprising:

[0009] At least one processor; and

[0010] A memory communicatively connected to the at least one processor; wherein,

[0011] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the web application packaging method according to any embodiment of the present disclosure.

[0012] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the web application packaging method according to any embodiment of the present disclosure.

[0013] According to the technology of the present disclosure, the packaging efficiency and accuracy of web applications can be improved.

[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:

[0016] Figure 1 is a flowchart of a method for packaging a web application provided according to an embodiment of the present disclosure;

[0017] Figure 2 is a flowchart of another method for packaging a web application provided according to an embodiment of the present disclosure;

[0018] Figure 3 is a flowchart of yet another method for packaging a web application provided according to an embodiment of the present disclosure;

[0019] Figure 4 is a schematic structural diagram of a device for packaging a web application provided according to an embodiment of the present disclosure;

[0020] Figure 5 is a block diagram of an electronic device for implementing the method for packaging a web application according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0022] Figure 1 is a flowchart of a method for packaging a web application provided according to an embodiment of the present disclosure. This method is applicable to the situation of how to package a web application. The entire method for packaging a web application can be implemented in cooperation with a continuous delivery platform (i.e., the iPipe platform) and a code repository (i.e., the icode platform), etc. Optionally, in this embodiment, a developer can create multiple pipelines in the iPipe platform; further, the developer can associate a pipeline with each code branch in the icode platform; furthermore, different code branches can be associated with the same pipeline.

[0023] The web application packaging method provided in this embodiment can be applied to the iPipe platform. This method can be executed by a web application packaging device, which can be implemented in software and / or hardware and integrated into an electronic device configured with a web application packaging function. Further, the electronic device can be configured with a continuous delivery platform, namely the iPipe platform. As Figure 1 shown, the web application packaging method in this embodiment may include:

[0024] S101, during the compilation of the web application to be packaged, obtain the version information of the web application to be packaged according to the configuration information of the web application to be packaged.

[0025] In this embodiment, the web application to be packaged is a web application that needs to be packaged. The so-called configuration information is the relevant configuration information of the web application to be packaged, including but not limited to the relevant content in the ci.yml file, shell file, etc.

[0026] The so-called version information is used to represent the relevant information of the version of the web application to be packaged; for example, the version information may include a version number. Optionally, in this embodiment, for each web application, the version information is different before and after the function update of the web application; further, the version information of the web application after the function update can be determined according to the latest version information of the web application before the function update. That is to say, the version information of the web application to be packaged can be determined according to the latest version information of the web application to be packaged this time. For example, the latest version information can be incremented by 1 as the version information of the web application to be packaged.

[0027] Optionally, the developer stores the source code and configuration information of the web application to be packaged that have been written in the corresponding code branch in the icode platform and clicks the compile button to generate a code compilation event; correspondingly, the iPipe platform (specifically, a certain pipeline in the iPipe platform associated with the web application to be packaged) responds to the code compilation event, obtains the configuration information and source code of the web application to be packaged from the icode platform, and compiles the web application to be packaged.

[0028] Further, during the compilation of the web application to be packaged, parse the configuration information of the web application to be packaged, obtain the field of the version information from the configuration information, and then determine the content under this field as the version information of the web application to be packaged.

[0029] S102, write the version information into the version description file.

[0030] In this embodiment, the version description file is a file used to record the version information of the web application to be packaged, including a version field and the version information corresponding to this field, etc. For example, it can be a VERSION.js file.

[0031] Specifically, the version information is written into a corresponding field of the version description file.

[0032] S103, generating a packaging file of the webpage application to be packaged according to the version description file and the compiled file of the webpage application to be packaged.

[0033] In this embodiment, the compiled file is a file generated after compiling the source code of the web application to be packaged.

[0034] Specifically, the developer can click the packaging button in the iPipe platform; accordingly, the iPipe platform can package the version description file and the compiled file of the web application to be packaged in response to the user's packaging operation, and generate a packaging file of the web application to be packaged.

[0035] It should be noted that after the package file of the web application to be packaged is generated, the iPipe platform can deploy the package file to the target server. At this point, the web application deployed in the target server has version information. Afterwards, if the user reports that there is a problem with the function of the web application, the address can be generated according to the server address and version description file (such as VERSION.js) to which the web application is deployed; the address can be accessed through the browser to obtain the version information of the deployed web application; and then the developer can locate the corresponding code of the web application in the code library (icode platform) according to the version information to repair it, thereby improving the repair efficiency. Among them, the target server refers to the server where the web application to be packaged is deployed after packaging.

[0036] The technical solution of the embodiment of the present disclosure obtains the version information of the web application to be packaged according to the configuration information of the web application to be packaged during the compilation process of the web application to be packaged, and writes the version information into the version description file, and then generates the packaging file of the web application to be packaged according to the version description file and the compiled file of the web application to be packaged. The above technical solution automatically injects the version information of the web application into the packaging file, providing a non-invasive and automatic way to inject product versions; at the same time, when the web application is subsequently maintained, the source code corresponding to the web application can be quickly located based on the version information and repaired, thereby improving the satisfaction of the application users; in addition, compared with the traditional way of manually recording version information, the technical solution of the present disclosure reduces labor costs and improves the efficiency and accuracy of web application packaging.

[0037] On the basis of the above embodiment, as an optional method of the embodiment of the present disclosure, during the process of compiling the web application to be packaged, the source code of the web application to be packaged may also be compiled to obtain a compiled file of the web application to be packaged.

[0038] Specifically, in response to the code compilation event, the iPipe platform obtains the source code and configuration information of the web application to be packaged from the icode platform, and compiles the web application to be packaged.

[0039] Furthermore, during the compilation of the web application to be packaged, not only can the version information of the web application to be packaged be obtained according to the configuration information of the web application to be packaged, and the version information be written into the version description file, but also the source code of the web application to be packaged can be compiled according to the configuration information of the web application to be packaged to obtain the compiled file of the web application to be packaged.

[0040] It can be understood that, compared with local compilation, compiling the source code of the web application to be packaged through the iPipe platform improves the compilation efficiency and accuracy.

[0041] Figure 2 FIG. is a flowchart of another web application packaging method provided according to an embodiment of the present disclosure. On the basis of the above embodiment, the "obtaining the version information of the web application to be packaged according to the configuration information of the web application to be packaged" is further optimized, and an optional implementation solution is provided, such as Figure 2 shown, the web application packaging method of this embodiment may include:

[0042] S201, during the compilation of the web application to be packaged, when it is determined that the web application to be packaged meets the compilation conditions, the version information of the web application to be packaged is obtained according to the compilation instruction in the configuration information.

[0043] In this embodiment, the compilation condition is the condition that needs to be met for compiling the web application to be packaged.

[0044] In an optional manner, code quality inspection can be performed on the web application to be packaged. If the quality inspection passes, it is determined that the web application to be packaged meets the compilation conditions. Specifically, the code format and / or code writing language of the source code of the web application to be packaged can be verified. If the verification passes, it is determined that the web application to be packaged meets the compilation conditions. For example, the code format can be verified to check whether the code format is standard. If it is standard, it is determined that the web application to be packaged meets the compilation conditions. Another example is that the code writing language can be verified to check whether the code writing language is consistent with the specified writing language. If it is consistent, it is determined that the web application to be packaged meets the compilation conditions. Another example is that the code format and code writing language of the source code can also be verified. If the verification passes, it is determined that the web application to be packaged meets the compilation conditions.

[0045] In another optional manner, a first compilation scenario is determined; the first compilation scenario is compared with the second compilation scenario in the configuration information; if they are the same, it is determined that the web application to be packaged meets the compilation conditions.

[0046] Among them, the compilation scenario is the scenario configured for each pipeline after the developer creates multiple pipelines on the iPipe platform, which may include but are not limited to the standardized scenario, the privatized scenario, the industry cloud scenario, etc. The so-called first compilation scenario is the compilation scenario configured by the developer for the pipeline to which the web application to be packaged belongs on the iPipe platform. The so-called second compilation scenario is the required compilation scenario of the web application to be packaged in the configuration information.

[0047] Specifically, during the compilation of the web application to be packaged, the first compilation scenario can be determined according to the scenario constructed by the developer on the iPipe platform, and then the second compilation scenario can be obtained from the configuration information. The first compilation scenario and the second compilation scenario are compared. If they are the same, it is determined that the web application to be packaged meets the compilation conditions.

[0048] It can be understood that judging whether the web application to be packaged meets the compilation conditions through the compilation scenario avoids the situation of occupying resources by processing illegal web applications to be packaged, and at the same time ensures the accuracy of subsequent version information injection.

[0049] In this embodiment, the configuration information also includes a compilation instruction, where the compilation instruction includes the processing logic for version information.

[0050] Specifically, if it is determined that the web application to be packaged meets the compilation conditions, the compilation instruction can be obtained from the configuration information (specifically, it can be obtained from the ci.yml file), and according to the processing logic for version information in the compilation instruction, the version information of the web application to be packaged can be obtained from the shell file.

[0051] Furthermore, the compilation instruction can also include the logic for compiling the source code of the web application to be packaged. Furthermore, the source code of the web application to be packaged can also be compiled according to the compilation instruction in the configuration information to obtain the compiled file of the web application to be packaged.

[0052] S202, Write the version information into the version description file.

[0053] S203, Generate the packaged file of the web application to be packaged according to the version description file and the compiled file of the web application to be packaged.

[0054] The embodiments of the present disclosure provide a technical solution. During the compilation of the web application to be packaged, when it is determined that the web application to be packaged meets the compilation conditions, according to the compilation instructions in the configuration information, the version information of the web application to be packaged is obtained, and the version information is written into the version description file. Then, according to the version description file and the compilation file of the web application to be packaged, a packaged file of the web application to be packaged is generated. The above technical solution introduces compilation conditions, improves the accuracy of the version information, and thus ensures the accuracy of the packaged file.

[0055] Based on the above embodiments, as an optional way of the embodiments of the present disclosure, it is also possible to respond to the scenario configuration instruction, display a scenario configuration interface to the developer; and determine the association relationship between the scenario and the pipeline, and the association relationship between the pipeline and the code branch according to the operations performed by the developer on the scenario configuration interface.

[0056] Specifically, the developer clicks the scenario configuration button to generate a scenario configuration instruction; correspondingly, the iPipe platform responds to the scenario configuration instruction and displays a scenario configuration interface to the developer; correspondingly, the developer can set the association relationship between the scenario and the pipeline, and the association relationship between the pipeline and the code branch on the scenario configuration interface; correspondingly, the iPipe platform determines the association relationship between the scenario and the pipeline, and the association relationship between the pipeline and the code branch according to the operations performed by the developer on the scenario configuration interface.

[0057] Figure 3 It is a flowchart of another web application packaging method provided according to the embodiments of the present disclosure. Based on the above embodiments, the step of "obtaining the version information of the web application to be packaged according to the configuration information of the web application to be packaged" is further optimized to provide an optional implementation solution. As Figure 3 shown, the web application packaging method of this embodiment may include:

[0058] S301, during the compilation of the web application to be packaged, according to the compilation instructions in the configuration information, obtain the name information of the code branch associated with the web application to be packaged.

[0059] In this embodiment, the code branch associated with the web application to be packaged is the code branch in the icode platform that stores the source code and configuration information, etc. of the web application to be packaged.

[0060] Specifically, during the compilation of the web application to be packaged, parse the fields in the configuration information to obtain the compilation instructions in the configuration information, and then obtain the name information of the code branch associated with the web application to be packaged according to the variables associated with the code branch in the compilation instructions.

[0061] S302. Determine the version information of the web application to be packaged according to the name information of the code branch.

[0062] An optional method is to add identification information to the header information of the code branch, and then use the header information with the added identification information as the version information of the web application to be packaged.

[0063] Another optional method is to perform a hash operation on the header information of the code branch and use the obtained hash result as the version information of the web application to be packaged.

[0064] Another optional method is to use the name information of the code branch as the version information of the web application to be packaged.

[0065] S303. Write the version information into the version description file.

[0066] S304. Generate the package file of the web application to be packaged according to the version description file and the compilation file of the web application to be packaged.

[0067] In the technical solution of the embodiment of the present disclosure, during the compilation of the web application to be packaged, according to the compilation instruction in the configuration information, the name information of the code branch associated with the web application to be packaged is obtained. Then, according to the name information of the code branch, the version information of the web application to be packaged is determined, and the version information is written into the version description file. Furthermore, according to the version description file and the compilation file of the web application to be packaged, the package file of the web application to be packaged is generated. In the above technical solution, by using the name information of the code branch as the version information, the automation degree is higher, and the accuracy of determining the version information is improved.

[0068] Based on the above embodiments, as an optional method of the present disclosure, the web application to be packaged can also be selected from the candidate packaged web applications according to at least one of the following: the code submission frequency of the code branch of the candidate packaged web application; the priority of the code branch of the candidate packaged web application.

[0069] Among them, the candidate packaged web application is the web application that needs to be packaged. The so-called code submission frequency is the number of times of triggering compilation within a period of time.

[0070] Exemplarily, the web application to be packaged can be selected from the candidate packaged web applications according to the code submission frequency of the code branch of the candidate packaged web application. Specifically, the target code branch can be selected from the code branches corresponding to the candidate packaged web applications according to the code submission frequency. For example, the code branch with a low code submission frequency can be used as the target code branch, and then the candidate packaged web application corresponding to the target code branch is used as the web application to be packaged.

[0071] Exemplarily, the web application to be packaged can also be selected from the candidate packaged web applications according to the priority of the code branches of the candidate packaged web applications. The priority of the code branches can be determined according to the identity level of the target server where the web application to be packaged needs to be deployed. For example, the higher the identity level of the target server, the higher the priority of the code branch.

[0072] Specifically, the target code branch can be selected from the code branches corresponding to the candidate packaged web applications according to the priority of the code branches. For example, the code branch with a higher priority can be used as the target code branch, and then the candidate packaged web application corresponding to the target code branch is used as the web application to be packaged.

[0073] Exemplarily, the web application to be packaged can also be selected from the candidate packaged web applications by combining the code submission frequency and priority of the code branches of the candidate packaged web applications.

[0074] It can be understood that by introducing the code submission frequency and priority to determine the web application to be packaged, the packaging of the candidate packaged web applications can be balanced, thereby improving the packaging efficiency of the web application to be packaged.

[0075] Figure 4 FIG. is a schematic structural diagram of a web application packaging device provided by an embodiment of the present disclosure. This method is applicable to the situation of how to package a web application. This method can be executed by a web application packaging device, and the device can be implemented in a software and / or hardware manner and can be integrated into an electronic device configured with a web application packaging function, such as a server. As Figure 4 shown, the web application packaging device 400 includes:

[0076] A version information acquisition module 401, configured to obtain the version information of the web application to be packaged according to the configuration information of the web application to be packaged during the compilation of the web application to be packaged;

[0077] A version information writing module 402, configured to write the version information into a version description file;

[0078] A packaging file generation module 403, configured to generate a packaging file of the web application to be packaged according to the version description file and the compilation file of the web application to be packaged.

[0079] In the technical solution of the embodiments of the present disclosure, during the process of compiling the web application to be packaged, according to the configuration information of the web application to be packaged, the version information of the web application to be packaged is obtained, and the version information is written into the version description file. Then, according to the version description file and the compiled file of the web application to be packaged, a packaged file of the web application to be packaged is generated. The above technical solution automatically injects the version information of the web application into the packaged file, providing a non-intrusive and automated way to inject the product version. At the same time, when maintaining the web application subsequently, the code branch corresponding to the web application can be quickly located based on the version information and repaired, thereby improving the satisfaction of application users. In addition, compared with the traditional way of manually recording version information, the technical solution of the present disclosure reduces labor costs and improves the packaging efficiency and accuracy of web applications.

[0080] Further, the version information obtaining module 401 is specifically configured to:

[0081] When it is determined that the web application to be packaged meets the compilation conditions, according to the compilation instruction in the configuration information, obtain the version information of the web application to be packaged.

[0082] Further, the device further includes:

[0083] A scenario determination module, configured to determine a first compilation scenario;

[0084] A scenario comparison module, configured to compare the first compilation scenario with a second compilation scenario in the configuration information;

[0085] A compilation condition determination module, configured to determine that the web application to be packaged meets the compilation conditions if they are consistent.

[0086] Further, the version information obtaining module 401 is specifically configured to:

[0087] According to the compilation instruction in the configuration information, obtain the name information of the code branch associated with the web application to be packaged;

[0088] According to the name information of the code branch, determine the version information of the web application to be packaged.

[0089] Further, the device further includes:

[0090] A web application to be packaged determination module, configured to select the web application to be packaged from the candidate packaged web applications according to at least one of the following:

[0091] The code submission frequency of the code branch of the candidate packaged web application;

[0092] The priority of the code branch of the candidate packaged web application.

[0093] Further, the device further includes:

[0094] A compiled file determination module is configured to compile the source code of the web application to be packaged during the compilation of the web application to be packaged, so as to obtain a compiled file of the web application to be packaged.

[0095] In the technical solution of the present disclosure, the acquisition, storage, and application of the packaged file data, version description file data, web application data to be packaged, etc. all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0096] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.

[0097] Figure 5 FIG. shows a schematic block diagram of an exemplary electronic device 500 that can be used to implement the embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0098] As Figure 5 shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0099] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disc, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0100] The computing unit 501 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes the various methods and processes described above, such as the web application packaging method. For example, in some embodiments, the web application packaging method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the web application packaging method described above can be executed. Alternatively, in other embodiments, the computing unit 501 can be configured to execute the web application packaging method in any other suitable manner (e.g., by means of firmware).

[0101] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-a-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0102] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0103] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0104] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0105] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0106] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.

[0107] Artificial intelligence is a discipline that studies how to make computers simulate certain human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), including both hardware-level technologies and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, and knowledge graph technology.

[0108] Cloud computing refers to a technical system that accesses an elastic and scalable shared physical or virtual resource pool through a network. The resources can include servers, operating systems, networks, software, applications, and storage devices, etc., and the resources can be deployed and managed in a on-demand and self-service manner. Through cloud computing technology, it can provide efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain and model training.

[0109] It should be understood that various forms of processes shown above can be used, steps can be reordered, added, or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.

[0110] The above specific implementation manners do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.

Claims

1. A method for packaging a web application, comprising: Selecting a web application to be packaged from candidate packaged web applications according to at least one of the following: The code submission frequency of the code branch of the candidate packaged web application; The priority of the code branch of the candidate packaged web application; During the compilation of the web application to be packaged, obtaining the version information of the web application to be packaged according to the configuration information of the web application to be packaged; Writing the version information into a version description file; Generating a packaged file of the web application to be packaged according to the version description file and the compilation file of the web application to be packaged; Deploying the packaged file to a target server, and the web application deployed on the target server has version information; In response to a user feedback that there is an abnormality in the web function, generating an address according to the server address where the web application is deployed and the version description file; Accessing this address through a browser to obtain the version information of the deployed web application, so that developers can locate the corresponding code in the code library according to the version information to repair the web application.

2. The method according to claim 1, wherein, The obtaining the version information of the web application to be packaged according to the configuration information of the web application to be packaged includes: When it is determined that the web application to be packaged meets the compilation conditions, obtaining the version information of the web application to be packaged according to the compilation instructions in the configuration information.

3. The method according to claim 2, further comprising: Determining a first compilation scenario; Comparing the first compilation scenario with a second compilation scenario in the configuration information; If they are the same, determining that the web application to be packaged meets the compilation conditions.

4. The method according to claim 1, wherein, The obtaining the version information of the web application to be packaged according to the configuration information of the web application to be packaged includes: Obtaining the name information of the code branch associated with the web application to be packaged according to the compilation instructions in the configuration information; Determining the version information of the web application to be packaged according to the name information of the code branch.

5. The method according to claim 1, further comprising: During the compilation of the web application to be packaged, compiling the source code of the web application to be packaged to obtain the compilation file of the web application to be packaged.

6. A web application packaging device, comprising: A to-be-packaged application determination module, configured to select a to-be-packaged web application from candidate packaged web applications according to at least one of the following: the code submission frequency of the code branch of the candidate packaged web application; The priority of the code branch of the candidate packaged web application; A version information obtaining module, configured to obtain the version information of the web application to be packaged according to the configuration information of the web application to be packaged during the compilation of the web application to be packaged; A version information writing module, configured to write the version information into a version description file; A packaged file generation module, configured to generate a packaged file of the web application to be packaged according to the version description file and the compilation file of the web application to be packaged; The packaged file generation module is further configured to deploy the packaged file to a target server, and the web application deployed on the target server has version information; In response to user feedback that there are abnormalities in the web page functions, an address is generated according to the server address and version description file where the web application is deployed. The address is accessed through a browser to obtain the version information of the deployed web application, so that developers can locate and fix the corresponding code in the code library according to the version information.

7. The apparatus according to claim 6, wherein, The version information acquisition module is specifically used for: When it is determined that the web application to be packaged meets the compilation conditions, the version information of the web application to be packaged is obtained according to the compilation instructions in the configuration information.

8. The device according to claim 7, further comprising: A scenario determination module, configured to determine a first compilation scenario; A scenario comparison module, configured to compare the first compilation scenario with a second compilation scenario in the configuration information; A compilation condition determination module, configured to determine that the web application to be packaged meets the compilation conditions if they are consistent.

9. The device according to claim 6, wherein The version information acquisition module is specifically used for: Obtaining the name information of the code branch associated with the web application to be packaged according to the compilation instructions in the configuration information; Determining the version information of the web application to be packaged according to the name information of the code branch.

10. The device according to claim 6, further comprising: A web application to be packaged determination module, configured to select a web application to be packaged from the candidate packaged web applications according to at least one of the following: The code submission frequency of the code branch of the candidate packaged web application; The priority of the code branch of the candidate packaged web application.

11. The device according to claim 6, further comprising: A compilation file determination module, configured to compile the source code of the web application to be packaged during the compilation of the web application to be packaged to obtain the compilation file of the web application to be packaged.

12. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the web application packaging method according to any one of claims 1-5.

13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause a computer to execute the web application packaging method according to any one of claims 1-5.

14. A computer program product, comprising a computer program, where the computer program implements the web application packaging method according to any one of claims 1-5 when executed by a processor.

Citation Information

Patent Citations

  • Code packaging method, computer device, computer readable storage medium and code packaging system

    CN109491662A

  • Software packaging method source code version information obtaining method, device and storage medium

    CN111782239A