CN111767075A - Method and device for synchronizing application program versions - Google Patents

Method and device for synchronizing application program versions Download PDF

Info

Publication number
CN111767075A
CN111767075A CN202010581220.3A CN202010581220A CN111767075A CN 111767075 A CN111767075 A CN 111767075A CN 202010581220 A CN202010581220 A CN 202010581220A CN 111767075 A CN111767075 A CN 111767075A
Authority
CN
China
Prior art keywords
environment
application program
target
version number
svn
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
CN202010581220.3A
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.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology 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 Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN202010581220.3A priority Critical patent/CN111767075A/en
Publication of CN111767075A publication Critical patent/CN111767075A/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

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

Abstract

The invention provides a method and a device for synchronizing application program versions, which comprises the following steps: acquiring a source environment svn, wherein the source environment svn comprises an application program version number and a source code corresponding to the application program version number; receiving a target application program version number and a file path input by a user, analyzing the target application program version number and the file path and splicing into an svn export command; receiving a selection instruction of a target environment; calling the svn export command, and executing the svn export command to export a source code corresponding to a target application program version number in the source environment svn; and copying the derived source code corresponding to the target application program version number into the target environment according to the selection instruction of the target environment, so as to improve the synchronization efficiency of the source code corresponding to the target application program version number.

Description

Method and device for synchronizing application program versions
Technical Field
The invention relates to the field of software development, in particular to a method and a device for synchronizing application program versions.
Background
In the stages of software development, implementation and the like, program version problems of a plurality of environments can be involved, at least the development environment, the test environment, the gray scale environment, the production environment and the like are involved, and even more are involved. It is well known that source code management is critical to software operation. Source code management, which is now commonly used in the industry, may be placed in a svn (versioned control system) or git warehouse and then deployed using continuous integration automation. Before continuing to integrate, it is often necessary to synchronize a developed version of a file to a certain environment for testing.
Such as from the development environment svn to the test environment svn in terms of the version of the application. In the existing method, source codes corresponding to the application program version are manually copied from a development environment svn and then uploaded to a test environment svn, the synchronization process is low in efficiency, and a certain error rate exists in manual synchronization.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for synchronizing application versions, so as to solve technical defects in the prior art.
The invention provides a method for synchronizing application program versions, which comprises the following steps:
acquiring a source environment svn, wherein the source environment svn comprises an application program version number and a source code corresponding to the application program version number;
receiving a target application program version number and a file path input by a user, analyzing the target application program version number and the file path and splicing into an svn export command;
receiving a selection instruction of a target environment;
calling the svn export command, and executing the svn export command to export a source code corresponding to a target application program version number in the source environment svn;
and copying the source code corresponding to the exported target application program version number into the target environment according to the selection instruction of the target environment.
Further, the target environment includes a development environment, a test environment, a grayscale environment, and a production environment;
receiving a selection instruction of a target environment, comprising:
receiving a selection instruction of at least one of the development environment, the test environment, the gray level environment and the production environment;
and copying the derived source code corresponding to the version number of the target application program to the environment corresponding to the selection instruction according to the selection instruction of at least one of the development environment, the test environment, the gray level environment and the production environment.
Further, the method for synchronizing the application program versions further includes:
receiving a selection instruction of a target host, and acquiring information of the target host;
a built-in file transfer protocol;
and uploading the source code corresponding to the version number of the target application program to the target host through a file transfer protocol according to the svn export command and the information of the target host.
The invention also provides a device for synchronizing the application program versions, which comprises:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire a source environment svn, and the source environment svn comprises an application program version number and a source code corresponding to the application program version number;
the processing module is configured to receive a target application program version number and a file path input by a user, analyze the target application program version number and the file path and splice the target application program version number and the file path into an svn export command;
a receiving module configured to receive a selection instruction of a target environment;
the export module is configured to call the svn export command, and execute the svn export command to export a source code corresponding to a target application program version number in the source environment svn;
and the synchronization module is configured to copy the derived source code corresponding to the target application program version number into the target environment according to the selection instruction of the target environment.
The method and the device realize the synchronization between the target environment and the source code corresponding to the target application program version number in the source environment by copying the derived source code corresponding to the target application program version number into the target environment. In the whole synchronization process, a user only needs to select a target environment to be synchronized after inputting the target application program version number and the file path, so that the synchronization efficiency of the source code corresponding to the target application program version number is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for application version synchronization according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus of a method for application version synchronization according to an embodiment of the present invention.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.
The terminology used in the one or more embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the invention. As used in one or more embodiments of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present invention refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used herein to describe various information in one or more embodiments of the present invention, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the present invention, a method and an apparatus for synchronizing application versions are provided, which are described in detail in the following embodiments one by one.
An embodiment of the present invention provides a method for synchronizing application versions, as shown in fig. 1, including steps 102 to 110.
Step 102: and acquiring a source environment svn, wherein the source environment svn comprises an application program version number and a source code corresponding to the application program version number.
The source environment svn is a version control system in the source environment, and the version number of the application program developed and completed in the source environment svn and the source code corresponding to the version number are used as the source environment. And the source code corresponding to the program version number in the source environment svn is the data to be synchronized.
The SVN is called Subversion, a version control system. The SVN is an open source version control system that manages data that changes over time. These data are placed in a central Repository (Repository). Can be used to manage any type of file, including program source code.
For example, the source environment svn may be a development environment svn. A development environment (SDE) refers to a set of Software used for supporting engineering development and maintenance of system Software and application Software on the basis of basic hardware and digital Software.
Step 104: and receiving a target application program version number and a file path input by a user, analyzing the target application program version number and the file path and splicing into an svn export command.
Analyzing and splicing into an svn export command according to the version number and the file path of the target application program filled by the user, wherein the form of the svn export command is as follows: svn export- -force-r version number- -File Path- -user name xxxx- -password xxxx.
Step 106: and receiving a selection instruction of the target environment.
The target environment includes a development environment, a test environment, a grayscale environment, and a production environment. A plurality of target environments can be selected, and a selection instruction of at least one of the development environment, the test environment, the gray level environment and the production environment is received;
step 108: and calling the svn export command, and executing the svn export command to export the source code corresponding to the target application program version number in the source environment svn.
And exporting the source code corresponding to the target application program version number in the source environment svn by executing the svn export command, namely, the method for exporting the source code is adopted. In the prior art, the detection mode needs to perform a checkout project locally in advance. Therefore, the method optimizes the process of synchronizing the source code corresponding to the version number of the target application program and improves the source code synchronization efficiency corresponding to the version number of the target application program.
Step 110: and copying the source code corresponding to the exported target application program version number into the target environment according to the selection instruction of the target environment.
And synchronizing the source code corresponding to the target application program version number in the target environment and the target application program version number in the source environment by copying the derived source code corresponding to the target application program version number to the target environment. In the whole synchronization process, a user only needs to select a target environment to be synchronized after inputting the target application program version number and the file path, so that the synchronization efficiency of the source code corresponding to the target application program version number is improved.
Due to the fact that the source code corresponding to the target application program version number in the source environment is synchronized to a plurality of target environments, the derived source code corresponding to the target application program version number can be copied to the environment corresponding to the selection instruction according to the selection instruction of at least one of the development environment, the test environment, the gray scale environment and the production environment.
For example, if the target environment is a test environment, a grayscale environment, or a production environment, the user can directly select the test environment, the grayscale environment, or the production environment, so as to greatly reduce the workload of the source code corresponding to the version number of the synchronous application program, and significantly improve the synchronization efficiency of the source code corresponding to the version number of the application program in the test environment, the grayscale environment, or the production environment.
The method for synchronizing the application program versions further comprises the following steps:
step 202: and receiving a selection instruction of the target host, and acquiring the information of the target host.
The information of the target host comprises host ip information, home directory information, user name information and password information configuration.
The target host is other computing equipment, and the computing equipment needing to synchronize the source code corresponding to the version number of the target application program is the target host.
Step 204: the file transfer protocol is built in.
The File Transfer Protocol (FTP) is an application layer protocol for transferring files between a client and a server over a computer network.
Step 206: and uploading the source code corresponding to the version number of the target application program to the target host through a file transfer protocol according to the svn export command and the information of the target host.
The synchronization of the source code corresponding to the target application program version number in the host is realized, manual copying is not needed, and the synchronization efficiency is improved.
As shown in fig. 2, in another embodiment of the present invention, a device for synchronizing application versions is further provided, including:
an obtaining module 202, configured to obtain a source environment svn, where the source environment svn includes an application version number and a source code corresponding to the application version number;
the processing module 204 is configured to receive a target application program version number and a file path input by a user, analyze the target application program version number and the file path, and splice the target application program version number and the file path into an svn export command;
a receiving module 206 configured to receive a selection instruction of a target environment;
an export module 208 configured to invoke the svn export command, execute the svn export command to export a source code corresponding to a target application version number in the source environment svn;
and the synchronization module 210 is configured to copy the derived source code corresponding to the target application version number to the target environment according to the selection instruction of the target environment.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (4)

