CN115543429A - Project environment building method, electronic equipment and computer readable storage medium - Google Patents

Project environment building method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN115543429A
CN115543429A CN202211353716.0A CN202211353716A CN115543429A CN 115543429 A CN115543429 A CN 115543429A CN 202211353716 A CN202211353716 A CN 202211353716A CN 115543429 A CN115543429 A CN 115543429A
Authority
CN
China
Prior art keywords
dependency
project
package
dependency package
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211353716.0A
Other languages
Chinese (zh)
Inventor
曾义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211353716.0A priority Critical patent/CN115543429A/en
Publication of CN115543429A publication Critical patent/CN115543429A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a project environment construction method, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: responding to an environment operation command of the project, and judging whether a target system version corresponding to the project exists or not; when the target system version is judged to exist, acquiring a dependency configuration file corresponding to the project to judge whether the project is provided with a dependency package; when the dependency package is judged to be installed, acquiring a dependency package management file corresponding to the project so as to judge whether the dependency package is updated according to the dependency configuration file and the dependency package management file; when the dependency packages are judged to be updated, judging whether the number of the updated dependency packages exceeds a preset threshold value; if the incremental dependency package does not exceed the preset threshold, downloading the incremental dependency package for installation; and after the increment dependence package is installed, responding to a starting command, and running the built project environment to start the project development service. According to the scheme, efficiency can be improved when the project environment is built.

Description

Project environment construction method, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of software development technologies, and in particular, to a project environment construction method, an electronic device, and a computer-readable storage medium.
Background
The development environment is indispensable in modern front-end development, project dependency package management is used as an important link for the development environment construction, and various management schemes are derived. At present, the market mainly manages the dependency packages of the local development environment by using schemes such as an NPM (Node Package Manager, node js Package management and distribution tool), a yarn resource management system and the like.
Taking NPM as an example, project dependency is installed, a development environment is built, a dependency package needs to be kept in each project, and each dependency package module is hierarchically dependent on different modules. Although the NPM devised a policy for version management (SemVer). There are some uncontrollable situations that remain, for example: if too many versions of the developed dependency package are updated, errors are prone to occur during updating, and therefore development efficiency is reduced. And when the dependent packet is updated, the changed content needs to be actively obtained, and an npm install command needs to be repeatedly executed to install the dependent packet during each updating, so that the operation difficulty of synchronous updating is increased, and the risk of synchronization failure is increased.
Disclosure of Invention
The application at least provides a project environment construction method, electronic equipment and a computer readable storage medium, which are used for solving the problem that the efficiency of relying on package updating is low in the related technology.
The application provides a project environment construction method in a first aspect, which comprises the following steps:
responding to an environment operation command of a project, and judging whether a target system version corresponding to the project exists or not;
when the target system version is judged to exist, acquiring a dependency configuration file corresponding to the project to judge whether the project is provided with a dependency package; the dependency configuration file comprises dependency package information of the project installation; the dependency package comprises configuration information of the project environment;
when the dependency package is judged to be installed, acquiring a dependency package management file corresponding to the project so as to judge whether the dependency package is updated according to the dependency configuration file and the dependency package management file; the dependency package management file comprises developed dependency package information;
when the dependency packages are judged to be updated, judging whether the number of the updated dependency packages exceeds a preset threshold value;
if the incremental dependency package does not exceed the preset threshold, downloading the incremental dependency package corresponding to the updated dependency package for installation;
and after the increment dependence package is installed, responding to a starting command, and running the built project environment to start the project development service.
When it is determined that the target system version does not exist, obtaining a dependency configuration file corresponding to the project to determine whether the project is provided with a dependency package, where the method includes:
if the dependency package is judged not to be installed, downloading a total amount of dependency packages corresponding to the dependency packages for installation;
and after the full dependency package is installed, responding to the starting command, and operating the built project environment to start the project development service.
After downloading the full amount of dependency packages corresponding to the dependency packages for installation, the method further includes:
if the total amount of the dependent packages exceeds a preset threshold value, downloading the total amount of the dependent packages of the items;
and after the full-amount dependency package is installed, responding to the starting command, and operating the built project environment to start the project development service.
Wherein, responding to an environment operation command of a project, judging whether a target system version corresponding to the project exists or not comprises:
responding to the environment running instruction, and inquiring system version information of the project;
and judging whether the system version information is the target system version corresponding to the project.
When the target system version is judged to exist, acquiring a dependency configuration file corresponding to the project to judge whether the project is provided with a dependency package, wherein the method comprises the following steps:
when the version of the target system is judged, inquiring a dependent configuration file corresponding to the project;
judging whether the dependency package is installed according to whether the corresponding dependency package information exists in the dependency configuration file;
when the dependency package is determined to be installed, acquiring a dependency package management file to determine whether the dependency package is updated according to the dependency configuration file and the dependency package management file, including:
when the dependent configuration file is inquired, acquiring a dependent package management file;
and judging whether the dependency package is updated or not according to a comparison result between the dependency package information of the dependency package management file and the dependency package information of the dependency configuration file.
Wherein, when the dependency package is determined to be installed, the method further comprises:
and if the comparison result is consistent, the built project environment is operated in response to the starting command without downloading the dependency package so as to start the project development service.
After the incremental dependency package is installed, in response to a running command, the built project environment is run to start a project development service, and before the method further comprises:
decompressing the increment dependence package, and building the project environment according to the decompressed codes;
judging whether the project environment is built;
and if the project environment is built, executing the starting command.
Wherein the method further comprises:
creating a dependent package project on a version management platform; the dependency package item includes a code built by the environment;
and the version management platform submits the codes to a version management server so that the version management server starts an automatic dependency package generation task according to the codes to obtain a plurality of dependency packages and corresponding dependency package management files.
A second aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory to implement the building method of the project environment in the first aspect.
A third aspect of the present application provides a non-volatile computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the method for building a project environment in the first aspect is implemented.
According to the scheme, the dependency package is installed on the premise that the correct target system version is installed, the dependency configuration file is compared with the dependency package management file to update the dependency package, and the dependency package is not required to be installed by repeatedly executing an npm install command; and the number of the updated dependency packages is controlled through the preset threshold value, so that errors in updating the dependency packages when a plurality of dependency packages are downloaded can be effectively prevented. The dependency package comprises configuration information of the project environment, environmental preparation in the early stage of the project is omitted, and project environment building efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
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 application.
FIG. 1 is a schematic flow chart of an embodiment of a construction method of an environment of the present application project;
FIG. 2 is a block diagram of an embodiment of an electronic device of the present application;
FIG. 3 is a block diagram of an embodiment of a non-volatile computer-readable storage medium of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The term "and/or" herein is merely an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of a, B, C, and may mean including any one or more elements selected from the group consisting of a, B, and C.
If the technical scheme of the application relates to personal information, a product applying the technical scheme of the application clearly informs personal information processing rules before processing the personal information, and obtains personal independent consent. If the technical scheme of the application relates to sensitive personal information, before the sensitive personal information is processed, a product applying the technical scheme of the application obtains individual consent and simultaneously meets the requirement of 'explicit consent'. For example, at a personal information collection device such as a camera, a clear and significant identifier is set to inform that the personal information collection range is entered, the personal information is collected, and if the person voluntarily enters the collection range, the person is regarded as agreeing to collect the personal information; or on the device for processing the personal information, under the condition of informing the personal information processing rule by using obvious identification/information, obtaining personal authorization by modes of popping window information or asking a person to upload personal information of the person by himself, and the like; the personal information processing rule may include information such as a personal information processor, a personal information processing purpose, a processing mode, and a type of personal information to be processed.
Taking NPM as an example, project dependency is installed, a development environment is built, a dependency package needs to be kept in each project, and each dependency package module is hierarchically dependent on different modules. Although the NPM devised a policy for version management (SemVer). There are still some uncontrollable situations, such as: most developed dependency packages use "pkg: ^1.0.0 'version is compatible with the subsequent version of the module, and ^ 1.0.0' value range (1.0.0 and less than 2.0.0); if the developed dependency package updates version 1.1.0 and the updated dependency package involves a destructive update. E.g., too many versions updated; potential risks exist in the subsequent development and use, development errors are caused, and the development efficiency is reduced.
When updating is carried out by relying on the package, the change content needs to be acquired actively. For example, when the dependent packet pkg is updated from 1.0.0 to 2.0.0, the dependent packet version of the item needs to be manually updated to pkg ^2.0.0 to be updated synchronously. Because each item using the dependency package needs to be manually updated synchronously, the operation difficulty of the synchronous update is increased, and the risk of synchronization failure is increased.
Referring to fig. 1, fig. 1 is a schematic flow chart of a project environment construction method according to an embodiment of the present application. Specifically, the following steps may be included:
step S11: and responding to an environment operation command of the project, and judging whether a target system version corresponding to the project exists or not.
In the embodiment, the project environment is built by executing the environment running command for the @ pa/runner tool, the built project environment is a project development environment, and the environment running command is npx @ pa/runner dev. When the development environment is entered for the first time, automatically detecting whether the development environment exists or not through an @ pa/runner tool, and if so, detecting: the target system version corresponding to the project, namely the node version is correct, a cli command line exists, and a development environment exists. If the development environment is detected to exist, executing a dev command; if the fact that the development environment does not exist is detected, the dependency package possibly cannot be installed, whether a target system version corresponding to project development exists is judged, the target system version is a node version, and if the node version is incorrect, the dependency package cannot be installed.
The @ pa/runner tool is a shortcut script command line tool, is used for dependent package downloading and project environment monitoring, does not need to be installed, is completely originally written, does not have dependence, and can be efficiently executed.
Step S12: when the target system version is judged to exist, acquiring a dependency configuration file corresponding to the project to judge whether the project is provided with a dependency package or not; the dependency configuration file comprises dependency package information for the project installation; the dependency package includes configuration information for the project environment.
In this embodiment, when it is checked that the target system version exists, whether the corresponding dependency package is installed on the target system version is determined, and whether a configuration file of the dependency package exists according to the directory of the project of the system corresponding to the target system version. If the dependency configuration file exists, the dependency package is installed; if the dependency configuration file does not exist, the dependency package is not installed, and the dependency package is installed for the first time. The dependency package includes configuration information for the project environment.
One of the judgment results of step S12 is: step S13: when the dependency package is judged to be installed, acquiring a dependency package management file corresponding to the project, and judging whether the dependency package is updated according to the dependency configuration file and the dependency package management file; the dependency package management file comprises developed dependency package information.
In this embodiment, when the dependency package is installed, whether the dependency package is updated is determined, and whether the version number of the dependency package is updated may be checked according to a comparison between the dependency configuration file in the directory of the item and the dependency management file in the tool for storing the dependency package, so as to determine whether the dependency package is updated. The dependency package comprises the dependency of the development environment and data related to the basic tool scaffold, and the development environment can be built according to the data in the dependency package.
In an exemplary embodiment, the second judgment result of step S12 is:
if the dependency package is judged not to be installed, downloading the full amount of dependency packages; and after the full-amount dependency package is installed, responding to the starting command, and operating the built project environment to start the project development service.
In this embodiment, when it is determined that the dependency package has not been downloaded, the full amount of dependency packages are downloaded, and the full amount of dependency packages may be understood as default dependency packages and default patch packages. And decompressing and installing after the full dependency package is downloaded, and then judging whether the full dependency package is installed. After the full dependency package is installed, whether the incremental dependency package is installed needs to be judged, which indicates that the development environment of the project is already built. And then, running the development environment based on the starting command to start the project development service. The starting command is a dev command, and the dev command in the downloaded dependency package is run to start the project development service.
One of the judgment results of step S13 is: step S14: and when the dependency packages are judged to be updated, judging whether the number of the updated dependency packages exceeds a preset threshold value.
In this embodiment, in order to cause a problem when the version of the value dependent packet is too many and synchronous update is performed, an upper limit of the update number of the dependent packet, that is, a preset threshold value is set. The preset threshold is set to 5.
In an exemplary embodiment, the second judgment result of step S13, the method further includes:
and if the comparison result is consistent, the built project environment is operated in response to the starting command without downloading the dependency package so as to start the project development service.
In this embodiment, when the system and the dependency package corresponding to the project development are inquired, it is described that the development environment corresponding to the project is installed, and updating and downloading are not required. The corresponding project environment of the project development can be operated through the starting command dev, and therefore the project development work is carried out.
One of the judgment results of step S14 is: step S15: and if the incremental dependency package does not exceed the preset threshold, downloading the incremental dependency package corresponding to the updated dependency package for installation.
In this embodiment, if the number of the dependency packages that need to be updated is within 5, all the incremental dependency packages are downloaded and updated. After the increment dependence package is downloaded, the increment dependence package is decompressed and installed, and the increment dependence package can delete and modify the original dependence package.
In an exemplary embodiment, the second judgment result of step S14 is:
if the total amount of the dependency packages exceeds a preset threshold value, downloading the total amount of the dependency packages of the items for installation; and after the full dependency package is installed, responding to the starting command, and operating the built project environment to start the project development service.
In this embodiment, when the number of the incremental update packages exceeds the preset threshold, the full-amount dependency package is downloaded to install the dependency package, and the full-amount dependency package can perform a new addition operation on the dependency package.
Step S16: and after the increment dependence package is installed, responding to a starting command, and running the built project environment to start the project development service.
In this embodiment, after the increment-dependent package is installed, it is necessary to determine whether the increment-dependent package is installed, which indicates that the development environment of the project has been built. And then the development environment is operated based on the starting command so as to start the project development service. The starting command is a dev command, and the dev command in the downloaded dependency package is operated to start the project development service.
In the embodiment, on the premise of installing a correct target system version, the dependent package is installed, the dependent package is updated by comparing the dependent configuration file with the dependent package management file, and the dependent package is not required to be installed by repeatedly executing an npm install command; when the update needs to be synchronized, the installation dependence package is automatically updated and downloaded through information comparison, so that the synchronous update without perception can be realized, and the time of the intervention development of a developer is greatly shortened; and the number of the updated dependency packages is controlled by the preset threshold, so that the error of updating the dependency packages caused by downloading a plurality of dependency packages can be effectively prevented. The dependency package comprises the configuration information of the project environment, so that the environmental preparation in the early stage of the project is omitted, and the efficiency of building the project environment is improved.
In an exemplary embodiment, step S11 includes:
responding to the environment running instruction, and inquiring system version information of the project; and judging whether the system version information is a target system version corresponding to the project.
In this embodiment, if the current system version is a system version required for project development, the dependent package is downloaded to build a project environment, and if not, the project environment is not built.
In an exemplary embodiment, the step S12 includes:
when the target system version is judged, inquiring a dependent configuration file corresponding to the project; and judging whether the dependency package is installed according to whether the corresponding dependency package information exists in the dependency configuration file.
Step S13 includes: when the dependent configuration file is inquired, acquiring a dependent package management file; and judging whether the dependency package is updated or not according to a comparison result between the dependency package information of the dependency package management file and the dependency package information of the dependency configuration file.
In this embodiment, the dependency configuration file stores dependency package information installed corresponding to the project, and queries whether the dependency configuration file has a dependency package downloaded therein. When the dependency package management file is a dependency package corresponding to the development project, the file for recording the developed dependency package is not necessarily installed after the development of the dependency package is completed. And comparing the dependency package information developed in the dependency package management file with the downloaded and installed dependency package information in the dependency configuration file. Specifically, the latest five versions of the dependency package are acquired from the dependency package management file and compared. The dependency package management file and the corresponding dependency package are stored in the gitlab server.
In an exemplary embodiment, before step S14, the method further comprises:
decompressing the increment dependence package, and building the project environment according to the decompressed code; judging whether the project environment is built; and if the project environment is built, executing the starting command.
In this embodiment, when the increment-dependent package is installed, the downloaded updated increment-dependent package is decompressed, and installation and operation are performed after decompression is completed, so as to build a project environment. When the increment dependence packet is decompressed, the operation of deleting the list is executed. Specifically, whether installation is completed is determined by comparing the MD5 list of the dependent package in the dependent package management file with the MD5 list in the dependent configuration file. MD5 (Message-Digest Algorithm, cryptographic hash function) may generate a 128-bit (16-byte) hash value (hash value) to ensure the integrity of the information transmission.
In an exemplary embodiment, the method further comprises:
creating a dependent package item on a version management platform; the dependency package item includes a code of the environment build; and the version management platform submits the codes to a version management server so that the version management server starts an automatic dependency package generation task according to the codes to obtain a plurality of dependency packages and corresponding dependency package management files.
The embodiment exemplarily describes the development management of the dependent package, sets the dependent package management item in advance, and quickly creates a dependent package item template through an "npm @ pa/own-app my-runner-packages-template" command. The dependent package project template comprises a script which triggers a Gitlab CI server to execute a corresponding pipeline task, and the script is generated by a version number and is related to the Gitlabci.yml, and the automatic dependent package generating task is the pipeline task. And managing, adding and installing corresponding dependencies in groups according to different project groups. And managing the management dependence through a git management warehouse, and generating a corresponding version number and tag by using a script in a dependence package project template, wherein the tag is a snapshot corresponding to the dependence package and is used for data rollback.
When the dependency package is updated, the updating content corresponding to the dependency package and the development code of the dependency package are pushed to the gitlab server, and the gitlab server automatically updates the dependency package according to the updating content. The updating content comprises bug modification, configuration upgrading, rule engine upgrading, global plug-in list updating and the like. The gitlab ci tool is a continuous integrated environment integrated in a gitlab server, and after the gitlab ci tool is configured, when a push code is developed and sent to the gitlab server, the configured gitlab ci tool is triggered, and trigger rules are preset. Finally, executing a pipeline task through a configured rule, generating a dependency package, and performing git diff comparison on the updated contents submitted twice recently to generate subsequent packages of the dependency packages with different versions, wherein the updated contents correspond to operations such as deleting a file list and the like.
The automatic dependency packet generation task is performed through a gitlab ci pipeline, and is generally completed one by one in a mode of serially connecting steps 1 to n. For example: and downloading git warehouse- > comparing branch- > generating an updating package and the like. And generating an update package and deleting a file list through twice submission of a git diff algorithm. The gitdiff algorithm is a content comparison algorithm, and can compare the contents between versions, find out the contents of addition and deletion, obtain an update dependency package, and submit twice as information comparison. And comparing the generated dependency packages through a git diff algorithm, and comparing the generated dependency packages with the content branches of the last time according to the content branches submitted at this time. And comparing the added, modified and deleted files. Delete files, add and modify files are recorded as incremental content. The last volume dependent package may include one of an incremental file, a list of deleted files, and a list of full-volume files MD 5.
According to the embodiment, the dependent packages are managed and maintained in a unified mode according to the git warehouse. When the development environment is used, a dependent packet is subjected to pipeline development through a gitlab ci tool, an automatic synchronous updating program is integrated by combining with an @ pa/runner tool through one key, and the npm install command is not required to be frequently executed to install dependence. The project dependency packages are managed through the git warehouse, the same dependency packages are constructed for projects of the same type, and the dependency packages do not need to be repeatedly developed. And the dependency of the project can be locked, the updated content of the dependency package is compared by means of the version management of the git warehouse, and the incremental updating of the dependency row level can be achieved. Therefore, when the dependency needs to be updated, the dependency can be updated quickly through the increment, and the time and the risk needed by manual synchronization in the past are greatly reduced.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Referring to fig. 2, fig. 2 is a schematic block diagram of an embodiment of an electronic device 20 according to the present application. The electronic device 20 comprises a memory 21 and a processor 22 coupled to each other, and the processor 22 is configured to execute program instructions stored in the memory 21 to implement the steps in the building method embodiment of any of the above project environments. In one particular implementation scenario, electronic device 20 may include, but is not limited to: a microcomputer, a server, and the electronic device 20 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.
In particular, the processor 22 is adapted to control itself and the memory 21 to implement the steps in the set-up method embodiment of any of the above project environments. The processor 22 may also be referred to as a CPU (Central Processing Unit). The processor 22 may be an integrated circuit chip having signal processing capabilities. The Processor 22 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 22 may be commonly implemented by an integrated circuit chip.
Referring to fig. 3, fig. 3 is a block diagram of a non-volatile computer readable storage medium 30 according to an embodiment of the present invention. The non-volatile computer readable storage medium 30 stores program instructions 301 executable by the processor, the program instructions 301 for implementing the steps in the method embodiments of building any of the project environments described above.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
The foregoing description of the various embodiments is intended to highlight different aspects of the various embodiments that are the same or similar, which can be referenced with one another and therefore are not repeated herein for brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (10)

1. A project environment construction method is characterized by comprising the following steps:
responding to an environment operation command of a project, and judging whether a target system version corresponding to the project exists or not;
when the target system version is judged to exist, acquiring a dependency configuration file corresponding to the project to judge whether the project is provided with a dependency package or not; the dependency configuration file comprises dependency package information for the project installation; the dependency package comprises configuration information of the project environment;
when the dependency package is judged to be installed, acquiring a dependency package management file corresponding to the project, and judging whether the dependency package is updated according to the dependency configuration file and the dependency package management file; the dependency package management file comprises developed dependency package information;
when the dependency packages are judged to be updated, judging whether the number of the updated dependency packages exceeds a preset threshold value;
if the incremental dependency package does not exceed the preset threshold, downloading the incremental dependency package corresponding to the updated dependency package for installation;
and after the increment dependence package is installed, responding to a starting command, and running the built project environment to start the project development service.
2. The method according to claim 1, wherein after obtaining the dependency configuration file corresponding to the item to determine whether the item has the dependency package installed when it is determined that the target system version does not exist, the method includes:
if the dependency package is judged not to be installed, downloading a total amount of dependency packages corresponding to the dependency packages for installation;
and after the full dependency package is installed, responding to the starting command, and operating the built project environment to start the project development service.
3. The method of claim 2, wherein after determining whether the updated number of dependent packets exceeds a preset threshold, the method further comprises:
if the number exceeds a preset threshold value, downloading the full-amount dependency packages of the items;
and after the full-amount dependency package is installed, responding to the starting command, and operating the built project environment to start the project development service.
4. The method of claim 1, wherein determining whether a target system version corresponding to a project exists in response to an environment run command for the project comprises:
responding to the environment running instruction, and inquiring system version information of the project;
and judging whether the system version information is the target system version corresponding to the project.
5. The method of claim 4, wherein when it is determined that the target system version exists, obtaining the dependency configuration file corresponding to the item to determine whether the item has the dependency package installed, includes:
when the version of the target system is judged, inquiring a dependent configuration file corresponding to the project;
judging whether the dependency package is installed according to whether the corresponding dependency package information exists in the dependency configuration file;
when the dependency package is determined to be installed, acquiring a dependency package management file to determine whether the dependency package is updated according to the dependency configuration file and the dependency package management file, including:
when the dependency configuration file is inquired, acquiring a dependency package management file;
and judging whether the dependency package is updated or not according to a comparison result between the dependency package information of the dependency package management file and the dependency package information of the dependency configuration file.
6. The method according to claim 5, wherein when it is determined that the dependent packet is installed, after determining whether the dependent packet has an update, the method further comprises:
and if the comparison result is consistent, the built project environment is operated in response to the starting command without downloading the dependency package so as to start the project development service.
7. The method of claim 1, wherein after installing the delta dependency package, prior to running the built project environment in response to a run command to launch a project development service, the method further comprises:
decompressing the increment dependence package, and building the project environment according to the decompressed code;
judging whether the project environment is built;
and if the project environment is built, executing the starting command.
8. The method of claim 1, further comprising:
creating a dependent package item on a version management platform; the dependency package item includes a code of the environment build;
and the version management platform submits the codes to a version management server so that the version management server starts an automatic dependency package generation task according to the codes to obtain a plurality of dependency packages and corresponding dependency package management files.
9. An electronic device comprising a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the method for building a project environment according to any one of claims 1 to 8.
10. A non-transitory computer-readable storage medium having stored thereon program instructions, wherein the program instructions, when executed by a processor, implement the method of building a project environment according to any one of claims 1 to 8.
CN202211353716.0A 2022-10-31 2022-10-31 Project environment building method, electronic equipment and computer readable storage medium Pending CN115543429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211353716.0A CN115543429A (en) 2022-10-31 2022-10-31 Project environment building method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211353716.0A CN115543429A (en) 2022-10-31 2022-10-31 Project environment building method, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115543429A true CN115543429A (en) 2022-12-30

