An overview of picture management
To component dimensions, pictures and a one-to-one relationship between components, at the time of packaging or local development when executing scripts dynamic latour images, these images on the server to heavy, in the form of a zip package downloaded to the local, use script to the local image into xcasset bag imported into the project, so as to realize the ability of the server management app pictures. The advantage of this is that the size of the picture, whether missing, add and delete operations and other data can be obtained, but also the subsequent use of the picture for cloud control processing
How do you handle branch relationships
The problem
FeatureM, featureN, featureM adds A picture M1, and featureN removes A picture M2. When featureM is merged and has one more image m1,featureN will have two images (m1,m2), which is a problem because featureN isn’t merged and is still under development, so it shouldn’t have image M1.
This comes down to the question of how the same component branch corresponds to the image
The association between an image and a component should be that the image is associated with the branch or version number of the component. The images associated with the same component or different versions of different branches should be independent.
A plan to deal with the problem
Every company should have its own branch management plan. When we merge branches, we must merge request, so that the server can get hook events and trigger the analysis merge operation. Source and target branches and submitter information are obtained. You need to merge the image relationship from the source branch into the target branch. The binding relationship of the image should correspond to the version number or branch of the component
Picture synchronization scheme
1. Logical sorting of merge code in branch creation and push mode (1) Create branch to trigger push event (initialization of image dependency when feature branch and release branch are created);
(2) Synchronization of image dependencies when merging code into develop, Release, or Master branches via push;
Risk point 1: If you create a branch based on master, the image component has a dependency on the Develop branch. (You need to make sure you don’t merge master only, but don’t sync to Develop requirements)
Risk point 2: Merge develop, Release, master directly in push mode (without Mr Merge). Make sure the commit information contains the branch name tag
2. Mr Merge code logic combing
3. Sorted out the dependency relationship process of picture components for periodic task update
4. Specific execution logic of picture component synchronization
5. Monitoring scheme
6.1 Dependencies between features need to be manually synchronized from the Develop branch to the new branch. 6.3 Dependencies between features need to be manually synchronized from the Develop branch to the Release branch. Master branch picture component dependency synchronization, need to use Webhook, automatic synchronization. (1) The webhook of push event needs the label [branch name] to obtain the name of the source branch. (2) The Webhook of Mr Can obtain the clear source branch and target branch through parameters. 6.4 Risk: (1) The component Webhook is missing
5. Solution (1) Monitor and automatically supplement Webook
(2) Avoid merge the develop, Release, and Master branches in push mode.
conclusion
In the next installment, we will share the implementation logic of iOS client. Later, we will continue to share the resource management system in detail
Free big front end R&D center recruiting new students! FE/IOS/Android engineers look over
Company benefits include: five insurances and one housing fund in full, plus the purchase of additional commercial insurance free gym + annual physical examination 10% discount for renting a house near the company 2 promotion opportunities per year
Office location: Beijing Jiuxianqiao Putian Industrial Science and Technology Park welcome you to join us! Please send your resume to [email protected]!