1. A method for application version synchronization, comprising:
acquiring a source environment svn, wherein the source environment svn comprises an application program version number and a source code corresponding to the application program version number;
receiving a target application program version number and a file path input by a user, analyzing the target application program version number and the file path and splicing into an svn export command;
receiving a selection instruction of a target environment;
calling the svn export command, and executing the svn export command to export a source code corresponding to a target application program version number in the source environment svn;
and copying the source code corresponding to the exported target application program version number into the target environment according to the selection instruction of the target environment.
2. The method of application version synchronization of claim 1, wherein the target environment comprises a development environment, a test environment, a grayscale environment, and a production environment;
receiving a selection instruction of a target environment, comprising:
receiving a selection instruction of at least one of the development environment, the test environment, the gray level environment and the production environment;
and copying the derived source code corresponding to the version number of the target application program to the environment corresponding to the selection instruction according to the selection instruction of at least one of the development environment, the test environment, the gray level environment and the production environment.
3. The method for application version synchronization according to claim 1, further comprising:
receiving a selection instruction of a target host, and acquiring information of the target host;
a built-in file transfer protocol;
and uploading the source code corresponding to the version number of the target application program to the target host through a file transfer protocol according to the svn export command and the information of the target host.
4. An apparatus for application version synchronization, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire a source environment svn, and the source environment svn comprises an application program version number and a source code corresponding to the application program version number;
the processing module is configured to receive a target application program version number and a file path input by a user, analyze the target application program version number and the file path and splice the target application program version number and the file path into an svn export command;
a receiving module configured to receive a selection instruction of a target environment;
the export module is configured to call the svn export command, and execute the svn export command to export a source code corresponding to a target application program version number in the source environment svn;
and the synchronization module is configured to copy the derived source code corresponding to the target application program version number into the target environment according to the selection instruction of the target environment.
CN202010581220.3A 2020-06-23 2020-06-23 Method and device for synchronizing application program versions Pending CN111767075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010581220.3A CN111767075A (en) 2020-06-23 2020-06-23 Method and device for synchronizing application program versions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010581220.3A CN111767075A (en) 2020-06-23 2020-06-23 Method and device for synchronizing application program versions

Publications (1)

Publication Number Publication Date
CN111767075A true CN111767075A (en) 2020-10-13

Family

ID=72721821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010581220.3A Pending CN111767075A (en) 2020-06-23 2020-06-23 Method and device for synchronizing application program versions

Country Status (1)

Country Link
CN (1) CN111767075A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650815A (en) * 2021-01-19 2021-04-13 青岛海尔科技有限公司 Method and device for synchronizing environmental data, storage medium and electronic device

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030182652A1 (en) * 2001-12-21 2003-09-25 Custodio Gabriel T. Software building and deployment system and method
CN102495736A (en) * 2011-12-19 2012-06-13 曙光信息产业(北京)有限公司 Method and system for identifying software code svn version in executable file
US20120180024A1 (en) * 2011-01-07 2012-07-12 International Business Machines Corporation Synchronizing development code and deployed executable versioning within distributed systems
CN105468427A (en) * 2015-11-19 2016-04-06 深圳创维数字技术有限公司 Implementation method and system of automatic compilation and release
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof
CN106201614A (en) * 2016-07-11 2016-12-07 天津中兴智联科技有限公司 A kind of universal method and system that multiple similar software can be carried out chain type upgrading
CN106250148A (en) * 2016-08-01 2016-12-21 浪潮软件集团有限公司 ANT-based project difference upgrading method
CN106445485A (en) * 2016-03-28 2017-02-22 中国电力科学研究院 Software version consistency detection system and detection method thereof
CN107203468A (en) * 2017-04-19 2017-09-26 哈尔滨工程大学 A kind of software version evolution comparative analysis method based on AST
CN107450941A (en) * 2017-06-26 2017-12-08 深圳市小牛在线互联网信息咨询有限公司 Automatic packaging method, device, storage medium and computer equipment
CN107577469A (en) * 2017-08-21 2018-01-12 厦门悦讯教育科技有限公司 A kind of Software package method for release management
CN109086071A (en) * 2018-08-22 2018-12-25 平安普惠企业管理有限公司 A kind of method and server of management software version information
CN109656569A (en) * 2018-10-16 2019-04-19 平安普惠企业管理有限公司 Multi-environment application dispositions method, equipment, storage medium and device
CN110059001A (en) * 2019-03-15 2019-07-26 平安普惠企业管理有限公司 The automatic upgrade control method of program, device, computer equipment and storage medium
CN111026403A (en) * 2019-12-10 2020-04-17 北京锐安科技有限公司 Packing deployment method and device, computer equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030182652A1 (en) * 2001-12-21 2003-09-25 Custodio Gabriel T. Software building and deployment system and method
US20120180024A1 (en) * 2011-01-07 2012-07-12 International Business Machines Corporation Synchronizing development code and deployed executable versioning within distributed systems
CN102495736A (en) * 2011-12-19 2012-06-13 曙光信息产业(北京)有限公司 Method and system for identifying software code svn version in executable file
CN105468427A (en) * 2015-11-19 2016-04-06 深圳创维数字技术有限公司 Implementation method and system of automatic compilation and release
CN106445485A (en) * 2016-03-28 2017-02-22 中国电力科学研究院 Software version consistency detection system and detection method thereof
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof
CN106201614A (en) * 2016-07-11 2016-12-07 天津中兴智联科技有限公司 A kind of universal method and system that multiple similar software can be carried out chain type upgrading
CN106250148A (en) * 2016-08-01 2016-12-21 浪潮软件集团有限公司 ANT-based project difference upgrading method
CN107203468A (en) * 2017-04-19 2017-09-26 哈尔滨工程大学 A kind of software version evolution comparative analysis method based on AST
CN107450941A (en) * 2017-06-26 2017-12-08 深圳市小牛在线互联网信息咨询有限公司 Automatic packaging method, device, storage medium and computer equipment
CN107577469A (en) * 2017-08-21 2018-01-12 厦门悦讯教育科技有限公司 A kind of Software package method for release management
CN109086071A (en) * 2018-08-22 2018-12-25 平安普惠企业管理有限公司 A kind of method and server of management software version information
CN109656569A (en) * 2018-10-16 2019-04-19 平安普惠企业管理有限公司 Multi-environment application dispositions method, equipment, storage medium and device
CN110059001A (en) * 2019-03-15 2019-07-26 平安普惠企业管理有限公司 The automatic upgrade control method of program, device, computer equipment and storage medium
CN111026403A (en) * 2019-12-10 2020-04-17 北京锐安科技有限公司 Packing deployment method and device, computer equipment and storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
ALI IRFAN: "Tracking the Ripple Impact of Code Changes through Version Control Systems", 《2019 INTERNATIONAL CONFERENCE ON FRONTIERS OF INFORMATION TECHNOLOGY (FIT)》, pages 1 - 7 *
LATTICET: "SVN 代码迁出,导出,同步至生产环境脚本", pages 1 - 2, Retrieved from the Internet <URL:《 https://www.cnblogs.com/dollarzhang/articles/4147158.html》> *
佚名: "SVN本地开发、测试环境版本控制-自动发布生产环境", pages 1 - 4, Retrieved from the Internet <URL:《https://blog.csdn.net/weixin_33720452/article/details/91924853》> *
王飞: "基于Docker的研发部署管理平台的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, pages 138 - 291 *
蜗牛奔跑: "SVN 本地开发、测试环境版本控制-自动发布生产环境", pages 1 - 2, Retrieved from the Internet <URL:《https://my.oschina.net/yonghan/blog/471071》> *
贺自军: "基于SVN的统一协作平台设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, pages 138 - 259 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650815A (en) * 2021-01-19 2021-04-13 青岛海尔科技有限公司 Method and device for synchronizing environmental data, storage medium and electronic device
CN112650815B (en) * 2021-01-19 2023-06-16 青岛海尔科技有限公司 Method and device for synchronizing environment data, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN109358858B (en) Automatic deployment method, device, medium and electronic equipment
CN108376061B (en) Method and apparatus for developing unmanned vehicle applications
EP3396555B1 (en) Method and system for automated enterprise testing system
US20060155777A1 (en) Deployment of life-cycle model for LDAP applications
CN107193607B (en) Method and apparatus for updating code file, storage medium, processor, and terminal
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
US20130339779A1 (en) Systematic failure remediation
CN112711403B (en) Method, device, computer equipment and storage medium for synchronizing game development
WO2014056371A1 (en) Method and apparatus for determining range of files to be migrated
CN112527676A (en) Model automation test method, device and storage medium
CN105653326A (en) System and method for batch Linux system installation and detection
CN114237754B (en) Data loading method and device, electronic equipment and storage medium
CN111767075A (en) Method and device for synchronizing application program versions
JP2021140430A (en) Database migration method, database migration system, and database migration program
JP2003330756A (en) Configuration management method for supervisory control software
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
CN111475419B (en) Method for managing automated test benchmark data based on container technology
CN111858315B (en) Software debugging method, device, equipment and medium based on version management
CN112905164A (en) Project code processing method and device
CN111638905A (en) Version number generation method and device, electronic equipment and readable storage medium
CN110543520A (en) data migration method and device
CN102402437B (en) Data processing equipment and download control method thereof
CN113298538B (en) Customer service data processing method and device
CN113127259B (en) Data deployment method, device, equipment and storage medium
CN114978937B (en) Page data verification method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201013