Family

ID=84718795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211353716.0A Pending CN115543429A (en) 2022-10-31 2022-10-31 Project environment building method, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115543429A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116028108A (en) * 2023-03-31 2023-04-28 深圳复临科技有限公司 Method, device, equipment and storage medium for analyzing dependent package installation time

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116028108A (en) * 2023-03-31 2023-04-28 深圳复临科技有限公司 Method, device, equipment and storage medium for analyzing dependent package installation time

Similar Documents

Publication Publication Date Title
US10114630B2 (en) Management of software and operating system updates required for the process of creating a virtual machine facsimile of an existing physical or virtual machine
CN108196878B (en) Method and device for generating application program installation package, electronic equipment and storage medium
US9823915B1 (en) Software container format
CN109857423B (en) Program version updating method and device, server and readable storage medium
CN103530150A (en) Remote updating method for Linux operating system
CN110535776B (en) Gateway current limiting method, device, gateway, system and storage medium
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
CN112799688A (en) Method and device for installing software package in container application, computer equipment and medium
CN105045640A (en) Software upgrading method and device and intelligent equipment
CN111796853A (en) Firmware upgrading method, system, equipment and computer storage medium
CN111538523A (en) Differential upgrading method, device and storage medium
CN115543429A (en) Project environment building method, electronic equipment and computer readable storage medium
CN113961226B (en) Software development kit repairing method, terminal, server and equipment
CN113434180B (en) Data processing method and device for application, server and storage medium
CN112286543B (en) Application service deployment method and device
EP3260981B1 (en) Information processing apparatus, information processing system, and information processing method for updating firmware
CN112328284A (en) Application program upgrading method, system, equipment and storage medium
CN115454575B (en) jar packet conversion and automatic loading method, device, equipment and storage medium
CN115729590A (en) Service deployment method, device, equipment and computer readable storage medium
CN113791809B (en) Application exception handling method and device and computer readable storage medium
CN112685102B (en) Gateway plug-in hot loading method, device, equipment and medium
CN112947956B (en) Application software upgrading method
CN113467801A (en) BMC firmware application updating method, BMC, system and storage medium
CN110825406A (en) Software upgrading method and related equipment
CN112486511A (en) Method for generating operating system installation mirror image through web

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination