Project deployment method and apparatus, electronic device, and storage medium

The automated packaging program automatically executes the Cordova project deployment process, generates and sends the target application installation package, solving the problem of low efficiency of manual operation in existing technologies and achieving efficient automated deployment and version management.

CN119781814BActive Publication Date: 2026-05-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GREE ELECTRIC APPLIANCE INC OF ZHUHAI
Filing Date
2024-12-24
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, the deployment process of Cordova projects relies on manual operation, which leads to inefficiency and wastes human and time costs.

Method used

An automated packaging program is used to automatically execute the project packaging process, generate the target application installation package, generate a unique name based on the installation package version number, and finally automatically send it to the test terminal.

Benefits of technology

It enables automated project deployment, saving a significant amount of manpower and deployment time, improving work efficiency, and making it easy to identify the installation package version through a unique name.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781814B_ABST
    Figure CN119781814B_ABST
Patent Text Reader

Abstract

The application provides a project deployment method and device, electronic equipment and storage medium, the method comprises the following steps: in response to the packing program command, obtaining a preset automatic packing program; using the automatic packing program, sequentially executing a plurality of packaging processes contained in the project packaging process to obtain a corresponding target application installation package; using the automatic packing program to determine the installation package version number corresponding to the target application installation package; generating a unique installation package name based on the installation package version number, and naming the target application installation package using the installation package name; running the automatic sending installation package program, and sending the named target application installation package to the test end using the automatic sending installation package program. Thus, the automatic push deployment process is realized, the work efficiency is improved, the deployment efficiency is improved, and the user can quickly understand the installation package version through the name.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a project deployment method, apparatus, electronic device and storage medium. Background Technology

[0002] Cordova is an open-source mobile application framework. It allows developers to create native mobile applications using HTML, CSS, and JavaScript, and package, deploy, and test them on various mobile platforms through Cordova's command-line interface.

[0003] Currently, in the deployment process of Cordova projects, developers mostly manually package APK (Android application package) installation packages in external development environments. The process of packaging APK installation packages involves multiple steps, and each step requires manual intervention from developers to execute the corresponding operation.

[0004] This method of deploying projects manually is inefficient and easily leads to a waste of human resources and time. Summary of the Invention

[0005] This application provides a project deployment method, apparatus, electronic device, and storage medium to solve the problem that the existing technology of manually deploying projects is inefficient and easily leads to a waste of human and time costs.

[0006] Firstly, this application provides a project deployment method, including:

[0007] In response to a packaging command, retrieve the preset automated packaging program;

[0008] Using the automated packaging program, several packaging processes included in the project packaging process are executed sequentially to obtain the corresponding target application installation package;

[0009] The automated packaging program is used to determine the version number of the installation package corresponding to the target application installation package;

[0010] A unique installation package name is generated based on the installation package version number, and the target application installation package is named using the installation package name;

[0011] Run the automatic installation package sending program, and use the automatic installation package sending program to send the named target application installation package to the test terminal.

[0012] In one possible implementation, the sequential execution of several packaging processes included in the project packaging process to obtain the corresponding target application installation package includes:

[0013] Execute the command to package page resources, and build a resource folder based on the configuration folder in the project according to the instructions of the command to package page resources;

[0014] Copy the resource folder to the package folder in the project specification directory to update the project directory page resource files;

[0015] Execute the resource move command, and copy the updated page resource file to the internal folder corresponding to the project according to the instructions of the resource move command;

[0016] Execute the installation package packaging command, and generate the initial installation package file according to the instructions of the installation package packaging command and the page resource files in the internal folder;

[0017] Cut the initial installation package file to the project root directory, and perform an installation package signing operation on the initial installation package file to obtain the target application installation package.

[0018] In one possible implementation, determining the installation package version number corresponding to the target application installation package using the automated packaging program includes:

[0019] The automated packaging program is used to parse the packaging program commands to obtain version update parameters;

[0020] If the version update parameter is set to the update version number, the operation of modifying the version number is performed, and the modified version number is determined as the version number of the installation package corresponding to the target application installation package.

[0021] In one possible implementation, the method further includes: when the version update parameter is not to update the version number, determining the current version number corresponding to the target application installation package as the installation package version number.

[0022] In one possible implementation, determining the installation package version number corresponding to the target application installation package using the automated packaging program includes:

[0023] The automated packaging program is used to locate the target file in the configuration file of the project;

[0024] Obtain the target version number from the target file;

[0025] The version number of the installation package corresponding to the target application installation package is determined as the target version number.

[0026] In one possible implementation, generating a unique installation package name based on the installation package version number includes:

[0027] The automated packaging program is used to generate a unique identifier corresponding to the target application installation package.

[0028] The installation package name is generated based on the installation package version number and the unique identifier.

[0029] In one possible implementation, prior to running the automatic installation package delivery program, the method further includes:

[0030] Obtain the file size of the target application installation package;

[0031] If the file size exceeds a preset threshold, the target application installation package is split and compressed to obtain multiple compressed files corresponding to the target application installation package;

[0032] The step of sending the named target application installation package to the test terminal using the automatic installation package sending program includes:

[0033] The automatic installation package sending program is used to send multiple compressed files corresponding to the target application installation package to the test terminal.

[0034] In one possible implementation, after running the automatic installation package sending program and using the automatic installation package sending program to send the named target application installation package to the test terminal, the method further includes:

[0035] Receive feedback information returned by the test terminal;

[0036] Based on the feedback information, the multiple packaging processes included in the project packaging process are re-executed to obtain the corresponding updated application installation package;

[0037] Run the automatic installation package sending program, and use the automatic installation package sending program to send the updated application installation package to the test terminal.

[0038] Secondly, this application provides a project deployment apparatus, comprising:

[0039] The program acquisition module is used to obtain the preset automated packaging program in response to the packaging program command;

[0040] The process execution module is used to use the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain the corresponding target application installation package;

[0041] The version number determination module is used to determine the version number of the installation package corresponding to the target application installation package using the automated packaging program.

[0042] The naming module is used to generate a unique installation package name based on the installation package version number, and to name the target application installation package using the installation package name;

[0043] The sending module is used to run an automatic installation package sending program and use the automatic installation package sending program to send the named target application installation package to the test terminal.

[0044] In one possible implementation, the process execution module is specifically used for:

[0045] Execute the command to package page resources, and build a resource folder based on the configuration folder in the project according to the instructions of the command to package page resources;

[0046] Copy the resource folder to the package folder in the project specification directory to update the project directory page resource files;

[0047] Execute the resource move command, and copy the updated page resource file to the internal folder corresponding to the project according to the instructions of the resource move command;

[0048] Execute the installation package packaging command, and generate the initial installation package file according to the instructions of the installation package packaging command and the page resource files in the internal folder;

[0049] Cut the initial installation package file to the project root directory, and perform an installation package signing operation on the initial installation package file to obtain the target application installation package.

[0050] In one possible implementation, the version number determination module is specifically used for:

[0051] The automated packaging program is used to parse the packaging program commands to obtain version update parameters;

[0052] If the version update parameter is set to update version number, perform the operation to modify the version number, and determine the modified version number as the version number of the installation package corresponding to the target application installation package.

[0053] In one possible implementation, the version number determination module is further configured to: determine the current version number corresponding to the target application installation package as the installation package version number when the version update parameter is not to update the version number.

[0054] If the version update parameter is set to not update the version number, the current version number corresponding to the target application installation package is determined as the installation package version number.

[0055] In one possible implementation, the version number determination module is further configured to:

[0056] The automated packaging program is used to locate the target file in the configuration file of the project;

[0057] Obtain the target version number from the target file;

[0058] The version number of the installation package corresponding to the target application installation package is determined as the target version number.

[0059] In one possible implementation, the naming module is specifically used for:

[0060] The automated packaging program is used to generate a unique identifier corresponding to the target application installation package.

[0061] The installation package name is generated based on the installation package version number and the unique identifier.

[0062] In one possible implementation, the apparatus further includes a packet compression module for:

[0063] Obtain the file size of the target application installation package;

[0064] If the file size exceeds a preset threshold, the target application installation package is split and compressed to obtain multiple compressed files corresponding to the target application installation package;

[0065] The step of sending the named target application installation package to the test terminal using the automatic installation package sending program includes:

[0066] The automatic installation package sending program is used to send multiple compressed files corresponding to the target application installation package to the test terminal.

[0067] In one possible implementation, the method further includes an update module for:

[0068] Receive feedback information returned by the test terminal;

[0069] Based on the feedback information, the multiple packaging processes included in the project packaging process are re-executed to obtain the corresponding updated application installation package;

[0070] Run the automatic installation package sending program, and use the automatic installation package sending program to send the updated application installation package to the test terminal.

[0071] Thirdly, this application provides an apparatus comprising: a processor and a memory, the processor being configured to execute a project deployment program stored in the memory to implement the project deployment method described in any one of the first aspects.

[0072] Fourthly, this application provides a storage medium storing one or more programs that can be executed by one or more processors to implement the project deployment method described in any one aspect.

[0073] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application, in response to a packaging program command, obtains a preset automated packaging program; uses the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain the corresponding target application installation package; uses the automated packaging program to determine the installation package version number corresponding to the target application installation package; generates a unique installation package name based on the installation package version number, and names the target application installation package using the installation package name; runs an automatic installation package sending program, and uses the automatic installation package sending program to send the named target application installation package to the test end. Through this application, when a user issues a packaging program command, the system can execute the automated packaging program, which automatically executes the packaging-related processes one by one in sequence until packaging is completed and sent to the test end. This achieves automatic deployment, saving a significant amount of manpower and deployment time, improving work efficiency, and enhancing deployment efficiency. Furthermore, this application can generate a unique installation package name based on the version number to name the target installation package, thus allowing users to quickly understand the installation package version by name. Attached Figure Description

[0074] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0075] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0076] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0077] Figure 1 A flowchart illustrating an embodiment of a project deployment method provided in this application;

[0078] Figure 2 A flowchart illustrating an embodiment of this application, showing how to sequentially execute several packaging processes included in a project packaging process to obtain a corresponding target application installation package;

[0079] Figure 3An overall flowchart of a project deployment method provided in this application embodiment;

[0080] Figure 4 A block diagram illustrating an embodiment of a project deployment apparatus provided in this application;

[0081] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0083] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0084] To address the technical problems of low efficiency and wasted human resources and time in existing manual project deployment methods, this application provides a project deployment method that enables the system to execute an automated packaging program when a user issues a packaging command. The automated packaging program automatically executes the packaging-related processes one by one in sequence until the packaging is completed and sent to the testing end. This achieves automatic deployment, saves a significant amount of human deployment time, improves work efficiency, and enhances deployment efficiency.

[0085] Figure 1 This is a flowchart illustrating an embodiment of a project deployment method provided in this application.

[0086] like Figure 1 As shown, the method includes the following steps:

[0087] Step 101: In response to the packaging program command, obtain the preset automated packaging program.

[0088] Step 102: Using the automated packaging program, execute several packaging processes included in the project packaging process in sequence to obtain the corresponding target application installation package.

[0089] For ease of understanding, steps 101 and 102 will be explained uniformly below:

[0090] Packaging commands are used to instruct the system to package application installation packages; they are typically shell commands in the Cordova specification.

[0091] An automated packaging program is a pre-written program for users to automatically execute multiple packaging processes involved in the packaging process.

[0092] A project can be a front-end project for developing browser pages, such as a Vue project. The packaged output can be run directly in the browser to generate web pages and obtain page resources. However, the packaged output cannot be run directly on a mobile phone. It needs to be packaged into a mobile APP installation package (APK) by the Cordova project before it can run on a mobile phone.

[0093] In practical applications, users open the CMD (Command Prompt) command-line tool, quickly switch to the Cordova project directory, and execute shell commands to package the APK installation package (i.e., packaging program commands), such as the npm script command "npm run build:prod" used to build the project.

[0094] After the system receives the packaging command from the user, it begins to execute the packaging process of the Cordova mobile project in sequence according to the instructions of the packaging command (including processes such as generating an initial APK installation package, signing the initial APK installation package, and modifying the APK installation package name), to obtain the target application installation package, that is, the APK installation package that can run on the mobile device.

[0095] Step 103: Use the automated packaging program to determine the version number of the installation package corresponding to the target application installation package.

[0096] The installation package version number is used to identify the version of the target application installation package.

[0097] In one embodiment, step 103 may include the following steps:

[0098] Step A1: Use the automated packaging program to parse the packaging program commands to obtain version update parameters;

[0099] Step A2: If the version update parameter is an update version number, perform the operation of modifying the version number, and determine the modified version number as the version number of the installation package corresponding to the target application installation package;

[0100] Step A3: If the version update parameter is set to not update the version number, determine the current version number corresponding to the target application installation package as the installation package version number.

[0101] For ease of understanding, steps A1-A3 will be explained uniformly below:

[0102] In the application, when users issue commands to the packaging program, they can input version update parameters to instruct the automated packaging program to perform the corresponding version update operation. For example, the shell command that needs to update the version number is: `npm run build:prod update version number`; the shell command that does not need to update the version number is: `npm run build:prod do not update version number`.

[0103] Based on this, in this embodiment, version update parameters can be obtained by parsing the packaging program commands, and the corresponding version update operation can be determined according to the version update parameters. Specifically, when the version update parameter is to update the version number, the operation of modifying the version number is performed. In applications, the version update effect is generally obtained by modifying according to the specifications of the Cordova project (reflected in the version message when installing the APK). Specifically, the two XML files related to the Cordova project version number are modified, so that the version number of the installation package corresponding to the target application installation package generated later is the modified version number. When the version update parameter is not to update the version number, the operation of modifying the version number is not performed, and the version number of the installation package corresponding to the target application installation package generated later is the current version number. Through this scheme, users can modify the version number according to their actual needs.

[0104] In practical applications, the default rule for passing version update parameters via the packaging program command is to increment the minor version by 1. For example, if the version number of the last packaged version was 1.1.1, the version number of the current packaged version would be 1.1.2, and the version number cannot be customized. Therefore, in another embodiment of this application, step 103 may further include the following steps:

[0105] Step B1: Use the automated packaging program to locate the target file in the configuration file of the project;

[0106] Step B2: Obtain the target version number from the target file;

[0107] Step B3: Determine the version number of the installation package corresponding to the target application installation package as the target version number.

[0108] For ease of understanding, steps B1-B3 will be explained uniformly below:

[0109] The target file is the package.json file in the Vue project. In the application, users can define the latest version value (i.e., the target version number) in this file.

[0110] Based on this, in this embodiment of the application, the package.json file can be found in the configuration file of the Vue project, and the latest version value set by the user can be obtained from the package.json file. Finally, the version number setting operation is automatically executed, that is, the two XML files related to the Cordova project version number are modified to set the version number of the installation package corresponding to the target application installation package to the target version number.

[0111] This solution allows users to set any value as the target version number, thus enabling flexible setting of the version number of the target application installation package according to user needs, achieving version number customization.

[0112] Step 104: Generate a unique installation package name based on the installation package version number, and use the installation package name to name the target application installation package.

[0113] In this embodiment of the application, step 104 may include the following steps:

[0114] The automated packaging program generates a unique identifier corresponding to the target application installation package, and the installation package name is generated based on the installation package version number and the unique identifier.

[0115] The aforementioned unique identifier is used to uniquely identify the target application installation package. In the application, the automated packaging program can use timestamps to generate unique identifiers. For example, if the current timestamp is 1728702231840, then the unique identifier is 1728702231840. The timestamp will be different every millisecond, and the unique identifier will also be different.

[0116] In applications, the initial name of the runnable target application installation package generated through step 102 is generally name_unsigned.apk, which cannot uniquely identify the target application installation package.

[0117] Based on this, in this embodiment, an installation package name can be generated based on the installation package version number and a unique identifier, and this installation package name can be cached. Then, the name of the target application installation package can be renamed to the installation package name. This allows users to easily distinguish the newly generated target application installation package by its installation package name, and also allows them to understand the version of the target application installation package simply by its name.

[0118] Step 105: Run the automatic installation package sending program, and use the automatic installation package sending program to send the named target application installation package to the test terminal.

[0119] An automatic installation package delivery program is a pre-written program by the user to automatically execute the delivery of installation packages.

[0120] In this embodiment, after obtaining and naming the target application installation package, an automatic installation package sending program can be run to send the target application installation package to the test terminal for testing by testers. This completes the automated deployment of the project.

[0121] In practical applications, there are situations where the target application installation package file is too large to be transmitted. Therefore, in another embodiment of this application, before and after step 105, the following steps may be included: obtaining the file size of the target application installation package; if the file size is greater than a preset threshold, performing a split compression operation on the target application installation package to obtain multiple compressed files corresponding to the target application installation package;

[0122] Based on this, step 105 can include: using the automatic installation package sending program to send multiple compressed files corresponding to the target application installation package to the test terminal.

[0123] A preset threshold is used to characterize the maximum file size limit of the platform sending the installation package.

[0124] In this embodiment, the file size of the target application installation package can be obtained through an automated packaging program, and if the file size exceeds a preset threshold, the target application installation package can be split and compressed to obtain multiple compressed files.

[0125] For example, when sending a target application installation package from the external network to the internal network via the G platform, if the G platform has a maximum file size limit of 60M and the target application installation package is 300M in size, then compression tools such as 7z compression can be used to split the target application installation package into 6 compressed packages (i.e., compressed files), with each compressed package being no larger than 50M (maximum not exceeding 60M).

[0126] In the application, after obtaining multiple compressed files, a file list is generated, which contains the filenames of the multiple compressed files.

[0127] Finally, the automatic installation package sending program will send multiple compressed files to the test terminal based on the filenames in the list.

[0128] This solution automatically performs a split compression operation on the target application installation package when its file size exceeds the maximum file size limit of the platform sending the installation package. This splits the target application installation package into multiple compressed files that meet the limit, thus ensuring that the files can be successfully sent to the test end.

[0129] Furthermore, in yet another embodiment of this application, after step 105, the following steps may also be included:

[0130] Step C1: Receive feedback information returned by the test terminal;

[0131] Step C2: Based on the feedback information, re-execute the multiple packaging processes included in the project packaging process to obtain the corresponding updated application installation package;

[0132] Step C3: Run the automatic installation package sending program and use the automatic installation package sending program to send the updated application installation package to the test terminal.

[0133] For ease of understanding, steps C1-C3 will be explained uniformly below:

[0134] Feedback information is used to characterize the information provided by testers after testing the target application installation package, based on the defects found in the target application installation package, such as missing files, incorrect naming, incorrect version number, etc.

[0135] Based on this, after receiving feedback from the testing end, the system can understand the defects discovered by testers during the testing of the target application installation package. It can then re-execute multiple packaging processes within the project packaging process based on these defects. Furthermore, during the re-execution of the packaging process, the packaging process causing the defect is modified to overcome it, resulting in an updated application installation package that has been corrected. Finally, the updated application installation package is sent to the testing end for testers to retest.

[0136] This solution allows for the regeneration of updated application installation packages that overcome the corresponding defects based on feedback from the testing end, eliminating the need for manual modification by users, thus saving manpower costs and improving deployment efficiency.

[0137] The technical solution provided in this application embodiment, in response to a packaging program command, obtains a preset automated packaging program; uses the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain the corresponding target application installation package; uses the automated packaging program to determine the installation package version number corresponding to the target application installation package; generates a unique installation package name based on the installation package version number, and names the target application installation package using the installation package name; runs an automatic installation package sending program, and uses the automatic installation package sending program to send the named target application installation package to the test end. Through this application, when the user issues a packaging program command, the system can execute the automated packaging program, which automatically executes the packaging-related processes one by one in sequence until the packaging is completed and sent to the test end. Thus, the deployment process is automatically pushed forward, saving a lot of manpower deployment time, improving work efficiency, and enhancing deployment efficiency. Furthermore, the solution of this application can generate a unique installation package name based on the version number to name the target installation package, so that users can quickly understand the installation package version by name.

[0138] Figure 2 This application provides an embodiment flowchart of a project packaging process that sequentially executes several packaging steps to obtain a corresponding target application installation package. Figure 2 The process shown is in Figure 1 Based on the illustrated process, the following steps are included:

[0139] Step 201: Execute the package page resources command and build a resource folder based on the configuration folder in the project, according to the instructions of the package page resources command.

[0140] The configuration folder is used to obtain packaging configuration settings information. This folder contains multiple page resources, which are the code files that generate the mobile application interface, such as the dist folder.

[0141] In this embodiment of the application, under the Cordova project directory, the system executes the command to package the page resources of the Vue project (i.e., the command to package page resources). At this time, according to the instructions of the command, the system will generate packaged resources (e.g., compressed resources such as html, js, css, and images) in the configuration folder of the Vue project, thereby obtaining the resource folder.

[0142] Step 202: Copy the resource folder to the package folder in the project specification directory to update the project directory page resource files.

[0143] The "package folder" refers to the www folder within the standard directory for packaging a Cordova project.

[0144] Project directory page resource files refer to the Cordova project directory page resource files.

[0145] In this embodiment of the application, the resource folders obtained in step 201 are copied to the www folder under the specification directory of the Cordova project package, thereby updating the Cordova project directory page resource files.

[0146] Step 203: Execute the resource move command and copy the updated page resource file to the internal folder corresponding to the project, as instructed by the resource move command.

[0147] The resource move command refers to the command in a Cordova project to copy page resources to the project's mobile platform project folder.

[0148] Internal folders refer to folders within Cordova.

[0149] After the operation in step 202, the Cordova project directory page resource files have been updated. At this time, execute the command to copy the page resources to the project mobile platform project folder. This command copies the project directory page resource files in the www folder to the folder inside Cordova, thereby updating the application page content of the subsequently packaged APK installation package.

[0150] Step 204: Execute the installation package packaging command. According to the instructions of the installation package packaging command, generate the initial installation package file based on the page resource files in the internal folder.

[0151] Step 205: Cut the initial installation package file to the project root directory, and perform an installation package signing operation on the initial installation package file to obtain the target application installation package.

[0152] For ease of understanding, steps 204 and 205 will be explained uniformly below:

[0153] In this embodiment, after step 203, the execution of the installation package packaging command is automatically initiated. Following the instructions of the installation package packaging command, a preliminary, potentially insecure, initial installation package file is generated based on the page resource files in the internal folder. Then, by cutting and pasting the initial installation package file into the Cordova project root directory and performing an installation package signing operation on the initial installation package file, a final, runnable, and secure target application installation package is obtained. This achieves automatic deployment.

[0154] Figure 3 A flowchart illustrating a project deployment method provided in this application embodiment is shown below. Figure 3 As shown, the following steps may be included:

[0155] 101: The user opens the cmd command line tool, cd to the Cordova project directory, and executes the shell command to package the apk installation package. The system obtains the user's command and begins to execute the Cordova mobile project packaging process in sequence, i.e., execute step 102.

[0156] 102: In the Cordova project directory, the system executes the command to package the page resources of the Vue project. At this time, packaged resources will be generated in the dist folder of the Vue project (or other configured folders, depending on the packaging configuration settings). These mainly include compressed resources such as HTML, JS, CSS, and images. At this time, you need to copy these resource folders to the corresponding folders in the Cordova project and execute step 103.

[0157] 103: At this point, the Cordova project directory page resource files have been updated. Execute the command to copy the page resources to the project's mobile platform project folder. Depending on the shell command parameters, decide whether to execute the version number modification (modify the two JSON files related to the Cordova project version number). Then execute the APK packaging command, which will eventually generate a preliminary APK installation package file with security vulnerabilities. Cut and paste it into the Cordova project root directory, and then perform the installation package signing operation to obtain the final runnable APK installation package file. Proceed to step 104.

[0158] 104: Generate an installation package name with a version number and a unique identifier to distinguish the latest generated APK installation package, and cache the installation package name. Rename the runnable APK installation package file obtained in step 103 to the installation package name, and then proceed to step 105.

[0159] 105: Perform the compressed package size check step. At this time, the size of the APK installation package will be calculated. If it exceeds the maximum file size limit of the platform sending the installation package, the APK installation package needs to be split and compressed into multiple compressed files. This step will finally obtain the final list of sent file names (the list contains one APK installation package file name or multiple compressed file names), then proceed to step 106;

[0160] 106: Finally, run the automatic installation package sending program to automatically send all files from the filename list obtained in 105 to the testers.

[0161] Through this application, when a user issues a packaging command, the system can execute an automated packaging program. The automated packaging program automatically executes the packaging-related processes one by one in sequence until the packaging is completed and sent to the testing end. This achieves automatic push-to-deployment, saving a lot of manpower and deployment time, improving work efficiency, and enhancing deployment efficiency. Furthermore, the solution of this application can generate a unique installation package name based on the version number, naming the target installation package. In this way, users can quickly identify the installation package version by name.

[0162] Figure 4 This is a block diagram illustrating an embodiment of a project deployment apparatus provided in this application. Figure 4 As shown, the device includes:

[0163] The program acquisition module 31 is used to acquire a preset automated packaging program in response to the packaging program command;

[0164] The process execution module 32 is used to use the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain the corresponding target application installation package.

[0165] Version number determination module 33 is used to determine the version number of the installation package corresponding to the target application installation package using the automated packaging program;

[0166] The naming module 34 is used to generate a unique installation package name based on the installation package version number, and to name the target application installation package using the installation package name;

[0167] The sending module 35 is used to run an automatic installation package sending program and use the automatic installation package sending program to send the named target application installation package to the test terminal.

[0168] In one possible implementation, the process execution module is specifically used for:

[0169] Execute the command to package page resources, and build a resource folder based on the configuration folder in the project according to the instructions of the command to package page resources;

[0170] Copy the resource folder to the package folder in the project specification directory to update the project directory page resource files;

[0171] Execute the resource move command, and copy the updated page resource file to the internal folder corresponding to the project according to the instructions of the resource move command;

[0172] Execute the installation package packaging command, and generate the initial installation package file according to the instructions of the installation package packaging command and the page resource files in the internal folder;

[0173] Cut the initial installation package file to the project root directory, and perform an installation package signing operation on the initial installation package file to obtain the target application installation package.

[0174] In one possible implementation, the version number determination module is specifically used for:

[0175] The automated packaging program is used to parse the packaging program commands to obtain version update parameters;

[0176] If the version update parameter is set to update version number, perform the operation to modify the version number, and determine the modified version number as the version number of the installation package corresponding to the target application installation package.

[0177] In one possible implementation, the version number determination module is further configured to: determine the current version number corresponding to the target application installation package as the installation package version number when the version update parameter is not to update the version number.

[0178] If the version update parameter is set to not update the version number, the current version number corresponding to the target application installation package is determined as the installation package version number.

[0179] In one possible implementation, the version number determination module is further configured to:

[0180] The automated packaging program is used to locate the target file in the configuration file of the project;

[0181] Obtain the target version number from the target file;

[0182] The version number of the installation package corresponding to the target application installation package is determined as the target version number.

[0183] In one possible implementation, the naming module is specifically used for:

[0184] The automated packaging program is used to generate a unique identifier corresponding to the target application installation package.

[0185] The installation package name is generated based on the installation package version number and the unique identifier.

[0186] In one possible implementation, the apparatus further includes a packet compression module for:

[0187] Obtain the file size of the target application installation package;

[0188] If the file size exceeds a preset threshold, the target application installation package is split and compressed to obtain multiple compressed files corresponding to the target application installation package;

[0189] The step of sending the named target application installation package to the test terminal using the automatic installation package sending program includes:

[0190] The automatic installation package sending program is used to send multiple compressed files corresponding to the target application installation package to the test terminal.

[0191] In one possible implementation, the method further includes an update module for:

[0192] Receive feedback information returned by the test terminal;

[0193] Based on the feedback information, the multiple packaging processes included in the project packaging process are re-executed to obtain the corresponding updated application installation package;

[0194] Run the automatic installation package sending program, and use the automatic installation package sending program to send the updated application installation package to the test terminal.

[0195] like Figure 5 As shown in the figure, this application provides a device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0196] Memory 113 is used to store computer programs;

[0197] In one embodiment of this application, when the processor 111 executes a program stored in the memory 113, it implements the project deployment method provided in any of the foregoing method embodiments, including:

[0198] In response to a packaging command, retrieve the preset automated packaging program;

[0199] Using the automated packaging program, several packaging processes included in the project packaging process are executed sequentially to obtain the corresponding target application installation package;

[0200] The automated packaging program is used to determine the version number of the installation package corresponding to the target application installation package;

[0201] A unique installation package name is generated based on the installation package version number, and the target application installation package is named using the installation package name;

[0202] Run the automatic installation package sending program, and use the automatic installation package sending program to send the named target application installation package to the test terminal.

[0203] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the project deployment method provided in any of the foregoing method embodiments.

[0204] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0205] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0206] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0207] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A project deployment method, characterized in that, The method, applied to a development environment for hybrid application framework projects and associated front-end projects, includes: In response to a packaging command, retrieve the preset automated packaging program; Using the automated packaging program, several packaging processes included in the project packaging process are executed sequentially to obtain the corresponding target application installation package; The automated packaging program is used to determine the version number of the installation package corresponding to the target application installation package; A unique installation package name is generated based on the installation package version number, and the target application installation package is named using the installation package name; Run the automatic installation package sending program, and use the automatic installation package sending program to send the named target application installation package to the test terminal; The process of running the automatic installation package sending program and using the automatic installation package sending program to send the named target application installation package to the test terminal further includes: Receive feedback information returned by the test terminal; Based on the feedback information, the multiple packaging processes included in the project packaging process are re-executed to obtain the corresponding updated application installation package; Run the automatic installation package sending program, and use the automatic installation package sending program to send the updated application installation package to the test terminal; The sequential execution of several packaging processes within the project packaging process to obtain the corresponding target application installation package includes: Execute the command to package page resources, and build a resource folder based on the configuration folder in the project according to the instructions of the command to package page resources; Copy the resource folder to the package folder in the project specification directory to update the project directory page resource files; Execute the resource move command, and copy the updated page resource file to the internal folder corresponding to the project according to the instructions of the resource move command; Execute the installation package packaging command, and generate the initial installation package file according to the instructions of the installation package packaging command and the page resource files in the internal folder; Cut the initial installation package file to the project root directory, and perform an installation package signing operation on the initial installation package file to obtain the target application installation package.

2. The method according to claim 1, characterized in that, The step of determining the version number of the installation package corresponding to the target application installation package using the automated packaging program includes: The automated packaging program is used to parse the packaging program commands to obtain version update parameters; If the version update parameter is set to update version number, perform the operation to modify the version number, and determine the modified version number as the version number of the installation package corresponding to the target application installation package.

3. The method according to claim 2, characterized in that, The method further includes: If the version update parameter is set to not update the version number, the current version number corresponding to the target application installation package is determined as the installation package version number.

4. The method according to claim 1, characterized in that, The step of determining the version number of the installation package corresponding to the target application installation package using the automated packaging program includes: The automated packaging program is used to locate the target file in the configuration file of the project; Obtain the target version number from the target file; The version number of the installation package corresponding to the target application installation package is determined as the target version number.

5. The method according to claim 1, characterized in that, The process of generating a unique installation package name based on the installation package version number includes: The automated packaging program is used to generate a unique identifier corresponding to the target application installation package. The installation package name is generated based on the installation package version number and the unique identifier.

6. The method according to claim 1, characterized in that, Before running the automatic installation package sending program, the following is also included: Obtain the file size of the target application installation package; If the file size exceeds a preset threshold, the target application installation package is split and compressed to obtain multiple compressed files corresponding to the target application installation package; The step of sending the named target application installation package to the test terminal using the automatic installation package sending program includes: The automatic installation package sending program is used to send multiple compressed files corresponding to the target application installation package to the test terminal.

7. A project deployment device, characterized in that, The device includes: The program acquisition module is used to obtain the preset automated packaging program in response to the packaging program command; The process execution module is used to use the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain the corresponding target application installation package; The version number determination module is used to determine the version number of the installation package corresponding to the target application installation package using the automated packaging program. The naming module is used to generate a unique installation package name based on the installation package version number, and to name the target application installation package using the installation package name; The sending module is used to run an automatic installation package sending program and use the automatic installation package sending program to send the named target application installation package to the test terminal; The device further includes an update module for: Receive feedback information returned by the test terminal; Based on the feedback information, the multiple packaging processes included in the project packaging process are re-executed to obtain the corresponding updated application installation package; Run the automatic installation package sending program, and use the automatic installation package sending program to send the updated application installation package to the test terminal; The process execution module is specifically used for: Execute the command to package page resources, and build a resource folder based on the configuration folder in the project according to the instructions of the command to package page resources; Copy the resource folder to the package folder in the project specification directory to update the project directory page resource files; Execute the resource move command, and copy the updated page resource file to the internal folder corresponding to the project according to the instructions of the resource move command; Execute the installation package packaging command, and generate the initial installation package file according to the instructions of the installation package packaging command and the page resource files in the internal folder; Cut the initial installation package file to the project root directory, and perform an installation package signing operation on the initial installation package file to obtain the target application installation package.

8. A device, characterized in that, include: A processor and a memory, the processor being configured to execute a project deployment program stored in the memory to implement the project deployment method of any one of claims 1-6.

9. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the project deployment method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Online manufacturing method and management system of software upgrade package

    CN114356363A

  • Application program development method and device, readable storage medium and electronic equipment

    CN118363648A