CN114153480A - Code synchronization method, component publishing method, device thereof and computer storage medium - Google Patents
Code synchronization method, component publishing method, device thereof and computer storage medium Download PDFInfo
- Publication number
- CN114153480A CN114153480A CN202111482168.7A CN202111482168A CN114153480A CN 114153480 A CN114153480 A CN 114153480A CN 202111482168 A CN202111482168 A CN 202111482168A CN 114153480 A CN114153480 A CN 114153480A
- Authority
- CN
- China
- Prior art keywords
- code
- dependency
- modifying
- component
- modified
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000004590 computer program Methods 0.000 claims abstract description 9
- 230000001360 synchronised effect Effects 0.000 claims description 50
- 238000011161 development Methods 0.000 claims description 33
- 239000003999 initiator Substances 0.000 claims description 22
- 238000012545 processing Methods 0.000 claims description 21
- 230000004044 response Effects 0.000 claims description 14
- 230000001419 dependent effect Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000013507 mapping Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present disclosure provides a code synchronization method, a component release method, a device thereof, a computer storage medium, an electronic device, and a computer program product, and relates to the technical field of computers, wherein the code synchronization method comprises: modifying the dependency mode of the code to be modified into a path dependency mode, and generating an attribute description file for the code to be modified so as to edit the code to be modified to generate a target code needing synchronization; the Pod that includes the object code is executed to synchronize the object code into a project that manages the Pod.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for code synchronization and component publishing, a computer storage medium, an electronic device, and a computer program product.
Background
However, in the prior art, the synchronization of the codes completely depends on the manual development operation, so that the synchronization efficiency is low, the development progress of the application is slow, and the development cost is high.
Disclosure of Invention
The embodiments of the present disclosure provide a code synchronization method, a component publishing method, a device thereof, a computer storage medium, an electronic device, and a computer program product, so as to overcome or alleviate the above technical problems in the prior art.
The technical scheme adopted by the disclosure is as follows:
a method of code synchronization, comprising:
modifying a dependency mode of a code to be modified into a path dependency mode, and generating an attribute description file for the code to be modified so as to edit the code to be modified and generate a target code to be synchronized;
executing a Pod library including the object code to synchronize the object code into a project that manages the Pod library.
Optionally, the modifying the dependency pattern of the code to be modified into the path dependency pattern includes:
determining a component corresponding to the code to be modified;
and modifying the dependency mode of the component into a path dependency mode so as to modify the dependency mode of the code to be modified into the path dependency mode.
Optionally, modifying the dependency pattern of the component to a path dependency pattern by:
obtaining declaration data of the component;
and modifying the declaration data to modify the dependency mode of the component into a path dependency mode.
Optionally, the modifying the declaration data to modify the dependency pattern of the component into a path dependency pattern includes:
modifying the declaration data by modifying the regular matching of the dependency pattern so that the dependency pattern of the component is modified to a path dependency pattern.
Optionally, the generating an attribute description file for the code to be modified includes:
and generating an attribute description file aiming at the code to be modified by modifying the component configuration file of the code to be modified.
Optionally, the modifying the component configuration file of the code to be modified to generate an attribute description file for the code to be modified includes:
and generating an attribute description file for the code to be modified by modifying the component basic description data of the code to be modified and the record data of the dependency mode.
Optionally, the code synchronization method further includes: in response to receiving a synchronization request for the target code,
uploading the target code to a specified directory;
synchronizing the target code from the specified directory to an initiator of the synchronization request.
Optionally, the code synchronization method further includes: in response to receiving a synchronization request for the target code,
in the case that the target code is determined to be synchronized into the project, the operation of uploading the target code to a specified directory and synchronizing the target code from the specified directory to the initiator of the synchronization request is executed; and/or
And under the condition that the target code is determined not to be synchronized in the project, firstly informing a developer of the target code to synchronize the target code in the project, then uploading the target code to a specified directory, and synchronizing the target code from the specified directory to an initiator of the synchronization request.
Optionally, the code synchronization method further includes: in the event that it is determined that the object code has been synchronized into the project, first notifying a developer of the object code to confirm whether there are more updated versions of the object code that have not been synchronized into the project, wherein,
reminding the developer to update the version of the target code under the condition that the developer confirms that the target code still has an updated version which is not synchronized into the project, and after the developer synchronizes the updated version of the target code into the project, uploading the target code to a specified directory and synchronizing the target code from the specified directory to the initiator of the synchronization request; and/or
And under the condition that the developer confirms that no updated version of the target code needs to be synchronized into the project, directly uploading the target code to a specified directory, and synchronizing the target code from the specified directory to the initiator of the synchronization request.
Optionally, the code synchronization method further includes: in response to receiving a synchronization request for the target code,
and under the condition that the initiator of the synchronous request is determined to be the developer of the target code and the target code is determined not to be synchronized into the project from the first development end of the developer, generating and sending a prompt for uploading the code to the developer.
Optionally, the code synchronization method further includes:
in a case where the object code has been uploaded to the project based on the prompt, performing an operation of uploading the object code to a designated directory and synchronizing the object code from the designated directory to a second developer of the developer.
A component publishing method, comprising:
determining object code that has been synchronized or can be synchronized into a project that manages Pod libraries;
and modifying the dependency mode of the target code into a version dependency mode, and modifying the attribute description file corresponding to the target code so as to release the component corresponding to the target code to the corresponding server.
Optionally, the modifying the dependency pattern of the target code into a version dependency pattern includes:
determining a component corresponding to the object code;
and modifying the dependency mode of the target code into a version dependency mode by modifying the dependency mode of the component into the version dependency mode.
Optionally, modifying the dependency pattern of the component to a version dependency pattern by:
obtaining declaration data of the component;
and modifying the declaration data to modify the dependency mode of the component into a version dependency mode.
Optionally, the modifying the declaration data to modify the dependency pattern of the component into a version dependency pattern includes:
modifying the declaration data by modifying the regular matching of the dependency pattern so that the dependency pattern of the component is modified to a version dependency pattern.
Optionally, the modifying the dependency mode of the object code into a version dependency mode and modifying the attribute description file corresponding to the object code to issue the component corresponding to the object code to the corresponding server includes:
and issuing the component corresponding to the object code to the corresponding server by the project based on the version dependency mode and the modified attribute description file.
A code synchronization apparatus, comprising:
the first processing unit is used for modifying the dependency mode of the code to be modified into a path dependency mode and generating an attribute description file aiming at the code to be modified so as to edit the code to be modified and generate a target code needing synchronization;
and the second processing unit is used for executing the Pod library comprising the target code so as to synchronize the target code into a project for managing the Pod library.
A component dispensing apparatus, comprising:
a third processing unit for determining object code that has been synchronized or can be synchronized into a project that manages Pod libraries;
and the fourth processing unit is used for modifying the dependency mode of the target code into a version dependency mode and modifying the attribute description file corresponding to the target code so as to release the component corresponding to the target code to the corresponding server.
A computer storage medium having stored thereon a computer-executable program that is executed to implement a method according to any one of the embodiments of the present disclosure.
An electronic device comprising a memory for storing thereon a computer-executable program and a processor for executing the computer-executable program to implement a method according to any of the embodiments of the present disclosure.
A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of the embodiments of the present disclosure.
According to the method and the device for achieving the object code synchronization, the dependency mode of the code to be modified is modified into the path dependency mode, the attribute description file for the code to be modified is generated, the code to be modified is edited to generate the object code needing synchronization, the Pod including the object code is executed, the object code is synchronized into the project for managing the Pod, all developers can automatically synchronize the software code developed by the developers to the same sharing position (namely, the project for managing the Pod) in the multi-person collaborative development project, and the developers can obtain the object code synchronized by the developers or others from the project for managing the Pod, so that the code synchronization efficiency can be improved, meanwhile, the team cooperation efficiency can be improved, and the development cost is saved.
According to the method and the device for releasing the target code, the dependency mode of the target code is modified into the version dependency mode, the attribute description file corresponding to the target code is modified, the component corresponding to the target code is released to the corresponding server side, manual operation is not needed in the whole process, therefore, the releasing efficiency of the component can be improved, the progress of application program development is accelerated, and the development cost is reduced.
Drawings
Fig. 1 schematically illustrates an application scenario diagram of an embodiment of the present disclosure;
fig. 2 schematically shows an application scenario diagram of another embodiment of the present disclosure;
FIG. 3A is a schematic flow chart diagram illustrating a code synchronization method according to an embodiment of the disclosure;
fig. 3B schematically shows a flowchart of step S301 according to an embodiment of the present disclosure;
fig. 3C schematically shows a flowchart of step S321 according to an embodiment of the disclosure;
FIG. 4A schematically illustrates a flow diagram of a component publishing method of an embodiment of the disclosure;
fig. 4B schematically shows a flowchart of step S402 according to an embodiment of the disclosure;
fig. 4C schematically shows a flowchart of step S422 according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a schematic diagram of a code synchronization apparatus of an embodiment of the present disclosure;
FIG. 6 schematically illustrates a schematic diagram of a component publishing apparatus of an embodiment of the present disclosure;
fig. 7 schematically shows a schematic view of an electronic device of an embodiment of the disclosure.
Detailed Description
To make the technical problems, technical solutions and advantages to be solved by the present disclosure clearer, the following detailed description is made with reference to the accompanying drawings and specific embodiments.
In the following embodiments of the present disclosure, by way of example, it is considered that, when an application program is developed, since multiple functions to be implemented by the application program are involved, for this reason, for the development of each function, multiple functional components exist by dividing according to components, that is, the development of one functional component aims to implement at least one function, and this development mode is also referred to as componentization development in the industry. Therefore, in the development process of the application program, a componentized management tool is introduced, for example, for the development of the application program based on an IOS (Internet Operating System) System, a CocoaPods tool is generally used for management. When componentized development is performed based on a CocoaPods tool, a Pod library is allocated to perform independent writing of related codes for development of each functional component, the Pod libraries of all the components are managed under one project, and after the corresponding codes of each component are completed, the corresponding Pod libraries can be run to synchronize the project, so that all developers responsible for development of different components of the same application program can see the product, and when the product is about to be online, the product is combined together for testing (or also called combined test).
When the requirement of the application program changes, the linkage change of the Pod libraries occurs, or when switching is performed among a plurality of Pod libraries, the synchronization problem of the codes corresponding to all the components is involved.
In one implementation scheme, the synchronization of the codes completely depends on the manual operation of a developer, so that the efficiency of code synchronization is low, the development progress of the application program is slow, and the development cost is high.
Based on the above specific application scenarios, the following exemplary description is made for the embodiments of the present disclosure.
Fig. 1 schematically shows an application scenario diagram of an embodiment of the present disclosure. As shown in fig. 1, the application scenario is directed to a code synchronization system, which includes an electronic device 101 and a server 102. The server 102 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like. The electronic device 101 may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The electronic device 101 and the server 102 may be directly or indirectly connected through a wireless communication manner (e.g., a network), and the disclosure is not limited thereto.
For this reason, in the embodiment of the present disclosure, by setting a synchronization apparatus for a code in the electronic device 101, the following code synchronization method may be performed by the apparatus: modifying a dependency mode of a code to be modified into a path dependency mode, and generating an attribute description file for the code to be modified so as to edit the code to be modified and generate a target code to be synchronized; executing a Pod library including the object code to synchronize the object code into a project that manages the Pod library.
And/or the electronic device 101 may further perform the following method: determining object code that has been synchronized or can be synchronized into a project that manages Pod libraries; and modifying the dependency mode of the target code into a version dependency mode, and modifying the attribute description file corresponding to the target code so as to release the component corresponding to the target code to the corresponding server.
In the embodiment of the disclosure, in a software code development stage, a dependency mode of a code to be modified is modified into a path dependency mode, an attribute description file for the code to be modified is generated, the code to be modified is edited to generate a target code to be synchronized, a Pod including the target code is executed, and the target code is synchronized in a project of managing the Pod, so that in a multi-user collaborative development project, all developers can automatically synchronize software codes developed by themselves to the same shared position (i.e., in the project of managing the Pod), and further, the developers can obtain target codes synchronized by themselves or others from the project of managing the Pod, thereby improving code synchronization efficiency, improving team cooperation efficiency, and saving development cost.
According to the embodiment of the disclosure, in the component release stage, the target code synchronized or synchronizable to the project of the management Pod can be determined, the dependency mode of the target code is modified into the version dependency mode, and the attribute description file corresponding to the target code is modified so as to release the component corresponding to the target code to the corresponding server, and no manual operation is required in the whole process, so that the release efficiency of the component can be improved, the progress of application program development is accelerated, and the development cost is reduced.
Fig. 2 schematically shows an application scenario diagram of another embodiment of the present disclosure. As shown in fig. 2, in this system, an example of development of an application based on the IOS system is described, for this reason, each electronic device 101 that performs code writing is installed with a coco pods tool that is used to implement componentized management, for example, one functional component is used to provide code that implements one function of the application, and for one functional component, if only one electronic device participates in development, one Pod library is provided on the electronic device, so that, due to a plurality of functional components, there are a plurality of Pod libraries that are managed under one project.
Of course, here, only the IOS-based system is taken as an example for description, and the details are similar for the development of the application based on the ANDROID system, and are not described again.
Fig. 3A schematically illustrates a flowchart of a code synchronization method according to an embodiment of the present disclosure. As shown in fig. 3A, it includes:
s301, modifying the dependency mode of the code to be modified into a path dependency mode, and generating an attribute description file for the code to be modified so as to edit the code to be modified and generate a target code which needs to be synchronized.
Optionally, fig. 3B schematically shows a flowchart of step S301 according to an embodiment of the disclosure. As shown in fig. 3B, modifying the dependency pattern of the code to be modified into the path dependency pattern in step S301 includes:
s311, determining a component corresponding to the code to be modified;
s321, modifying the dependency mode of the component into a path dependency mode, so that the dependency mode of the code to be modified is modified into the path dependency mode.
Specifically, if the application is applied to a scenario of the IOS system, in the step 311, the component for managing the code to be modified may be determined by the Pod library (e.g., Podfile).
It should be appreciated that once the dependency pattern of a component is modified to a path dependency pattern, the component is characterized as currently in a development state. Once the dependency model of a component is modified to a version dependency model, the component is characterized as being currently in a published state.
Fig. 3C schematically shows a flowchart of step S321 according to an embodiment of the disclosure. As shown in fig. 3C, in step S321, the dependent mode of the component is modified into the path dependent mode by:
s3211, obtaining declaration data of the component;
s3212, modifying the declaration data to modify the dependency mode of the component into a path dependency mode.
Specifically, the dependency pattern of the component is recorded in the declaration data, and therefore, by modifying the recorded dependency pattern, modification of the dependency pattern of the component can be achieved.
For IOS system based application development, the path dependent mode is also called path dependent mode.
Further, in this embodiment or other embodiments, in step S3212, modifying the declaration data to modify the dependency pattern of the component to a path dependency pattern includes: modifying the declaration data by modifying the regular matching of the dependency pattern so that the dependency pattern of the component is modified to a path dependency pattern.
Because the types of the dependent modes are relatively limited in the componentization development process, the modification of the statement data can be effectively realized through a simple mode of regular matching, and the purpose of modifying the dependent modes can be further quickly achieved. For example, in a specific application scenario, the step of modifying the dependent pattern into the path dependent pattern is implemented by triggering a regular matching of the modified dependent pattern through an instruction for modifying the dependent pattern, such as: the instruction for modifying the dependent mode is Pod change Pod-path, wherein Pod is a Pod library name corresponding to the component, and since the Pod library and the component are in one-to-one correspondence, the component to be modified can be determined by the Pod library name, and the step of modifying the path dependent mode is triggered by the instruction.
In an application scenario, the dependency mode of the component is default to version dependency (i.e. the formally released component version), and since the dependency mode is the version dependency mode, real-time synchronization of the target code cannot be achieved, the version dependency mode is modified to the path dependency mode in step S301.
Optionally, in this embodiment or other embodiments, in step S301, the generating an attribute description file for the code to be modified specifically includes: and generating an attribute description file aiming at the code to be modified by modifying the component configuration file of the code to be modified.
Further, the generating an attribute description file for the code to be modified by modifying the component configuration file of the code to be modified specifically includes: and generating an attribute description file for the code to be modified by modifying the component basic description data of the code to be modified and the record data of the dependency mode.
The basic description data of the component comprises the version number of the component and the address of the corresponding code of the component, and the mapping relation between the path-dependent mode and the component is recorded in the recording data of the dependent mode, so that the modification of the version number and the address modification of the code are realized by modifying the basic description data, and the mapping relation between the component and the path-dependent mode is added to the recording data of the dependent mode by modifying the recording data of the dependent mode.
Illustratively, in a scenario of application development based on the IOS system, the component configuration file includes, for example, podsource.plist and SourchArray, podsource.plist is modified to modify component basic description data of the code to be modified, SourchArray is modified to modify the dependency pattern record data to add the mapping relationship between the component and the path dependency pattern to the dependency pattern record data, and the attribute description file of the code to be modified includes modified podsource.plist and SourchArray, so that the name of the Pod library can be matched based on podsource.plist, and then the source confirms that the dependency pattern is path dependency, thereby ensuring downloading of the Pod library for editing during development.
S302, executing a Pod library including the object code to synchronize the object code to a project managing the Pod library.
In this embodiment, for example, an install Pod instruction may be executed to execute a Pod library including the target code, so as to synchronize the target code to a project that manages the Pod library.
Further, in some embodiments of the present disclosure, the code synchronization method may further include: in response to receiving a synchronization request for the target code, uploading the target code under a specified directory; synchronizing the target code from the specified directory to an initiator of the synchronization request.
Alternatively, in other embodiments of the present disclosure, the code method may further specifically include: in response to receiving a synchronization request for the object code, in the event that it is determined that the object code has been synchronized into the project, performing an operation of uploading the object code under a specified directory and synchronizing the object code from the specified directory to an initiator of the synchronization request.
And/or, in other embodiments of the present disclosure, the code method may further specifically include: in response to receiving a synchronization request for the object code, in the case that it is determined that the object code is not synchronized into the project, a developer of the object code is notified to synchronize the object code into the project, and then an operation of uploading the object code to a designated directory and synchronizing the object code from the designated directory to an initiator of the synchronization request is performed.
Alternatively, in some embodiments of the present disclosure, the code synchronization method further includes: under the condition that the object code is determined to be synchronized into the project, firstly, a developer of the object code is informed to confirm whether an updated version of the object code is not synchronized into the project, wherein under the condition that the developer confirms that the updated version of the object code is not synchronized into the project, the developer is reminded to update the version of the object code, and after the developer synchronizes the updated version of the object code into the project, the developer uploads the object code to a specified directory and synchronizes the object code from the specified directory to an initiator of the synchronization request; and/or directly executing the operation of uploading the target code to a specified directory and synchronizing the target code to the initiator of the synchronization request from the specified directory under the condition that the developer confirms that no updated version of the target code needs to be synchronized to the project.
Alternatively, in some embodiments of the present disclosure, the code synchronization method further includes: in response to receiving a synchronization request for the target code, generating and sending a prompt to upload code to the developer if it is determined that an initiator of the synchronization request is also the developer of the target code and it is determined that the target code has not been locally synchronized into the project from a first developer of the developer.
Further, in other embodiments of the present disclosure, the code synchronization method may further include: in a case where the object code has been uploaded to the project based on the prompt, performing an operation of uploading the object code to a designated directory and synchronizing the object code from the designated directory to a second developer of the developer. This operation may be performed after generating and sending a prompt to the developer to upload code.
Here, it should be noted that the above-mentioned execution sequence based on the relevant steps in response to receiving the synchronization request for the target code can be flexibly set according to the requirements of the application scenario without departing from the concept of the present disclosure.
Fig. 4A schematically illustrates a flowchart of a component publishing method according to an embodiment of the present disclosure. As shown in fig. 4A, the component publishing method may include:
s401, determining target codes which are synchronized or can be synchronized to projects of a management Pod;
s402, modifying the dependency mode of the target code into a version dependency mode, and modifying the attribute description file corresponding to the target code so as to release the component corresponding to the target code to a server.
Optionally, fig. 4B schematically shows a flowchart of step S402 according to an embodiment of the disclosure. As shown in fig. 4B, the modifying the dependency pattern of the target code into a version dependency pattern includes:
s412, determining a component corresponding to the target code;
s422, modifying the dependency mode of the target code into a version dependency mode by modifying the dependency mode of the component into the version dependency mode.
Optionally, fig. 4C schematically shows a flowchart of step S422 according to an embodiment of the disclosure. As shown in fig. 4C, in the step S422, the dependency pattern of the component is modified into the version dependency pattern by:
s4221, acquiring declaration data of the component;
s4222, modifying the declaration data to modify the dependency mode of the component into a version dependency mode.
Optionally, in this embodiment, the modifying the declaration data to modify the dependency mode of the component into a version dependency mode includes: modifying the declaration data by modifying the regular matching of the dependency pattern so that the dependency pattern of the component is modified to a version dependency pattern.
In this embodiment, the steps S4221 and S4222 are performed similarly to the steps S3111 and S3112, except that the steps S3111 and S3112 modify the dependency mode into path dependency, and the steps S4221 and S4222 consider that when a code is subsequently issued to the server, the code is issued on a component-by-component basis, that is, all codes corresponding to one component are issued until the code is issued, and in order to support such a requirement, the dependency mode is modified into version dependency through the steps S4221 and S4222.
Illustratively, since the dependency pattern is modified for version dependency, the mapping relationship between the component and the path dependency pattern may be removed from the sourchray, and at the same time, the podsource.
Exemplarily, in this embodiment, the modifying the dependency mode of the object code into a version dependency mode and modifying the attribute description file corresponding to the object code to synchronize the component corresponding to the object code to the server includes: and issuing the component corresponding to the object code to the corresponding server by the project based on the version dependency mode and the modified attribute description file.
Fig. 5 schematically shows a schematic diagram of a code synchronization apparatus according to an embodiment of the present disclosure. As shown in fig. 5, the code synchronization apparatus 500 includes:
a first processing unit 501, configured to modify a dependency mode of a code to be modified into a path dependency mode, and generate an attribute description file for the code to be modified, so as to edit the code to be modified and generate a target code that needs to be synchronized;
a second processing unit 502, configured to execute a Pod library including the object code, so as to synchronize the object code into a project that manages the Pod library.
Optionally, the first processing unit 501 is specifically configured to determine a component corresponding to the code to be modified; and modifying the dependency mode of the component into a path dependency mode so as to modify the dependency mode of the code to be modified into the path dependency mode.
Optionally, the first processing unit 501 is specifically configured to modify the dependency mode of the component into a path dependency mode by: obtaining declaration data of the component; and modifying the declaration data to modify the dependency mode of the component into a path dependency mode.
Optionally, the first processing unit 501 is specifically configured to modify the declaration data by modifying a regular matching of a dependency pattern, so that the dependency pattern of the component is modified into a path dependency pattern.
Optionally, the first processing unit 501 is specifically configured to modify the component configuration file of the code to be modified, so as to generate an attribute description file for the code to be modified.
Optionally, the first processing unit 501 is specifically configured to modify the component basic description data of the code to be modified and the record data of the dependency pattern, so as to generate an attribute description file for the code to be modified.
Optionally, the code synchronization apparatus may further include a code uploading unit, configured to upload the object code to a specified directory in response to receiving a synchronization request for the object code; and synchronizing the target code from the specified directory to an initiator of the synchronization request.
Or, optionally, the code synchronization apparatus may further include a code uploading unit, configured to, in response to receiving a synchronization request for the target code, in a case where it is determined that the target code has been synchronized into the project, perform an operation of uploading the target code under a specified directory and synchronizing the target code from the specified directory to an initiator of the synchronization request; and/or under the condition that the object code is determined not to be synchronized into the project, firstly informing a developer of the object code to synchronize the object code into the project, then uploading the object code to a specified directory, and synchronizing the object code from the specified directory to an initiator of the synchronization request.
Or, optionally, the code synchronization apparatus may further include a code uploading unit, configured to, in response to receiving a synchronization request for the target code, generate and send a prompt for uploading code to the developer if it is determined that an initiator of the synchronization request is also a developer of the target code and it is determined that the target code has not been locally synchronized into the project from a first development end of the developer.
Optionally, the code uploading unit is further configured to, in a case where the object code has been uploaded to the project based on the prompt, perform an operation of uploading the object code to a specified directory and synchronizing the object code from the specified directory to a second development end of the developer.
Fig. 6 schematically shows a schematic diagram of a component issuing apparatus of an embodiment of the present disclosure. As shown in fig. 6, the code synchronization apparatus 600 includes:
a third processing unit 601, configured to determine a target code that can be synchronized in a management Pod project;
a fourth processing unit 602, configured to modify the dependency mode of the object code into a version dependency mode, and modify the attribute description file corresponding to the object code, so as to synchronize a component corresponding to the object code to a corresponding server.
Optionally, the third processing unit 601 is specifically configured to determine a component corresponding to the object code; and modifying the dependency mode of the target code into a version dependency mode by modifying the dependency mode of the component into the version dependency mode.
Optionally, the third processing unit 601 is specifically configured to modify the dependency pattern of the component into a version dependency pattern by: obtaining declaration data of the component; and modifying the declaration data to modify the dependency mode of the component into a version dependency mode.
Optionally, the third processing unit 601 is specifically configured to modify the declaration data by modifying a regular matching of the dependency pattern, so that the dependency pattern of the component is modified into a version dependency pattern.
Optionally, the fourth processing unit 602 is specifically configured to: and issuing the component corresponding to the object code to the corresponding server by the project based on the version dependency mode and the modified attribute description file.
Fig. 7 schematically shows a schematic view of an electronic device of an embodiment of the disclosure. As shown in fig. 7, the electronic apparatus includes: a memory 701 having a computer-executable program stored thereon, and a processor 702 for executing the computer-executable program to implement the method of any of the embodiments of the present disclosure.
The disclosed embodiments also provide a computer storage medium having a computer-executable program stored thereon, the computer-executable program being executed to implement the method of any one of the disclosed embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of the disclosed embodiments.
The above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims (21)
1. A method of code synchronization, comprising:
modifying a dependency mode of a code to be modified into a path dependency mode, and generating an attribute description file for the code to be modified so as to edit the code to be modified and generate a target code to be synchronized;
executing a Pod library including the object code to synchronize the object code into a project that manages the Pod library.
2. The method according to claim 1, wherein modifying the dependency pattern of the code to be modified into a path dependency pattern comprises:
determining a component corresponding to the code to be modified;
and modifying the dependency mode of the component into a path dependency mode so as to modify the dependency mode of the code to be modified into the path dependency mode.
3. The method of claim 2, wherein the dependency pattern of the component is modified to a path dependency pattern by:
obtaining declaration data of the component;
and modifying the declaration data to modify the dependency mode of the component into a path dependency mode.
4. The method of claim 3, wherein the modifying the declaration data to modify the dependency pattern of the component to a path dependency pattern comprises:
modifying the declaration data by modifying the regular matching of the dependency pattern so that the dependency pattern of the component is modified to a path dependency pattern.
5. The method of claim 1, wherein generating the property description file for the code to be modified comprises:
and generating an attribute description file aiming at the code to be modified by modifying the component configuration file of the code to be modified.
6. The method of claim 5, wherein the generating the attribute description file for the code to be modified by modifying the component configuration file of the code to be modified comprises:
and generating an attribute description file for the code to be modified by modifying the component basic description data of the code to be modified and the record data of the dependency mode.
7. The method of claim 1, further comprising: in response to receiving a synchronization request for the target code,
uploading the target code to a specified directory;
synchronizing the target code from the specified directory to an initiator of the synchronization request.
8. The method of claim 7, further comprising: in response to receiving a synchronization request for the target code,
in the case that the target code is determined to be synchronized into the project, the operation of uploading the target code to a specified directory and synchronizing the target code from the specified directory to the initiator of the synchronization request is executed; and/or
And under the condition that the target code is determined not to be synchronized in the project, firstly informing a developer of the target code to synchronize the target code in the project, then uploading the target code to a specified directory, and synchronizing the target code from the specified directory to an initiator of the synchronization request.
9. The method of claim 8, further comprising:
in the event that it is determined that the object code has been synchronized into the project, first notifying a developer of the object code to confirm whether there are more updated versions of the object code that have not been synchronized into the project, wherein,
reminding the developer to update the version of the target code under the condition that the developer confirms that the target code still has an updated version which is not synchronized into the project, and after the developer synchronizes the updated version of the target code into the project, uploading the target code to a specified directory and synchronizing the target code from the specified directory to the initiator of the synchronization request; and/or
And under the condition that the developer confirms that no updated version of the target code needs to be synchronized into the project, directly uploading the target code to a specified directory, and synchronizing the target code from the specified directory to the initiator of the synchronization request.
10. The method of claim 1, further comprising: in response to receiving a synchronization request for the target code,
and under the condition that the initiator of the synchronous request is determined to be the developer of the target code and the target code is determined not to be synchronized into the project from the first development end of the developer, generating and sending a prompt for uploading the code to the developer.
11. The method of claim 10, further comprising:
in a case where the object code has been uploaded to the project based on the prompt, performing an operation of uploading the object code to a designated directory and synchronizing the object code from the designated directory to a second developer of the developer.
12. A component publishing method, comprising:
determining object code that has been synchronized or can be synchronized into a project that manages Pod libraries;
and modifying the dependency mode of the target code into a version dependency mode, and modifying the attribute description file corresponding to the target code so as to release the component corresponding to the target code to the corresponding server.
13. The method of claim 12, wherein modifying the dependency pattern of the target code into a version dependency pattern comprises:
determining a component corresponding to the object code;
and modifying the dependency mode of the target code into a version dependency mode by modifying the dependency mode of the component into the version dependency mode.
14. The method according to claim 12 or 13, wherein the dependency pattern of the component is modified to a version dependency pattern by:
obtaining declaration data of the component;
and modifying the declaration data to modify the dependency mode of the component into a version dependency mode.
15. The method of claim 14, wherein modifying the declaration data to modify the dependency model of the component to a version dependency model comprises:
modifying the declaration data by modifying the regular matching of the dependency pattern so that the dependency pattern of the component is modified to a version dependency pattern.
16. The method according to any one of claims 12-15, wherein modifying the dependency pattern of the object code into a version dependency pattern and modifying the property description file corresponding to the object code to publish the component corresponding to the object code to the corresponding server comprises:
and issuing the component corresponding to the object code to the corresponding server by the project based on the version dependency mode and the modified attribute description file.
17. A code synchronization apparatus, comprising:
the first processing unit is used for modifying the dependency mode of the code to be modified into a path dependency mode and generating an attribute description file aiming at the code to be modified so as to edit the code to be modified and generate a target code needing synchronization;
and the second processing unit is used for executing the Pod library comprising the target code so as to synchronize the target code into a project for managing the Pod library.
18. A component dispensing apparatus, comprising:
a third processing unit for determining object code that has been synchronized or can be synchronized into a project that manages Pod libraries;
and the fourth processing unit is used for modifying the dependency mode of the target code into a version dependency mode and modifying the attribute description file corresponding to the target code so as to release the component corresponding to the target code to the corresponding server.
19. A computer storage medium having stored thereon a computer-executable program that is executed to implement the method of any one of claims 1-16.
20. An electronic device comprising a memory for storing thereon a computer-executable program and a processor for executing the computer-executable program to implement the method of any of claims 1-16.
21. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-16.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111482168.7A CN114153480B (en) | 2021-12-06 | 2021-12-06 | Code synchronization, component issuing method and device, and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111482168.7A CN114153480B (en) | 2021-12-06 | 2021-12-06 | Code synchronization, component issuing method and device, and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114153480A true CN114153480A (en) | 2022-03-08 |
CN114153480B CN114153480B (en) | 2024-09-20 |
Family
ID=80452738
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111482168.7A Active CN114153480B (en) | 2021-12-06 | 2021-12-06 | Code synchronization, component issuing method and device, and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114153480B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114924788A (en) * | 2022-07-20 | 2022-08-19 | 北京达佳互联信息技术有限公司 | Code synchronization method and device |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107247601A (en) * | 2017-07-04 | 2017-10-13 | 武汉斗鱼网络科技有限公司 | Development process optimization method, device and storage medium |
CN108829437A (en) * | 2018-06-29 | 2018-11-16 | 北京金山安全软件有限公司 | Product development method, system, device, computer equipment and storage medium |
US20190073230A1 (en) * | 2016-03-01 | 2019-03-07 | 650 Industries, Inc. | Method and apparatus for loading multiple differing versions of a native library into a native environment |
CN110377290A (en) * | 2019-07-22 | 2019-10-25 | 阿里巴巴集团控股有限公司 | A kind of method, device and equipment of purpose project compiling |
CN110442371A (en) * | 2019-08-05 | 2019-11-12 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus of release code, medium and computer equipment |
CN110795078A (en) * | 2019-09-28 | 2020-02-14 | 同程网络科技股份有限公司 | APP engineering operation system architecture method based on IOS system |
CN111142895A (en) * | 2019-11-26 | 2020-05-12 | 叮当快药科技集团有限公司 | Method and system for synchronously updating components in project based on SVN (singular value decomposition) module |
CN111245918A (en) * | 2020-01-07 | 2020-06-05 | 微民保险代理有限公司 | Service request transmission method and device |
CN111736762A (en) * | 2020-05-21 | 2020-10-02 | 平安国际智慧城市科技股份有限公司 | Synchronous updating method, device, equipment and storage medium of data storage network |
CN112052037A (en) * | 2020-09-07 | 2020-12-08 | 北京达佳互联信息技术有限公司 | Application software development method, device, equipment and medium |
CN112882700A (en) * | 2021-02-09 | 2021-06-01 | 京东方科技集团股份有限公司 | iOS application program construction method and device, electronic equipment and storage medium |
CN113094086A (en) * | 2021-04-13 | 2021-07-09 | 北京房江湖科技有限公司 | Component integration method and device, computer-readable storage medium and electronic equipment |
CN113238795A (en) * | 2021-05-14 | 2021-08-10 | 北京达佳互联信息技术有限公司 | Component distribution method, device, electronic equipment, storage medium and program product |
CN113434472A (en) * | 2021-06-25 | 2021-09-24 | 平安国际智慧城市科技股份有限公司 | File generation method and device, server and storage medium |
US11157253B1 (en) * | 2020-06-30 | 2021-10-26 | Td Ameritrade Ip Company, Inc. | Computer-automated software release and deployment architecture |
-
2021
- 2021-12-06 CN CN202111482168.7A patent/CN114153480B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190073230A1 (en) * | 2016-03-01 | 2019-03-07 | 650 Industries, Inc. | Method and apparatus for loading multiple differing versions of a native library into a native environment |
CN107247601A (en) * | 2017-07-04 | 2017-10-13 | 武汉斗鱼网络科技有限公司 | Development process optimization method, device and storage medium |
CN108829437A (en) * | 2018-06-29 | 2018-11-16 | 北京金山安全软件有限公司 | Product development method, system, device, computer equipment and storage medium |
CN110377290A (en) * | 2019-07-22 | 2019-10-25 | 阿里巴巴集团控股有限公司 | A kind of method, device and equipment of purpose project compiling |
CN110442371A (en) * | 2019-08-05 | 2019-11-12 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus of release code, medium and computer equipment |
CN110795078A (en) * | 2019-09-28 | 2020-02-14 | 同程网络科技股份有限公司 | APP engineering operation system architecture method based on IOS system |
CN111142895A (en) * | 2019-11-26 | 2020-05-12 | 叮当快药科技集团有限公司 | Method and system for synchronously updating components in project based on SVN (singular value decomposition) module |
CN111245918A (en) * | 2020-01-07 | 2020-06-05 | 微民保险代理有限公司 | Service request transmission method and device |
CN111736762A (en) * | 2020-05-21 | 2020-10-02 | 平安国际智慧城市科技股份有限公司 | Synchronous updating method, device, equipment and storage medium of data storage network |
US11157253B1 (en) * | 2020-06-30 | 2021-10-26 | Td Ameritrade Ip Company, Inc. | Computer-automated software release and deployment architecture |
CN112052037A (en) * | 2020-09-07 | 2020-12-08 | 北京达佳互联信息技术有限公司 | Application software development method, device, equipment and medium |
CN112882700A (en) * | 2021-02-09 | 2021-06-01 | 京东方科技集团股份有限公司 | iOS application program construction method and device, electronic equipment and storage medium |
CN113094086A (en) * | 2021-04-13 | 2021-07-09 | 北京房江湖科技有限公司 | Component integration method and device, computer-readable storage medium and electronic equipment |
CN113238795A (en) * | 2021-05-14 | 2021-08-10 | 北京达佳互联信息技术有限公司 | Component distribution method, device, electronic equipment, storage medium and program product |
CN113434472A (en) * | 2021-06-25 | 2021-09-24 | 平安国际智慧城市科技股份有限公司 | File generation method and device, server and storage medium |
Non-Patent Citations (4)
Title |
---|
PETER FARKAŠ: "On run-length limited error control codes constructed from binary single parity check product codes", 《 2018 CYBERNETICS & INFORMATICS (K&I)》, 16 April 2018 (2018-04-16), pages 1 - 7 * |
李雪满: "基于iOS平台的双语阅读交流平台的设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, 15 October 2018 (2018-10-15), pages 138 - 142 * |
湖北勒布朗: "iOS私有pod库的发布流程", pages 1 - 11, Retrieved from the Internet <URL:《https://www.jianshu.com/p/7ad5af7aa7d9》> * |
突突突突突突: "iOS组件化之本地调试", pages 1 - 13, Retrieved from the Internet <URL:《https://juejin.cn/post/7024401196513230861》> * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114924788A (en) * | 2022-07-20 | 2022-08-19 | 北京达佳互联信息技术有限公司 | Code synchronization method and device |
Also Published As
Publication number | Publication date |
---|---|
CN114153480B (en) | 2024-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8683430B2 (en) | Synchronizing development code and deployed executable versioning within distributed systems | |
CN110221860B (en) | Configuration file processing method, device, terminal and medium | |
CN107193607B (en) | Method and apparatus for updating code file, storage medium, processor, and terminal | |
JP2014532948A (en) | Server upgrade with safety check and preview | |
US20190042233A1 (en) | Application architecture generation | |
CN109634591B (en) | File processing method and device | |
US10338910B2 (en) | Multi-tenant upgrading | |
CN111158730B (en) | System updating method, device, electronic equipment and readable storage medium | |
US11099837B2 (en) | Providing build avoidance without requiring local source code | |
CN110597552A (en) | Configuration method, device and equipment of project continuous integration pipeline and storage medium | |
CN108132832B (en) | Application program starting method and device | |
CN114153480A (en) | Code synchronization method, component publishing method, device thereof and computer storage medium | |
CN106990974B (en) | APP updating method and device and electronic equipment | |
US20070185929A1 (en) | Method and apparatus for processing monitoring | |
CN109739539A (en) | Application dissemination method, device, equipment and the storage medium of Cross-environment | |
CN117667109A (en) | Environment deployment method and device, electronic equipment and storage medium | |
CN109144524B (en) | Version release method of subject game on education platform and electronic equipment | |
CN104462344B (en) | In the processing method and processing device of destination server structure ETL system | |
CN113626007B (en) | Application method and device of connector model and server | |
JP5943753B2 (en) | Virtual machine management system, virtual machine management method and program | |
CN110275699A (en) | Code construction method, Serverless platform and object storage platform | |
CN114185578A (en) | Method, device and equipment for smoothly upgrading database and readable storage medium | |
CN112426722A (en) | Node map hot updating method and device, storage medium and computer equipment | |
CN116893834B (en) | Load updating method, device, system, electronic equipment and readable storage medium | |
CN118132120B (en) | Service system updating method and device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |