CN104199667B - Method and system for newly building MTK project and submitting codes - Google Patents

Method and system for newly building MTK project and submitting codes Download PDF

Info

Publication number
CN104199667B
CN104199667B CN201410457167.0A CN201410457167A CN104199667B CN 104199667 B CN104199667 B CN 104199667B CN 201410457167 A CN201410457167 A CN 201410457167A CN 104199667 B CN104199667 B CN 104199667B
Authority
CN
China
Prior art keywords
branch
remote
git
function
name
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.)
Active
Application number
CN201410457167.0A
Other languages
Chinese (zh)
Other versions
CN104199667A (en
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.)
Zhangzhou Malata Technology Co., Ltd.
Original Assignee
Zhangzhou Wanlida 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 Zhangzhou Wanlida Technology Co ltd filed Critical Zhangzhou Wanlida Technology Co ltd
Priority to CN201410457167.0A priority Critical patent/CN104199667B/en
Publication of CN104199667A publication Critical patent/CN104199667A/en
Application granted granted Critical
Publication of CN104199667B publication Critical patent/CN104199667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method for newly building an MTK project and submitting codes, which comprises the following steps: collecting each part of codes of the product, and constructing a frame of the project in the form of a function; performing encapsulation processing on the git push, and replacing the git push by a malatapush function; and submitting branches by operating the shell script resources, performing branch judgment before submitting the branches, submitting the branches if the branches are correct, and warning and stopping submitting if the branches are wrong. The invention also provides a system for newly building the MTK project and submitting the codes, which realizes the high-efficiency newly-built project and ensures that the wrong branches can not be submitted.

Description

Method and system for newly building MTK project and submitting codes
Technical Field
The invention relates to a method and a system for newly building an MTK project and submitting codes.
Background
When an MTK project is newly built, the new construction of the large project is difficult to read, large-scale error searching and modification are needed when the MTK project is maintained at a later stage, and targeted modification cannot be conducted.
Disclosure of Invention
One of the technical problems to be solved by the present invention is to provide a method for creating a new MTK project and submitting a code, so as to implement a highly efficient new project and ensure that a wrong branch is not submitted.
One of the technical problems to be solved by the invention is realized as follows: a method for creating MTK engineering and submitting codes comprises the following steps:
step 10, collecting codes of all parts of a product, constructing a project framework in a function form, dividing the codes of the product into the parts, so as to refine the project, so that targeted modification can be performed during later modification, the modification range is reduced, the framework is constructed, the readability is improved, and a new project can be completed only through one command;
step 20, packaging a push data command git push of the distributed version control tool git, replacing the git push with a maladapush function, and requesting git to create a local branch with the same name as the remote merge branch according to the current configuration of the git warehouse by the maladapush function, and simultaneously acquiring the name of the remote warehouse and the name of the remote merge branch;
and step 30, judging whether the branch is correct or not by using a malatapush function through operating the shell script resources, if so, submitting, and otherwise, prompting an error in a warning mode and stopping the submitting action.
Further, the step 1 of constructing a framework of the project in the form of a function specifically includes: and (4) completing the construction of the framework by running a create function in the shell script once and introducing two parameters, namely the constructed product name and the dependent product name respectively.
Further, the step 30 further includes:
step 31, automatically detecting a current branch and a remote branch by using a maladapush function through operating shell script resources, judging whether the judgment branch is correct or not by judging the corresponding relation between the current branch and the remote branch, if so, entering step 32, otherwise, stopping the submitted action, and prompting an error in a warning form;
and step 32, specifically specifying by git push < remote warehouse name > HEAD: refs/for/< remote merge branch name >, accurately pushing and completing submission.
Further, when the product is not needed, the code of each part of the product is found through a clean function and the product is deleted.
The second technical problem to be solved by the present invention is to provide a system for newly building MTK project and submitting code, so as to implement efficient new project and ensure that the wrong branch is not submitted.
The second technical problem to be solved by the invention is realized as follows: a system for creating MTK projects and submitting code, comprising:
newly building a module: collecting partial codes of products, and constructing a framework of the project in the form of functions;
packaging the module: the system comprises a distributed version control tool git, a data pushing command git push used for packaging a data pushing command git of the distributed version control tool git, a maladapush function replaces the git push, and the maladapush function requires the git to create a local branch with the same name as a remote merge branch according to the current configuration of a git warehouse and simultaneously obtains the name of the remote warehouse and the name of the remote merge branch;
a submission module: and judging whether the branch is correct or not by operating the shell script resource and using a maladapush function, if so, submitting, and otherwise, prompting an error in a warning mode and stopping the action of submitting.
A pushing module: the method is used for specifically specifying, accurately pushing and completing submission through git push < remote warehouse name > HEAD: refs/for/< remote merge branch name >.
Further, the building of a framework of the project in the form of a function in the newly-built module is specifically as follows: and (4) completing the construction of the framework by running a create function in the shell script once and introducing two parameters, namely the constructed product name and the dependent product name respectively.
Further, the submission module further includes:
a branch judgment module: automatically detecting a current branch and a remote branch by using a maladapush function through operating shell script resources, judging whether the judgment branch is correct or not by judging the corresponding relation between the current branch and the remote branch, if so, entering a step 32, otherwise, stopping the submitted action, and prompting an error in a warning form;
further, when the product is not needed, the code of each part of the product is found through a clean function and the product is deleted.
The invention has the following advantages: the invention constructs the frame to quickly construct the refined project, greatly shortens the time, improves the efficiency of the MTK newly constructed project, avoids the wrong code from being submitted to the wrong branch by packaging the code and judging the branch before submitting, and greatly improves the accuracy of code submission.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
As shown in fig. 1, a method for creating a new MTK project and submitting code includes the following steps:
step 10, collecting codes of all parts of a product, constructing a project framework in a function form, and respectively completing the construction of the framework for the constructed product name and the dependent product name by running a create function in a shell script and transmitting two parameters; dividing the code of the product into various parts, so as to refine the project, so that the targeted modification can be carried out during the later modification, the modification range is reduced, the readability is improved by constructing the frame, and the newly-built project can be completed only by one command;
step 20, packaging a push data command git push of the distributed version control tool git, replacing the git push with a maladapush function, and requesting git to create a local branch with the same name as the remote merge branch according to the current configuration of the git warehouse by the maladapush function, and simultaneously acquiring the name of the remote warehouse and the name of the remote merge branch;
step 30, by operating the shell script resources, judging whether the branch is correct by using a malatapushh function, if so, submitting, otherwise, prompting an error in a warning mode and stopping the submitting action, wherein the step 30 further comprises the following steps:
step 31, automatically detecting a current branch and a remote branch by using a maladapush function through operating shell script resources, judging whether the judgment branch is correct or not by judging the corresponding relation between the current branch and the remote branch, if so, entering step 32, otherwise, stopping the submitted action, and prompting an error in a warning form;
and step 32, specifically specifying by git push < remote warehouse name > HEAD: refs/for/< remote merge branch name >, accurately pushing and completing submission.
When the product is not needed, the code of each part of the product is found through a clean function and the product is deleted.
A system for creating MTK projects and submitting code, comprising:
newly building a module: the method comprises the steps that codes of all parts of a product are collected, a frame of a project is built in a function mode, two parameters are introduced by running a create function in a shell script once, and the built product name and the dependent product name are respectively used, so that the frame is built; dividing the code of the product into various parts, so as to refine the project, so that the targeted modification can be carried out during the later modification, the modification range is reduced, the readability is improved by constructing the frame, and the newly-built project can be completed only by one command;
packaging the module: the system comprises a distributed version control tool git, a data pushing command git push used for packaging a data pushing command git of the distributed version control tool git, a maladapush function replaces the git push, and the maladapush function requires the git to create a local branch with the same name as a remote merge branch according to the current configuration of a git warehouse and simultaneously obtains the name of the remote warehouse and the name of the remote merge branch;
a submission module: by operating the shell script resources, judging whether the branch is correct by using a maladapush function, if so, submitting, otherwise, prompting an error in a warning mode and stopping the submitting action, wherein the submitting module further comprises:
a branch judgment module: and automatically detecting the current branch and the remote branch by using a maladapush function through operating shell script resources, judging whether the judged branch is correct or not by judging the corresponding relation between the current branch and the remote branch, if so, entering a step 32, otherwise, stopping the submitted action, and prompting an error in a warning form.
When the product is not needed, the code of each part of the product is found through a clean function and the product is deleted.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

Claims (4)

1. A method for newly building MTK engineering and submitting codes is characterized in that: the method comprises the following steps:
step 10, collecting codes of all parts of a product, and constructing a project framework in a function form;
step 20, packaging a push data command git push of the distributed version control tool git, replacing the git push with a maladapush function, and requesting git to create a local branch with the same name as the remote merge branch according to the current configuration of the git warehouse by the maladapush function, and simultaneously acquiring the name of the remote warehouse and the name of the remote merge branch;
step 30, judging whether the branch is correct or not by using a malatapush function through operating the shell script resources, if so, submitting, otherwise, prompting an error in a warning mode and stopping the action of submitting;
the framework for constructing the project in the form of the function in the step 10 is specifically as follows: the construction of the frame is completed by running a create function in the shell script once and transmitting two parameters, namely the constructed product name and the dependent product name;
said step 30 further comprises:
step 31, automatically detecting a current branch and a remote branch by using a maladapush function through operating shell script resources, judging whether the branch is correct or not by judging the corresponding relation between the current branch and the remote branch, if so, entering step 32, otherwise, stopping the submitted action, and prompting an error in a warning form;
and step 32, specifically specifying by git push < remote warehouse name > HEAD: refs/for/< remote merge branch name >, accurately pushing and completing submission.
2. The method of claim 1 for creating new MTK project and submitting code, wherein the method comprises: when the product is not needed, the code of each part of the product is found through a clean function and the product is deleted.
3. A system for newly building MTK engineering and submitting codes is characterized in that: the method comprises the following steps:
newly building a module: collecting partial codes of products, and constructing a framework of the project in the form of functions;
packaging the module: the system comprises a distributed version control tool git, a data pushing command git push used for packaging a data pushing command git of the distributed version control tool git, a maladapush function replaces the git push, and the maladapush function requires the git to create a local branch with the same name as a remote merge branch according to the current configuration of a git warehouse and simultaneously obtains the name of the remote warehouse and the name of the remote merge branch;
a submission module: judging whether the branch is correct or not by using a malatapush function through operating shell script resources, if so, submitting, and otherwise, prompting an error in a warning mode and stopping the submitted action;
the construction of the frame is completed by running a create function in the shell script once and transmitting two parameters, namely the constructed product name and the dependent product name;
the commit module further comprises:
a branch judgment module: automatically detecting a current branch and a remote branch by using a maladapush function through operating shell script resources, judging whether the branch is correct or not by judging the corresponding relation between the current branch and the remote branch, if so, specifically specifying and accurately pushing through git push < remote warehouse name > HEAD, refs/for/< remote merge branch name >, completing submission, otherwise, stopping the submission action, and prompting an error in a warning form;
a pushing module: the method is used for specifically specifying, accurately pushing and completing submission through git push < remote warehouse name > HEAD: refs/for/< remote merge branch name >.
4. The system of creating a new MTK project and submitting code according to claim 3, wherein: when the product is not needed, the code of each part of the product is found through a clean function and the product is deleted.
CN201410457167.0A 2014-09-10 2014-09-10 Method and system for newly building MTK project and submitting codes Active CN104199667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410457167.0A CN104199667B (en) 2014-09-10 2014-09-10 Method and system for newly building MTK project and submitting codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410457167.0A CN104199667B (en) 2014-09-10 2014-09-10 Method and system for newly building MTK project and submitting codes

Publications (2)

Publication Number Publication Date
CN104199667A CN104199667A (en) 2014-12-10
CN104199667B true CN104199667B (en) 2020-04-07

Family

ID=52084964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410457167.0A Active CN104199667B (en) 2014-09-10 2014-09-10 Method and system for newly building MTK project and submitting codes

Country Status (1)

Country Link
CN (1) CN104199667B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760184B (en) * 2014-12-18 2019-07-23 深圳云之家网络有限公司 A kind of method and apparatus of charging assembly
CN105487912B (en) * 2015-11-30 2020-01-10 无锡闻泰信息技术有限公司 Public problem modification multi-branch maintenance system and method
CN107025112A (en) * 2017-04-10 2017-08-08 丹露成都网络技术有限公司 A kind of supervision and tracking based on git hooks and bug management tool
CN108062232A (en) * 2017-12-14 2018-05-22 上海钢联电子商务股份有限公司 A kind of system and method for automatically creating branch
CN108647010B (en) * 2018-04-27 2021-11-26 武汉斗鱼网络科技有限公司 Project engineering initialization method, terminal equipment and storage medium
CN110058860A (en) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 A kind of automatic delivery method of code, device, equipment and computer storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9052983B2 (en) * 2012-01-16 2015-06-09 International Business Machines Corporation Source code patches
CN103309804B (en) * 2013-04-08 2015-12-02 中国电子科技集团公司第十研究所 Robotization code regulation checks platform
CN103336688A (en) * 2013-06-20 2013-10-02 中标软件有限公司 Software integrating method and system oriented to cloud computing software research and development process
CN103729195B (en) * 2014-01-15 2017-04-05 北京奇虎科技有限公司 A kind of control method and system of software version

Also Published As

Publication number Publication date
CN104199667A (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN104199667B (en) Method and system for newly building MTK project and submitting codes
CN103870260A (en) Method and system for service interface development
WO2021057252A1 (en) Service processing flow configuration method and apparatus, and service request processing method and apparatus
CN104199749A (en) Crash information processing method and crash information processing device
CN104808521A (en) Intelligent device control method and device
US20170277172A1 (en) Sim system, control method therefor and production informatization system
CN110955715A (en) ERP system, data conversion method and device of target platform and electronic equipment
CN111061678A (en) Service data processing method and device, computer equipment and storage medium
CN103780624A (en) General application layer network communication protocol application method for complicated system
CN104331315A (en) Analysis and generation method and system of json object of any level
CN104035766A (en) Android system trimming method based on coverage rate test
CN102880471A (en) Command execution method based on command line and command line operating system
CN112269588B (en) Algorithm upgrading method, device, terminal and computer readable storage medium
CN102789420B (en) The Dynamic Slicing system of track is performed based on program
CN103455337A (en) Method for using dynamic library under Android development environment
WO2011144104A3 (en) Method, apparatus and optical module for software upgrade
CN101976190B (en) DirectUI based interface generating system and method
CN104104969B (en) Video interception method and device
CN107330173B (en) Integrated circuit back end design automation system
CN105302557A (en) Thread establishing and processing method and apparatus
FI3610369T3 (en) Technologies for creating and distributing integration connectors in a cloud service brokerage system
CN104765800A (en) Big data based efficient search method
CN115271764A (en) Safety management and control method and system for smart phone maintenance
CN109213518A (en) A method of the system automation based on git persistently constructs
CN103049276A (en) Process compiling system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20180906

Address after: 363000 a factory building of Jingcheng Malata Industrial Park, Nanjing County, Zhangzhou, Fujian.

Applicant after: Zhangzhou Malata Technology Co., Ltd.

Address before: 363000 Malata Nanjing Industrial Park, Zhangzhou, Fujian

Applicant before: Nanjing Malata Technology Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant