Project deployment method and device, electronic equipment and storage medium

Through automated packaging programs and automatic sending of installation package programs, the Cordova project deployment is automated, the problem of low manual deployment efficiency is solved, the deployment efficiency and work efficiency is improved, and version management is facilitated.

CN119781814AActive Publication Date: 2025-04-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411916203.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-08
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

The method of manually implementing project deployment in the prior art is inefficient, resulting in waste of labor time costs.

Method used

Provides a project deployment method, which uses an automated packaging program to automatically execute multiple packaging processes in the project packaging process, generates target application installation packages, and sends them to the test end by automatically sending the installation package program.

Benefits of technology

The automatic push-to-deployment process is realized, saving a lot of manpower deployment time, improving work efficiency and deployment efficiency, and generating a unique installation package name through the version number, which facilitates users to quickly understand the installation package version.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781814A_ABST
    Figure CN119781814A_ABST
Patent Text Reader

Abstract

The invention provides a project deployment method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a preset automatic packaging program in response to a packaging program command; sequentially executing a plurality of packaging processes included in a project packaging process by utilizing the automatic packaging program to obtain a corresponding target application installation package; determining an installation package version number corresponding to the target application installation package by utilizing the automatic packaging program; generating a unique installation package name based on the installation package version number, and naming the target application installation package by using the installation package name; and running an automatic installation package sending program, and sending the named target application installation package to a test end by using the automatic installation package sending program. Therefore, the process of automatically pushing to the deployment is realized, the working efficiency is improved, meanwhile, the deployment efficiency is improved, and a user can conveniently and quickly know the version of the installation package through the name.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Cordova is an open source mobile application framework that allows developers to develop 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 Cordova project deployment process, most developers manually package APK (Android application package) installation packages in an external network development environment. The process of packaging APK installation packages includes multiple processes, and each process requires the developer to manually promote it to perform the corresponding operation.

[0004] This method of manually implementing project deployment is inefficient and easily results in a waste of manpower and time costs. Summary of the invention

[0005] The present application provides a project deployment method, device, electronic device and storage medium to solve the problem that the method of manually implementing project deployment in the prior art is inefficient and easily causes waste of manpower and time costs.

[0006] In a first aspect, the present application provides a project deployment method, comprising:

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

[0008] Utilize the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain a corresponding target application installation package;

[0009] Determine the installation package version number corresponding to the target application installation package by using the automated packaging program;

[0010] 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;

[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 end.

[0012] In a possible implementation, the step of sequentially executing several packaging processes included in the project packaging process to obtain a corresponding target application installation package includes:

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

[0014] Copy the resource folder to the package folder of the project specification directory to update the project directory page resource file;

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

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

[0017] The initial installation package file is cut into the project root directory, and an installation package signing operation is performed on the initial installation package file to obtain the target application installation package.

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

[0019] Utilizing the automated packaging program to parse the packaging program command to obtain version update parameters;

[0020] In the case where the version update parameter is an updated version number, an operation of modifying the version number is performed, and the modified version number is determined as the installation package version number corresponding to the target application installation package.

[0021] In a possible implementation, the method further includes: when the version update parameter indicates 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 a possible implementation, the using the automated packaging program to determine the installation package version number corresponding to the target application installation package includes:

[0023] Using the automated packaging program to search for a target file in a configuration file in the project;

[0024] Obtaining a target version number in the target file;

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

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

[0027] Generate a unique identifier corresponding to the target application installation package using the automated packaging program;

[0028] Generate an installation package name according to the installation package version number and the unique identifier.

[0029] In a possible implementation manner, before running the automatic installation package sending program, the method further includes:

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

[0031] When the file size is greater than a preset threshold, performing a sub-package compression operation on the target application installation package to obtain multiple compressed files corresponding to the target application installation package;

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

[0033] The multiple compressed files corresponding to the target application installation package are sent to the test end using the automatic installation package sending program.

[0034] In a possible implementation manner, 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 end, the method further includes:

[0035] Receiving feedback information returned by the test end;

[0036] Re-execute multiple packaging processes included in the project packaging process according to the feedback information to obtain a 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 end.

[0038] In a second aspect, the present application provides a project deployment device, comprising:

[0039] A program acquisition module, used to obtain a preset automatic packaging program in response to a packaging program command;

[0040] A process execution module, used to use the automatic packaging program to sequentially execute several packaging processes included in the project packaging process to obtain a corresponding target application installation package;

[0041] A version number determination module, used to determine the installation package version number corresponding to the target application installation package by using the automated packaging program;

[0042] A naming module, used to 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;

[0043] The sending module is used to 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 end.

[0044] In a possible implementation, the process execution module is specifically used to:

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

[0046] Copy the resource folder to the package folder of the project specification directory to update the project directory page resource file;

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

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

[0049] The initial installation package file is cut into the project root directory, and an installation package signing operation is performed on the initial installation package file to obtain the target application installation package.

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

[0051] Utilizing the automated packaging program to parse the packaging program command to obtain version update parameters;

[0052] In the case where the version update parameter is an updated version number, an operation of modifying the version number is performed, and the modified version number is determined as the installation package version number corresponding to the target application installation package.

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

[0054] When the version update parameter indicates not to 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 a possible implementation, the version number determination module is further configured to:

[0056] Using the automated packaging program to search for a target file in a configuration file in the project;

[0057] Obtaining a target version number in the target file;

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

[0059] In a possible implementation, the naming module is specifically used to:

[0060] Generate a unique identifier corresponding to the target application installation package using the automated packaging program;

[0061] Generate an installation package name according to the installation package version number and the unique identifier.

[0062] In a possible implementation, the device further includes a packet compression module, configured to:

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

[0064] When the file size is greater than a preset threshold, performing a sub-package compression operation on the target application installation package to obtain multiple compressed files corresponding to the target application installation package;

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

[0066] The multiple compressed files corresponding to the target application installation package are sent to the test end using the automatic installation package sending program.

[0067] In a possible implementation manner, the method further includes an updating module, which is used to:

[0068] Receiving feedback information returned by the test end;

[0069] Re-execute multiple packaging processes included in the project packaging process according to the feedback information to obtain a 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 end.

[0071] In a third aspect, the present application provides a device, comprising: a processor and a memory, wherein the processor is used 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] In a fourth aspect, the present application provides a storage medium storing one or more programs, and the one or more programs can be executed by one or more processors to implement the project deployment method described in any one of the first aspects.

[0073] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, in response to the packaging program command, obtains a preset automatic packaging program; using the automatic packaging program, sequentially executes several packaging processes included in the project packaging process to obtain the corresponding target application installation package; using the automatic packaging 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 using the installation package name to name the target application installation package; running the automatic sending installation package program, and using the automatic sending installation package 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 automatic packaging program, and the automatic packaging program automatically executes the packaging processes related to packaging one by one in sequence until the packaging is completed and sent to the test end, thereby realizing the automatic push to deployment process, saving a lot of manpower deployment time, improving work efficiency, and at the same time improving deployment efficiency, and through this application, a unique installation package name can be generated based on the version number to name the target installation package, so that it is convenient for users to quickly understand the installation package version by name. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0075] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0076] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0077] Figure 1 A flowchart of an implementation of a project deployment method provided in an embodiment of the present application;

[0078] Figure 2 A flowchart of an embodiment of the present application for sequentially executing several packaging processes included in a project packaging process to obtain a corresponding target application installation package;

[0079] Figure 3An overall flow chart of a project deployment method provided in an embodiment of the present application;

[0080] Figure 4 A block diagram of an embodiment of a project deployment device provided in an embodiment of the present application;

[0081] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0083] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0084] In order to solve the technical problem that the manual project deployment method in the prior art is inefficient and easily wastes manpower and time costs, the present application provides a project deployment method, which can enable the system to execute an automated packaging program when a user issues a packaging program command, and the automated packaging program automatically executes the packaging processes related to packaging one by one in sequence until the packaging is completed and sent to the test end, thereby realizing automatic push to deployment process, saving a lot of manpower deployment time, improving work efficiency, and at the same time improving deployment efficiency.

[0085] Figure 1 A flowchart of an implementation of a project deployment method provided in an embodiment of the present application.

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

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

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

[0089] For ease of understanding, step 101 and step 102 are described in a unified manner as follows:

[0090] The packager command is used to instruct the system to package the application installation package, which is generally a shell command in the Cordova specification.

[0091] An automated packaging program is a program pre-written by the user to automatically execute multiple packaging processes included in the packaging process.

[0092] A project can be a front-end project for developing browser pages, that is, a vue project. The packaged product can be directly run in the browser to generate web pages and obtain page resources. The packaged product cannot be directly run on the mobile phone. It needs to be packaged into an installation package APK (Android application package) of the mobile APP through the Cordova project before it can be run on the mobile phone.

[0093] In actual applications, the user opens the CMD (Command Prompt) command line tool, quickly switches to the Cordova project directory, and executes the shell command for packaging the APK installation package (i.e., the packaging program command), for example, the npm script command "npm run build:prod" for building the project.

[0094] After the system obtains the packaging program command issued by the user, it starts to execute the packaging process of the Cordova mobile project in sequence according to the instructions of the packaging program command (including processes such as generating the initial apk installation package, signing the initial apk installation package, modifying the apk installation package name, etc.) to obtain the target application installation package, that is, the apk installation package that can be run on the mobile terminal.

[0095] Step 103: Determine the installation package version number corresponding to the target application installation package using the automated packaging program.

[0096] Installation package version number, used to mark the version of the target application installation package.

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

[0098] Step A1: parse the packaging program command using the automatic packaging program to obtain version update parameters;

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

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

[0101] For ease of understanding, steps A1 to A3 are described in a unified manner as follows:

[0102] In the application, when issuing a packager command, the user can enter a version update parameter to instruct the automated packager to perform the corresponding version update operation. For example, the shell command that needs to update the version number is: npm run build:prod to update the version number; the shell command that does not need to update the version number is: npm run build:prod not to update the version number.

[0103] Based on this, in the embodiment of the present application, the version update parameters can be obtained by parsing the package program command, 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 the application, the version update effect is generally obtained by modifying the Cordova project specifications (reflected in the version message when installing the APK), specifically: modify the two xml files related to the Cordova project version number, so that the installation package version number corresponding to the target application installation package generated subsequently is the modified version number; and when the version update parameter is not to update the version number, the operation of modifying the version number is not performed, and the installation package version number corresponding to the target application installation package generated subsequently is the current version number. Through this solution, users can modify the version number according to actual needs.

[0104] In actual applications, since the default rule for passing in version update parameters through the packaging program command is to add 1 to the minor version, for example, if the version number of the last packaged version is 1.1.1, the version number of this packaged version is 1.1.2, and the version number cannot be customized. Therefore, in another embodiment of the present application, in one embodiment, step 103 may also include the following steps:

[0105] Step B1, using the automatic packaging program to search for a target file in a configuration file in the project;

[0106] Step B2, obtaining the target version number in the target file;

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

[0108] For ease of understanding, steps B1 to B3 are described in a unified manner as follows:

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

[0110] Based on this, in an embodiment of the present application, the package.json file can be found in the configuration file in the vue project, and the latest version value set by the user can be obtained in 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, and the installation package version number corresponding to the target application installation package is set to the target version number.

[0111] Through this solution, users can set any numerical value as the target version number. In this way, the installation package version number corresponding to the target application installation package can be flexibly set according to user needs to achieve customization of the version number.

[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 the embodiment of the present application, step 104 may include the following steps:

[0114] The automatic packaging program is used to generate a unique identifier corresponding to the target application installation package, and the installation package name is generated according to the installation package version number and the unique identifier.

[0115] The above unique identifier is used to uniquely identify the target application installation package. In the application, the automated packaging program can use the timestamp to generate a unique identifier. For example, if the current timestamp is 1728702231840, then the unique identifier is 1728702231840. The timestamp corresponding to each millisecond is different, and accordingly, the unique identifier is also different.

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

[0117] Based on this, in the embodiment of the present application, the installation package name can be generated based on the installation package version number and the unique identifier, and the installation package name can be cached, and then the name of the target application installation package can be renamed to the installation package name. In this way, it is convenient for users to distinguish the latest generated target application installation package by the installation package name, and the version of the target application installation package can be understood by the installation package 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 end.

[0119] The automatic installation package sending program is a program pre-written by the user for automatically executing the sending of installation packages.

[0120] In the embodiment of the present application, after obtaining the target application installation package and naming it, the automatic installation package sending program can be run, and the target application installation package can be sent to the test end by using the automatic installation package sending program for the tester to test it. Thus, the project automation deployment is completed.

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

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

[0123] The preset threshold is used to represent the maximum file size limit of the platform for sending installation packages.

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

[0125] For example, the target application installation package is sent from the external network to the internal network through the G platform. The maximum limit of sending files on the G platform is 60M, and the file size of the target application installation package is 300M. You can use compression tools such as 7z compression to split the target application installation package into 6 compressed packages (i.e., compressed files), and the maximum size of each compressed package is 50M (the maximum does not exceed 60M).

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

[0127] Finally, the automatic installation package sending program will send multiple compressed files to the test end according to the file names in the list.

[0128] Through this solution, when the file size of the target application installation package exceeds the maximum file size limit of the platform sending the installation package, the target application installation package can be automatically sub-packaged and compressed to divide the target application installation package into multiple compressed files that meet the limit, thereby ensuring that the file can be smoothly sent to the test end.

[0129] In addition, in another embodiment of the present application, after step 105, the following steps may also be included:

[0130] Step C1, receiving feedback information returned by the test end;

[0131] Step C2: re-execute multiple packaging processes included in the project packaging process according to the feedback information to obtain a 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 end.

[0133] For ease of understanding, steps C1 to C3 are described in a unified manner as follows:

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

[0135] Based on this, after receiving the feedback information returned by the test end, the system can understand the defects found by the tester in the process of testing the target application installation package, and re-execute the multiple packaging processes included in the project packaging process based on the defects. When re-executing the packaging process, the packaging process that caused the defect is modified to overcome the defect, and an updated application installation package that overcomes the defect is obtained. Finally, the updated application installation package is sent to the test end for the tester to re-test.

[0136] Through this solution, an updated application installation package that overcomes the corresponding defects can be regenerated based on the feedback information returned by the test end, without the need for manual modification by the user, thereby saving labor costs and improving deployment efficiency.

[0137] The technical solution provided by the embodiment of the present application is to obtain a preset automatic packaging program in response to a packaging program command; use the automatic packaging program to sequentially execute several packaging processes included in the project packaging process to obtain the corresponding target application installation package; use the automatic packaging program to determine the installation package version number corresponding to the target application installation package; 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; 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 end. Through this application, when the user issues a packaging program command, the system can execute the automatic packaging program, and the automatic packaging program automatically executes the packaging processes related to packaging one by one in sequence until the packaging is completed and sent to the test end, thereby realizing the automatic push to the deployment process, saving a lot of manpower deployment time, improving work efficiency, and at the same time improving deployment efficiency. In addition, through the solution of this application, a unique installation package name can be generated 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 An embodiment of the present application provides a flowchart of an embodiment of the present application for sequentially executing several packaging processes included in a project packaging process to obtain a corresponding target application installation package. Figure 2 The process shown in Figure 1 Based on the process shown, the following steps are included:

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

[0140] Configuration folder, used to obtain packaging configuration setting information. This folder contains multiple page resources, that is, code files for generating mobile application interfaces, for example, the dist folder.

[0141] In an embodiment of the present application, under the Cordova project directory, the system executes a page resource command for packaging a vue project (i.e., a packaged page resource command). At this time, according to the instructions of the command, the system generates packaged resources (for example, compressed resources such as html, js, css, and pictures) in the configuration folder of the vue project, thereby obtaining a resource folder.

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

[0143] The package folder refers to the www folder under the standard directory of the Cordova project package.

[0144] Project directory page resource file refers to the Cordova project directory page resource file.

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

[0146] Step 203: execute a resource moving command, and copy the updated page resource file to an internal folder corresponding to the project according to the instruction of the resource moving command.

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

[0148] Internal folder refers to the folder inside Cordova.

[0149] Through the operation of step 202, the Cordova project directory page resource file has been updated. At this time, execute the command of copying page resources to the project mobile platform project folder. Through this command, the project directory page resource file in the www folder is copied 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, and generate an initial installation package file according to the instructions of the installation package packaging command and the page resource files in the internal folder.

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

[0152] For ease of understanding, step 204 and step 205 are described in a unified manner as follows:

[0153] In the embodiment of the present application, after step 203, the execution of the installation package packaging command is automatically promoted, and according to the instructions of the installation package packaging command, a preliminary initial installation package file with potential safety hazards is generated according to the page resource files in the internal folder, and then, by cutting the initial installation package file to the root directory of the Cordova project and performing the installation package signing operation on the initial installation package file, a final executable and safe target application installation package is obtained. Thus, the automatic push to deployment process is realized.

[0154] Figure 3 An overall flow chart of a project deployment method provided in an embodiment of the present application, such as Figure 3 As shown, the following steps may be included:

[0155] 101: The user opens the cmd command line tool, cds to the Cordova project directory, and executes the shell command for packaging the apk installation package. The system obtains the user command and starts to execute the Cordova mobile terminal project packaging process in sequence, that is, executes 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 (it may also be other configured folders, depending on the packaging configuration setting information), mainly including compressed resources such as html, js, css, and pictures. At this time, you need to copy these resource folders to the corresponding folder of the Cordova project and execute step 103;

[0157] 103: At this point, the Cordova project directory page resource file has been updated. Execute the command to copy the page resource to the project mobile platform project folder. Decide whether to change the version number (change the two json files related to the Cordova project version number) based on the shell command parameters. Then execute the apk packaging command. Finally, a preliminary apk installation package file with security risks will be generated. Cut it to the Cordova project root directory, and then execute the installation package signing operation to obtain the final executable apk installation package file. Execute 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, cache the installation package name, rename the executable apk installation package file obtained in step 103 to the installation package name, and execute step 105;

[0159] 105: Execute the compressed package size check step. At this time, the apk installation package size will be calculated. If it exceeds the maximum file size limit of the platform for sending the installation package, the apk installation package needs to be compressed and divided into multiple compressed files. This step will finally get the final sending file name list (the list contains one apk installation package file name or multiple compressed file names), and execute step 106;

[0160] 106: Finally, the program for automatically sending the installation package is run to automatically send all the files in the sending file name list obtained in 105 to the tester.

[0161] Through this application, when the user issues a packaging program command, the system can execute an automated packaging program, and the automated packaging program automatically executes the packaging processes related to packaging one by one in sequence until the packaging is completed and sent to the test end. In this way, the deployment process is automatically pushed to save a lot of manpower deployment time, improve work efficiency, and improve deployment efficiency. In addition, through the solution of this application, a unique installation package name can be generated based on the version number to name the target installation package. In this way, users can quickly understand the installation package version by name.

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

[0163] The program acquisition module 31 is used to obtain a preset automatic packaging program in response to a packaging program command;

[0164] A process execution module 32 is used to use the automatic packaging program to sequentially execute several packaging processes included in the project packaging process to obtain a corresponding target application installation package;

[0165] A version number determination module 33, used to determine the installation package version number corresponding to the target application installation package by using the automated packaging program;

[0166] A naming module 34, configured to 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;

[0167] The sending module 35 is used to 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 end.

[0168] In a possible implementation, the process execution module is specifically used to:

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

[0170] Copy the resource folder to the package folder of the project specification directory to update the project directory page resource file;

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

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

[0173] The initial installation package file is cut into the project root directory, and an installation package signing operation is performed on the initial installation package file to obtain the target application installation package.

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

[0175] Utilizing the automated packaging program to parse the packaging program command to obtain version update parameters;

[0176] In the case where the version update parameter is an updated version number, an operation of modifying the version number is performed, and the modified version number is determined as the installation package version number corresponding to the target application installation package.

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

[0178] When the version update parameter indicates not to 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 a possible implementation, the version number determination module is further configured to:

[0180] Using the automated packaging program to search for a target file in a configuration file in the project;

[0181] Obtaining a target version number in the target file;

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

[0183] In a possible implementation, the naming module is specifically used to:

[0184] Generate a unique identifier corresponding to the target application installation package using the automated packaging program;

[0185] Generate an installation package name according to the installation package version number and the unique identifier.

[0186] In a possible implementation, the device further includes a packet compression module, configured to:

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

[0188] When the file size is greater than a preset threshold, performing a sub-package compression operation on the target application installation package to obtain multiple compressed files corresponding to the target application installation package;

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

[0190] The multiple compressed files corresponding to the target application installation package are sent to the test end using the automatic installation package sending program.

[0191] In a possible implementation manner, the method further includes an updating module, which is used to:

[0192] Receiving feedback information returned by the test end;

[0193] Re-execute multiple packaging processes included in the project packaging process according to the feedback information to obtain a 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 end.

[0195] like Figure 5 As shown, an embodiment of the present 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, used for storing computer programs;

[0197] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the project deployment method provided by any of the above method embodiments, including:

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

[0199] Utilize the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain a corresponding target application installation package;

[0200] Determine the installation package version number corresponding to the target application installation package by using the automated packaging program;

[0201] 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;

[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 end.

[0203] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the project deployment method provided in any of the aforementioned method embodiments are implemented.

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

[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0206] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0207] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A project deployment method, characterized in that: The method comprises: In response to a packaging program command, obtaining a preset automated packaging program; Utilize the automated packaging program to sequentially execute several packaging processes included in the project packaging process to obtain a corresponding target application installation package; Determine the installation package version number corresponding to the target application installation package by using the automated packaging program; 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; 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 end.

2. The method according to claim 1, characterized in that: The project packaging process includes executing several packaging processes in sequence to obtain the corresponding target application installation package, including: Execute a package page resource command, and build a resource folder based on the configuration folder in the project according to the instruction of the package page resource command; Copy the resource folder to the package folder of the project specification directory to update the project directory page resource file; Execute a resource move command, and copy the updated page resource file to an internal folder corresponding to the project according to the instruction of the resource move command; Execute the installation package packaging command, and generate an initial installation package file according to the page resource file in the internal folder according to the instruction of the installation package packaging command; The initial installation package file is cut into the project root directory, and an installation package signing operation is performed on the initial installation package file to obtain the target application installation package.

3. The method according to claim 1, characterized in that The using the automated packaging program to determine the installation package version number corresponding to the target application installation package includes: Utilizing the automated packaging program to parse the packaging program command to obtain version update parameters; In the case where the version update parameter is an updated version number, an operation of modifying the version number is performed, and the modified version number is determined as the installation package version number corresponding to the target application installation package.

4. The method according to claim 3, characterized in that: The method further comprises: When the version update parameter indicates not to update the version number, the current version number corresponding to the target application installation package is determined as the installation package version number.

5. The method according to claim 1, characterized in that The using the automated packaging program to determine the installation package version number corresponding to the target application installation package includes: Using the automated packaging program to search for a target file in a configuration file in the project; Obtaining a target version number in the target file; The installation package version number corresponding to the target application installation package is determined as the target version number.

6. The method according to claim 1, characterized in that The generating a unique installation package name based on the installation package version number includes: Generate a unique identifier corresponding to the target application installation package using the automated packaging program; Generate an installation package name according to the installation package version number and the unique identifier.

7. The method according to claim 1, characterized in that Before running the automatic installation package sending program, the method further includes: Obtaining the file size of the target application installation package; When the file size is greater than a preset threshold, performing a sub-package compression operation on the target application installation package to obtain multiple compressed files corresponding to the target application installation package; The step of using the automatic installation package sending program to send the named target application installation package to the test end includes: The multiple compressed files corresponding to the target application installation package are sent to the test end using the automatic installation package sending program.

8. The method according to claim 1, characterized in that: After the automatic installation package sending program is run and the named target application installation package is sent to the test end by using the automatic installation package sending program, the method further includes: Receiving feedback information returned by the test end; Re-execute multiple packaging processes included in the project packaging process according to the feedback information to obtain a 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 end.

9. A project deployment device, characterized in that: The device comprises: A program acquisition module, used to obtain a preset automatic packaging program in response to a packaging program command; A process execution module, used to use the automatic packaging program to sequentially execute several packaging processes included in the project packaging process to obtain a corresponding target application installation package; A version number determination module, used to determine the installation package version number corresponding to the target application installation package by using the automated packaging program; A naming module, used to 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; The sending module is used to 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 end.

10. A device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a project deployment program stored in the memory to implement the project deployment method according to any one of claims 1 to 8.

11. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the project deployment method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Mobile terminal APP automatic packaging method and system, electronic equipment and storage medium

    CN113064630A

  • Online manufacturing method and management system of software upgrade package

    CN114356363A

  • Application installation package manufacturing and installing method, computing device and storage medium

    CN117707543A

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

    CN118363648A

  • Software integration method, device and equipment, storage medium and vehicle

    CN118963818A