A method, server and system for publishing applications
By monitoring release requests and building target code packages, cross-platform release of applications is achieved, solving the problem of low automation in existing technologies, improving development efficiency and saving costs.
Patent Information
- Application Number
- CN202110576953.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-26
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-05-26
AI Technical Summary
The publishing method used in the existing technology has a low degree of automation, which causes developers to perform downloading and publishing operations separately, which increases manpower and time costs and reduces development efficiency.
By monitoring the release request, obtaining the code to be released and its dependent codes, building the target code package, and automatically publishing it to the corresponding client, the cross-platform release of the application is realized.
It improves the automation of publishing applications, saves manpower and time costs, and improves development efficiency.
Smart Images

Figure CN113296828B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, server and system for publishing an application. Background Art
[0002] Currently, applications that are equipped with existing clients, such as mini-programs, are being widely used due to their lightweight advantages and good user experience. For users, such applications have the advantages of not requiring downloads, saving download traffic and mobile phone memory; for developers, they have the advantages of short development cycle, low development cost, and short deployment cycle.
[0003] Usually, a mini-program with the same function can be loaded and run on multiple client applications. Therefore, it is necessary to generate a release code package for each of the multiple client applications so that the mini-program can run on different client applications. However, the current method of generating a release code package for a mini-program is usually to download the code and publish it separately for different client applications by the developer. The automation level is low and there is a risk of publishing failure due to human factors, which increases the manpower and time cost of development and reduces development efficiency. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method, server and system for publishing applications, which can obtain the application's to-be-published code and its dependent application code when monitoring a request to publish an application, build a target code package for the corresponding application client based on the to-be-published code and its dependent application code, and publish the target code package to the corresponding application client; it overcomes the problem of low automation level in current application publishing, saves manpower and time costs, and improves development efficiency.
[0005] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a method for publishing an application is provided, characterized in that it includes: monitoring whether a publishing request for an application is received, wherein the publishing request indicates one or more application clients and a code to be published; when monitored, matching an application code having a dependency relationship with the code to be published for each of the application clients indicated by the publishing request; obtaining the code to be published, and based on the code to be published and the application code having a dependency relationship, constructing a target code package of the application corresponding to each of the application clients, and publishing the target code package to the corresponding application client.
[0006] Optionally, the method for publishing an application is characterized in that the code to be published includes: original code of a newly added application, or changed code of an already published application.
[0007] Optionally, the method for publishing an application is characterized by further comprising:
[0008] For an already published application, determine from the code repository the code branches corresponding to all application clients to which the application is published;
[0009] Monitoring whether a publishing request for the application is received includes: monitoring a change in the code branch, and when a monitoring result indicates that there is a changed code in the code branch, determining that a publishing request for the application is received.
[0010] Optionally, the method for publishing an application is characterized in that obtaining the code to be published includes: obtaining the changed code from the code branch.
[0011] Optionally, the method for publishing an application is characterized by matching application code that has a dependency relationship with the code to be published for each application client indicated by the publishing request, including: obtaining application code that has a dependency relationship with the code to be published from the code branch corresponding to each application client indicated by the publishing request.
[0012] Optionally, the method for publishing an application is characterized by further comprising:
[0013] A corresponding code package construction strategy is matched for each application client indicated by the publishing request; and the target code package step of the application corresponding to each application client is executed using the construction strategy.
[0014] Optionally, the method for publishing an application is characterized by further comprising:
[0015] Matching a corresponding publishing strategy for each application client indicated by the publishing request;
[0016] The publishing strategy is used to execute the step of publishing the target code package to the corresponding application client.
[0017] To achieve the above object, according to a second aspect of an embodiment of the present invention, a server for publishing applications is provided, characterized in that it includes: a monitoring code module, an acquisition code module and a publishing code module; wherein,
[0018] The monitoring code module is used to monitor whether a publishing request for an application is received, wherein the publishing request indicates one or more application clients and a code to be published;
[0019] The code acquisition module is used for matching the application code having a dependency relationship with the code to be published for each application client indicated by the publishing request when monitoring;
[0020] The code publishing module is used to obtain the code to be published, and based on the code to be published and the application code with dependencies, build a target code package of the application corresponding to each of the application clients, and publish the target code package to the corresponding application client.
[0021] To achieve the above-mentioned purpose, according to the third aspect of an embodiment of the present invention, a system for publishing applications is provided, characterized in that it comprises: a server for publishing applications as described in the second aspect and multiple application clients; wherein the server is connected to the multiple application clients, and is used for, after listening to a publishing request for an application, publishing the application to one or more of the multiple application clients connected to the server as indicated by the publishing request.
[0022] To achieve the above-mentioned purpose, according to the fourth aspect of an embodiment of the present invention, there is provided an electronic device for publishing applications, characterized in that it includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the above-mentioned methods for publishing applications.
[0023] To achieve the above-mentioned purpose, according to a fifth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any method as described in the above-mentioned method for publishing an application is implemented.
[0024] An embodiment of the above invention has the following advantages or beneficial effects: it is able to obtain the application's to-be-published code and its dependent application code when monitoring an application publishing request, build a target code package for the corresponding application client based on the to-be-published code and its dependent application code, and publish the target code package to the corresponding application client; it overcomes the current problem of low automation in publishing applications, saves manpower and time costs, and improves development efficiency.
[0025] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0027] Figure 1 It is a flowchart of a method for publishing an application provided by an embodiment of the present invention;
[0028] Figure 2It is a schematic diagram of a process of publishing an application provided by an embodiment of the present invention;
[0029] Figure 3A It is a structural diagram of a system for publishing applications provided by an embodiment of the present invention;
[0030] Figure 3B It is a structural diagram of an existing publishing application system provided by an embodiment of the present invention;
[0031] Figure 4 It is a structural schematic diagram of a device for publishing applications provided by an embodiment of the present invention;
[0032] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0033] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0035] like Figure 1 As shown, an embodiment of the present invention provides a method for publishing an application, which may include the following steps:
[0036] Step S101: monitoring whether a publishing request for an application is received, wherein the publishing request indicates one or more application clients and codes to be published.
[0037] Specifically, the application can be an application that is equipped with an existing client and runs on an existing client, such as a mini program, an H5 application, etc. The existing client is an existing application, such as an application client A, an application client B, etc. This application uses a mini program as an example of an application. Among them, the Taro tool can be used to develop mini programs and H5 applications. The Taro tool provides an open cross-end and cross-framework solution, and supports the use of frameworks such as React / Vue / Nerv to develop mini programs, H5 applications, etc. that run on multiple application clients.
[0038] Furthermore, it is monitored whether a publishing request for an application is received, wherein the publishing request includes the code to be published, for example: the developed applet is applet abc, which can be run on application client A, application client B, and application client C; in the case where the code of applet abc is changed, it is necessary to perform a recompilation operation for applet abc for the changed code, so that the applet abc includes the functional changes corresponding to the changed code after being released. Among them, the method of monitoring whether a publishing request for an application is received can be: monitoring whether the code repository has received the uploaded code (for example: developers can use the Git push method to upload the changed code to the code repository), or receiving a publishing request in HTTP mode; the monitoring method used includes using the webhook tool to configure the monitored event (for example: receiving the event corresponding to the publishing request for the application) to obtain the update information corresponding to the event in real time.
[0039] Furthermore, the publishing request includes information corresponding to the code to be released and one or more application clients corresponding to the released code. The publishing request may include client information of one or more application clients, such as a feature identifier, to indicate the application client on which the code to be released runs. For example, if the code to be released needs to run on application client A and application client B, the publishing request includes the feature identifier of application client A and the feature identifier of application client B, so as to execute the mini-program publishing operation separately according to the feature identifiers.
[0040] Furthermore, the code to be released includes: the original code of the newly added application, or the changed code of the already released application; it can be understood that the code change of the mini program includes the addition, modification, deletion, etc. of a mini program code, and the code to be released (the changed code) can be the code belonging to the change of the already released mini program, or it can be the original code of the newly added application (for example: the mini program newly developed for one or more application clients) (for example: the code uploaded for the first time of the newly developed mini program).
[0041] By listening to whether a publishing request for an application is received, the publishing request of the application (mini program) to be published can be obtained in real time, thereby executing the operation of publishing the application (mini program) in real time. Developers only need to upload the code to be published, without having to manually perform compilation and publishing operations, including compiling and publishing operations locally on the client, or editing and publishing operations on the set server, thereby saving manpower and time costs and improving development efficiency.
[0042] Step S102: when detected, matching application codes having a dependency relationship with the code to be published for each application client indicated by the publishing request.
[0043] Specifically, after listening to the receipt of a release request for the application, an operation of determining the code to be released and its dependent code is performed. The release request may include a code branch corresponding to the code to be released. It is understandable that there are multiple code branches in the development process of an application project to generate different versions of applications according to different code branches, for example: A application client code branch 1, A application client code branch 2, B application client code branch 1, B application client code branch 2, the latest code branch, test code branch, etc. Therefore, when obtaining the code, the corresponding code can be obtained according to the received code branch. If the release request does not include the code branch corresponding to the code to be released, a default branch can be configured, for example, the default branch is the latest code branch.
[0044] Furthermore, for the published application, the code branches corresponding to all application clients to which the application is published are determined from the code repository; monitoring whether a publishing request for the application is received includes: monitoring changes to the code branch, and when the monitoring result indicates that there is a changed code in the code branch, determining that a publishing request for the application is received. Specifically, monitoring whether a publishing request is received includes monitoring whether the uploaded code to be published is received in the code branch corresponding to the application, monitoring changes to the code branch, and when the monitoring result indicates that there is a changed code in the code branch, determining that a publishing request for the application is received, so as to perform an operation of obtaining the code according to the publishing request.
[0045] Further, obtaining the code includes: obtaining the change code from the code branch. And, matching the application code that has a dependency relationship with the code to be released for each of the application clients indicated by the release request, including: obtaining the application code that has a dependency relationship with the code to be released from the code branch corresponding to each of the application clients indicated by the release request. For example: a developer uploads the modified code of the small program developed for the A application client in the code branch 1 of the A application client (for example: the modified code is a plurality of source code files, including files that update existing code, add new code files, delete existing code files, etc.), then the modified code (i.e., the change code) is obtained from the A application client code branch, and at the same time, in order to perform the operation of compiling and generating the target code package, it is necessary to match the application code that has a dependency relationship with the code to be released for each of the application clients indicated by the release request, specifically, obtaining the application code that has a dependency relationship with the code to be released from the code branch corresponding to each of the application clients indicated by the release request. For example: obtain the modified code (i.e., the changed code) from code branch 1 of application client A; further, obtain the application code with which the code to be released has a dependency from code branch 1 corresponding to application client A; it is understandable that in order for the application (applet) to compile successfully, it is necessary to obtain the code with a dependency relationship with the changed code; wherein, the code with a dependency relationship can be all the code of the application (applet) or part of the code. When the dependent code is part of the code, the target code package is constructed to include code that is not related to the changed code. After determining the target code branch, the method for obtaining the current code branch can be: using the Git command: "gitrev-parse–abbrev-ref HEAD" to obtain it.
[0046] By automatically acquiring the code to be released and the application code having a dependency relationship with the code to be released according to the code branch, the automation level of releasing the application is improved, the labor cost is saved, and the development efficiency is improved.
[0047] Step S103: Acquire the code to be released, and build a target code package of the application corresponding to each of the application clients based on the code to be released and the application code with dependencies, and release the target code package to the corresponding application client.
[0048] Specifically, the code to be released and the application code with dependencies are obtained, a target code package is constructed, and the target code package is published to the corresponding application client; for example: the code to be released is for application client A and application client B, then target code package A for application client A and target code package B for application client B are constructed respectively; and target code package A for application client A is published to application client A, and target code package B for application client B is published to application client B respectively.
[0049] Furthermore, the method for building a target code package includes: matching a corresponding code package building strategy for each application client indicated by the publishing request; and executing the step of building a target code package for each application client corresponding to the application using the building strategy. For example: using the cli tool included in the Taro tool to build a target code package, for application client A, the matching building strategy is: through the command npm run build:clientA of the cli tool, the small program target code package A running on application client A can be built; for application client B, the matching building strategy is: through the command npm run build:clientB of the cli tool, the small program target code package B running on application client B can be built; for application client C, the matching building strategy is: through the command npm run build:clientC of the cli tool, the small program target code package C running on application client C can be built. Among them, npm (Node Package Manager) is used to manage the interaction between the server and the client, and is usually used in conjunction with other tools to install and uninstall the code packages required to run the application project, as well as for version management and dependency management.
[0050] Further, based on the constructed target code package, the target code package is published to the corresponding application client, specifically, a corresponding publishing policy is matched for each application client indicated by the publishing request; and the step of publishing the target code package to the corresponding application client is performed using the publishing policy. For example: a corresponding publishing policy is matched for each application client, wherein the publishing policy can be configuration information matched for each application client; the following example illustrates the publishing policy, for example:
[0051] For the A application client, use the npm package of miniprogram-ci to build the object through the project structure of miniprogram-ci, and publish the target code package A to the corresponding A application client through the upload interface according to the unique identifier of the mini program, the target code package path, the uploaded package type and other information.
[0052] For the B application client, use the npm package of swan-tookit to obtain the path, version information, description information and other information of the mini program target code package, and publish the target code package B to the corresponding B application client through the upload interface.
[0053] For the C application client, use the abc-uploader package to obtain the path, version information, description information and other information of the mini-program target code package, and publish the target code package C to the corresponding C application client through the upload interface.
[0054] The method described in steps S101-S103 can be implemented through the Pipeline plug-in included in the Jenkins tool to complete the operation of automatically publishing the application (mini program) to one or more application clients to which the mini program belongs; it can be seen that by using the method of publishing applications in the present application, the uploaded change code can be automatically generated into a target code package and automatically published to the corresponding client, thereby improving development efficiency through automated application publishing processes.
[0055] like Figure 2 As shown, an embodiment of the present invention provides a method for publishing an application, which may include the following steps:
[0056] Step S201: Acquire the change code, and acquire the application code having a dependency relationship with the code to be released.
[0057] Specifically, the description of obtaining the change code according to the release request and obtaining the application code having a dependency relationship with the code to be released is consistent with the description of step S101 and step S102, and will not be repeated here.
[0058] Step S202: matching a corresponding code package construction strategy for each application client indicated by the publishing request; and executing the step of constructing a target code package of the application corresponding to each application client using the construction strategy.
[0059] Specifically, according to the client information indicated by the publishing request, a target code package is constructed for the corresponding one or more clients, for example, Figure 2 As shown, the A application client is matched with the corresponding code package construction strategy A to construct the target code package A corresponding to the A application client; the B application client is matched with the corresponding code package construction strategy B to construct the target code package B corresponding to the B application client; the N application client is matched with the corresponding code package construction strategy N to construct the target code package N corresponding to the N application client; the specific description of multiple construction strategies is consistent with the description of step S103 and will not be repeated here.
[0060] Step S203: matching a corresponding publishing strategy for each application client indicated by the publishing request; and executing the step of publishing the target code package to the corresponding application client using the publishing strategy.
[0061] Specifically, for each of the application clients, a target code package is released so that the target code package containing the code to be released runs on the corresponding application client, such as Figure 2 As shown, for example: using the release policy A corresponding to the A application client, the target code package A is released; using the release policy B corresponding to the B application client, the target code package B is released; using the release policy N corresponding to the N application client, the target code package N is released; the specific description of multiple release policies is consistent with the description of step S103 and will not be repeated here.
[0062] like Figure 3A As shown, an embodiment of the present invention provides a system for publishing applications, including: a server for publishing applications and multiple application clients; wherein the server is connected to the multiple application clients, and is used to publish the application to one or more of the multiple application clients connected to the server indicated by the publishing request after listening to a publishing request for the application.
[0063] Specifically, Figure 3A As shown, after listening to the publishing request for the application, the server for publishing the application automatically executes the step of obtaining the code to be published and the code it depends on, and further executes the step of building a target code package and publishing it; wherein the server for publishing the application is connected with application client A, application client B... application client N (i.e., multiple application clients), and automatically executes the publishing process of the same applet (e.g., applet abc) for different application clients;
[0064] Figure 3B The existing application publishing scheme is shown as follows: Figure 3B As shown, different developers use one or more servers to execute the steps of building and publishing the target code package for the corresponding A application client, B application client, and C application client, respectively. Figure 3B As shown in the example of the existing solution, this application connects the server that publishes the application with multiple application clients to achieve unified management of application publishing and automation of the process, saving the manpower and time costs of developers and improving development efficiency.
[0065] like Figure 4 As shown, the embodiment of the present invention provides a server 400 for publishing applications, including: a monitoring code module 401, an acquisition code module 402 and a publishing code module 403; wherein,
[0066] The monitoring code module 401 is used to monitor whether a publishing request for an application is received, wherein the publishing request indicates one or more application clients and the code to be published;
[0067] The code acquisition module 402 is used for matching the application code having a dependency relationship with the code to be published for each application client indicated by the publishing request when monitoring;
[0068] The code publishing module 403 is used to obtain the code to be published, and based on the code to be published and the application code with dependencies, build a target code package of the application corresponding to each of the application clients, and publish the target code package to the corresponding application client.
[0069] An embodiment of the present invention also provides an electronic device for publishing applications, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0070] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in any of the above embodiments is implemented.
[0071] Figure 5 An exemplary system architecture 500 of a server for publishing applications or a method for publishing applications according to an embodiment of the present invention is shown.
[0072] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0073] The user can use the terminal devices 501, 502, 503 to interact with the server 505 through the network 504 to receive or send messages, etc. Various client applications can be installed on the terminal devices 501, 502, 503, such as application clients used for development, etc.
[0074] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting various client applications, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0075] The server 505 may be a server providing various services, such as a background management server providing support for client applications used by users using the terminal devices 501, 502, 503. The background management server may process the received application publishing request and publish the generated target code package to the terminal device.
[0076] It should be noted that the method for publishing applications provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the server for publishing applications is generally set in the server 505 .
[0077] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0078] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0079] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0080] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0081] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0082] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0083] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0084] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be set in a processor, for example, they may be described as: a processor includes a monitoring code module, an acquisition code module, and a publishing code module; wherein the names of these modules do not constitute a limitation on the modules themselves in certain circumstances, for example, the monitoring code module may also be described as "a module for monitoring whether a publishing request for an application is received".
[0085] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: monitoring whether a publishing request for an application is received, wherein the publishing request indicates one or more application clients and the code to be published; when monitored, matching the application code with a dependency relationship with the code to be published for each application client indicated by the publishing request; obtaining the code to be published, and based on the code to be published and the application code with a dependency relationship, constructing the target code package of the application corresponding to each application client, and publishing the target code package to the corresponding application client.
[0086] The embodiments of the present invention can obtain the code to be published and the application code it depends on when monitoring a publishing request, build a target code package for the corresponding application client based on the code to be published and the application code it depends on, and publish the target code package to the corresponding application client; it overcomes the problem of low automation level in current application publishing, saves manpower and time costs, and improves development efficiency.
[0087] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for publishing an application, It is characterized in that include: Monitoring whether a publishing request for an application is received, wherein the publishing request indicates multiple application clients and codes to be published; wherein the application is mounted and runs on multiple application clients; the application is a mini program or an H5 application, and the application client is an existing application; When detected, matching application codes having a dependency relationship with the code to be published for each application client indicated by the publishing request; Obtain the code to be released, and build a target code package of the application corresponding to each of the application clients based on the code to be released and the application code with dependencies, and publish the target code package to the corresponding application client; wherein, each target code package is built using the cli tool included in the Taro tool; The method further includes: matching a corresponding publishing strategy for each application client indicated by the publishing request; wherein the publishing strategy uses a publishing method among the npm package of miniprogram-ci, the npm package of swan-tookit, and the abc-uploader package, and according to the path, version information and description information of the target code package of the acquired application, publishes the target code package to the corresponding application client through the upload interface, wherein different application clients use different publishing methods.
2. The method according to claim 1, It is characterized in that The code to be released includes: The original code of a newly added application, or the modified code of an already released application.
3. The method according to claim 1, It is characterized in that Further including: For already released applications, Determine from the code repository the code branches corresponding to all application clients to which the application is published; Monitor whether a publishing request for the application is received, including: Monitoring changes to the code branch, and when a monitoring result indicates that there is a changed code in the code branch, determining that a publishing request for the application is received.
4. The method according to claim 3, It is characterized in that The obtaining of the code to be released includes: The changed code is obtained from the code branch.
5. The method according to claim 3, It is characterized in that Matching, for each application client indicated by the publishing request, an application code having a dependency relationship with the code to be published, comprising: From the code branch corresponding to each application client indicated by the publishing request, obtain application code having a dependency relationship with the code to be published.
6. The method according to claim 1, It is characterized in that Further including: Matching a corresponding code package construction strategy for each application client indicated by the publishing request; The construction strategy is used to execute the step of constructing a target code package of the application corresponding to each of the application clients.
7. The method according to claim 1, It is characterized in that Further including: The publishing strategy is used to execute the step of publishing the target code package to the corresponding application client.
8. A server for publishing applications, It is characterized in that include: Listen to the code module, obtain the code module and publish the code module; among them, The monitoring code module is used to monitor whether a publishing request for an application is received, wherein the publishing request indicates multiple application clients and codes to be published; wherein the application is carried and runs on multiple application clients; the application is a mini program or an H5 application, and the application client is an existing application; The code acquisition module is used for matching the application code having a dependency relationship with the code to be published for each application client indicated by the publishing request when monitoring; The code publishing module is used to obtain the code to be published, and based on the code to be published and the application code with dependencies, build a target code package of the application corresponding to each application client, and publish the target code package to the corresponding application client; wherein each target code package is built using the cli tool included in the Taro tool; The code publishing module is also used to match a corresponding publishing strategy for each application client indicated by the publishing request; wherein the publishing strategy utilizes a publishing method among the npm package of miniprogram-ci, the npm package of swan-tookit, and the abc-uploader package, and according to the path, version information and description information of the target code package of the acquired application, publishes the target code package to the corresponding application client through the upload interface, wherein different application clients use different publishing methods.
9. A system for publishing applications, It is characterized in that include: The server for publishing applications and multiple application clients as described in claim 8; wherein: The server is connected to multiple application clients, and is used to publish the application to one or more of the multiple application clients connected to the server indicated by the publishing request after listening to a publishing request for the application; the application is a mini program or an H5 application, and the application client is an existing application.
10. An electronic device, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
11. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Software release method and software release system
CN106775912A
System for performing software update version publishing automatically and efficiently
CN108170448A
Application publishing method and device and computer readable storage medium
CN108762767A
