{"id":6822,"date":"2025-07-23T13:54:53","date_gmt":"2025-07-23T05:54:53","guid":{"rendered":"https:\/\/t.n-years.com\/?p=6822"},"modified":"2025-07-23T13:54:53","modified_gmt":"2025-07-23T05:54:53","slug":"%e4%ba%8c%e8%bf%9b%e5%88%b6%e5%9f%ba%e7%ba%bf-%e6%ba%90%e7%a0%81%e5%88%86%e6%94%af%e5%8d%8f%e5%90%8c","status":"publish","type":"post","link":"https:\/\/t.n-years.com\/?p=6822","title":{"rendered":"\u4e8c\u8fdb\u5236\u57fa\u7ebf + \u6e90\u7801\u5206\u652f\u534f\u540c"},"content":{"rendered":"<p>\u4f60\u63cf\u8ff0\u7684\u8fd9\u79cd\u6a21\u5f0f\uff0c\u672c\u8d28\u662f\u201c<strong>\u4e8c\u8fdb\u5236\u57fa\u7ebf+\u6e90\u7801\u5206\u652f\u534f\u540c<\/strong>\u201d\u7684\u6df7\u5408\u65b9\u6848\u2014\u2014\u4ee5\u4e8c\u8fdb\u5236\u7248\u672c\u4f5c\u4e3a\u57fa\u7840\u4f9d\u8d56\u57fa\u7ebf\uff0c\u5f00\u53d1\u9636\u6bb5\u901a\u8fc7\u7ed1\u5b9a\u7279\u5b9acommit id\u5207\u6362\u5230\u6e90\u7801\u5206\u652f\u8fdb\u884c\u534f\u540c\u5f00\u53d1\u3002\u8fd9\u79cd\u6a21\u5f0f\u8bd5\u56fe\u878d\u5408\u4e24\u79cd\u65b9\u6848\u7684\u4f18\u52bf\uff0c\u5728\u5b9e\u9645\u89c4\u6a21\u5316\u573a\u666f\u4e2d\u5f88\u5e38\u89c1\uff0c\u5176\u6838\u5fc3\u903b\u8f91\u548c\u4f18\u52a3\u52bf\u53ef\u4ee5\u8fd9\u6837\u5206\u6790\uff1a<\/p>\n<h3><strong>\u4e00\u3001\u6a21\u5f0f\u6838\u5fc3\u903b\u8f91<\/strong><\/h3>\n<ol>\n<li><strong>\u57fa\u7ebf\u4f9d\u8d56<\/strong>\uff1a\u4e3b\u4ed3\u5e93\u9ed8\u8ba4\u4f9d\u8d56\u5b50\u4ed3\u5e93\u7684<strong>\u6b63\u5f0f\u4e8c\u8fdb\u5236\u7248\u672c<\/strong>\uff08\u5982<code>v1.2.0<\/code>\uff09\uff0c\u4f5c\u4e3a\u7a33\u5b9a\u57fa\u7ebf\u3002<\/li>\n<li><strong>\u5f00\u53d1\u5207\u6362<\/strong>\uff1a\u5f53\u9700\u8981\u4fee\u6539\u5b50\u4ed3\u5e93\u65f6\uff0c\u4e3b\u4ed3\u5e93\u901a\u8fc7\u914d\u7f6e\uff08\u5982<code>podspec<\/code>\u7684<code>commit<\/code>\u5b57\u6bb5\u3001<code>build.gradle<\/code>\u7684<code>git<\/code>\u4f9d\u8d56\uff09\u6307\u5411\u5b50\u4ed3\u5e93\u7684\u7279\u5b9acommit id\uff0c\u5e76\u521b\u5efa\u5bf9\u5e94\u7684\u5f00\u53d1\u5206\u652f\uff08\u5982\u4e3b\u4ed3\u5e93<code>feature\/A<\/code>\u7ed1\u5b9a\u5b50\u4ed3\u5e93<code>feature\/A<\/code>\u7684<code>abc123<\/code> commit\uff09\u3002<\/li>\n<li><strong>\u7248\u672c\u95ed\u73af<\/strong>\uff1a\u5b50\u4ed3\u5e93\u5f00\u53d1\u5b8c\u6210\u540e\uff0c\u5148\u53d1\u5e03\u65b0\u7684\u4e8c\u8fdb\u5236\u7248\u672c\uff08\u5982<code>v1.3.0<\/code>\uff09\uff0c\u518d\u5c06\u4e3b\u4ed3\u5e93\u7684\u4f9d\u8d56\u4ece\u201ccommit id\u6e90\u7801\u4f9d\u8d56\u201d\u5207\u56de\u201c\u4e8c\u8fdb\u5236\u7248\u672c\u4f9d\u8d56\u201d\uff0c\u5b8c\u6210\u95ed\u73af\u3002<\/li>\n<\/ol>\n<h3><strong>\u4e8c\u3001\u6838\u5fc3\u4f18\u52bf<\/strong><\/h3>\n<ol>\n<li>\n<p><strong>\u5e73\u8861\u7a33\u5b9a\u6027\u4e0e\u7075\u6d3b\u6027<\/strong>  <\/p>\n<ul>\n<li>\u65e5\u5e38\u5f00\u53d1\u4ee5\u4e8c\u8fdb\u5236\u4e3a\u57fa\u7ebf\uff0c\u907f\u514d\u4e3b\u4ed3\u5e93\u9891\u7e41\u62c9\u53d6\u6240\u6709\u5b50\u4ed3\u5e93\u6e90\u7801\uff0c\u51cf\u5c11\u7f16\u8bd1\u8d1f\u62c5\uff1b<\/li>\n<li>\u9700\u4fee\u6539\u5b50\u4ed3\u5e93\u65f6\uff0c\u4ec5\u4e34\u65f6\u5207\u6362\u8be5\u5b50\u4ed3\u5e93\u7684\u6e90\u7801\u5206\u652f\uff0c\u4e0d\u5f71\u54cd\u5176\u4ed6\u6a21\u5757\u7684\u4e8c\u8fdb\u5236\u4f9d\u8d56\uff0c\u5b9e\u73b0\u201c\u5c40\u90e8\u6e90\u7801\u5f00\u53d1+\u5168\u5c40\u4e8c\u8fdb\u5236\u7a33\u5b9a\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7cbe\u51c6\u63a7\u5236\u4f9d\u8d56\u8303\u56f4<\/strong>  <\/p>\n<ul>\n<li>\u4e3b\u4ed3\u5e93\u53ef\u9488\u5bf9\u4e0d\u540c\u9700\u6c42\uff0c\u7075\u6d3b\u7ec4\u5408\u201c\u4e8c\u8fdb\u5236\u4f9d\u8d56\u201d\u548c\u201c\u6e90\u7801\u4f9d\u8d56\u201d\uff08\u4f8b\uff1a\u4fee\u6539\u5b50\u4ed3\u5e93A\u65f6\uff0cA\u7528\u6e90\u7801\uff0cB\/C\/D\u4ecd\u7528\u4e8c\u8fdb\u5236\uff09\uff0c\u907f\u514d\u201c\u4e00\u52a8\u5168\u52a8\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7b80\u5316\u8de8\u56e2\u961f\u534f\u540c<\/strong>  <\/p>\n<ul>\n<li>\u5b50\u4ed3\u5e93\u56e2\u961f\u53ef\u72ec\u7acb\u8fed\u4ee3\uff0c\u901a\u8fc7commit id\u5411\u4e3b\u4ed3\u5e93\u56e2\u961f\u63d0\u4f9b\u201c\u5f85\u96c6\u6210\u7684\u6e90\u7801\u7248\u672c\u201d\uff0c\u65e0\u9700\u63d0\u524d\u53d1\u5e03\u4e8c\u8fdb\u5236\u5feb\u7167\uff08SNAPSHOT\uff09\uff0c\u51cf\u5c11\u79c1\u6709\u4ed3\u5e93\u7684\u4e34\u65f6\u7248\u672c\u7ba1\u7406\u6210\u672c\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7248\u672c\u8ffd\u6eaf\u6e05\u6670<\/strong>  <\/p>\n<ul>\n<li>\u4e3b\u4ed3\u5e93\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u5982<code>Podfile.lock<\/code>\u3001<code>gradle.lockfile<\/code>\uff09\u4e2d\uff0c\u4e8c\u8fdb\u5236\u7248\u672c\u548c\u6e90\u7801commit id\u5e76\u5b58\uff0c\u53ef\u7cbe\u786e\u8ffd\u6eaf\u201c\u5f53\u524d\u4f9d\u8d56\u7684\u662f\u54ea\u4e2a\u7248\u672c\/\u54ea\u4e2a\u63d0\u4ea4\u201d\uff0c\u4fbf\u4e8e\u95ee\u9898\u56de\u6eaf\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><strong>\u4e09\u3001\u6f5c\u5728\u6311\u6218<\/strong><\/h3>\n<ol>\n<li>\n<p><strong>\u914d\u7f6e\u590d\u6742\u5ea6\u9ad8<\/strong>  <\/p>\n<ul>\n<li>\u9700\u7ef4\u62a4\u201c\u4e8c\u8fdb\u5236\u7248\u672c\u201d\u4e0e\u201c\u6e90\u7801commit id\u201d\u7684\u6620\u5c04\u5173\u7cfb\uff0c\u5c24\u5176\u591a\u5b50\u4ed3\u5e93\u5e76\u884c\u5f00\u53d1\u65f6\uff0c\u4e3b\u4ed3\u5e93\u914d\u7f6e\u53ef\u80fd\u51fa\u73b0\u201c\u90e8\u5206\u7528\u7248\u672c\u3001\u90e8\u5206\u7528commit\u201d\u7684\u6df7\u5408\u72b6\u6001\uff0c\u589e\u52a0\u4eba\u5de5\u7ef4\u62a4\u6210\u672c\u3002<\/li>\n<li>\u793a\u4f8b\uff08iOS Podfile\uff09\uff1a\n<pre><code class=\"language-ruby\"># \u6df7\u5408\u914d\u7f6e\u793a\u4f8b\npod 'ModuleA', :git => 'git@xxx\/ModuleA.git', :commit => 'abc123' # \u6e90\u7801\u4f9d\u8d56\npod 'ModuleB', '1.2.0' # \u4e8c\u8fdb\u5236\u4f9d\u8d56\npod 'ModuleC', :git => 'git@xxx\/ModuleC.git', :commit => 'def456' # \u6e90\u7801\u4f9d\u8d56<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u51b2\u7a81\u98ce\u9669<\/strong>  <\/p>\n<ul>\n<li>\u82e5\u5b50\u4ed3\u5e93\u7684commit id\u5bf9\u5e94\u7684\u4ee3\u7801\u672a\u4e0e\u4e3b\u4ed3\u5e93\u57fa\u7ebf\u517c\u5bb9\uff08\u5982\u5b50\u4ed3\u5e93A\u7684<code>abc123<\/code>\u4f9d\u8d56ModuleB\u7684<code>v2.0<\/code>\uff0c\u4f46\u4e3b\u4ed3\u5e93\u4ecd\u7528ModuleB\u7684<code>v1.0<\/code>\uff09\uff0c\u4f1a\u51fa\u73b0\u201c\u672c\u5730\u7f16\u8bd1\u6b63\u5e38\uff0c\u96c6\u6210\u5230\u4e3b\u4ed3\u5e93\u5931\u8d25\u201d\u7684\u95ee\u9898\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u6784\u5efa\u7f13\u5b58\u5931\u6548<\/strong>  <\/p>\n<ul>\n<li>\u6e90\u7801\u4f9d\u8d56\u7684\u5b50\u4ed3\u5e93\u6bcf\u6b21\u4fee\u6539commit id\uff0c\u53ef\u80fd\u89e6\u53d1\u4e3b\u4ed3\u5e93\u5bf9\u8be5\u6a21\u5757\u7684\u5168\u91cf\u91cd\u65b0\u7f16\u8bd1\uff08\u800c\u975e\u589e\u91cf\u7f16\u8bd1\uff09\uff0c\u5f53\u591a\u4e2a\u5b50\u4ed3\u5e93\u540c\u65f6\u7528\u6e90\u7801\u4f9d\u8d56\u65f6\uff0c\u6784\u5efa\u901f\u5ea6\u4f18\u52bf\u4f1a\u524a\u5f31\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u6743\u9650\u7ba1\u7406\u590d\u6742<\/strong>  <\/p>\n<ul>\n<li>\u4e3b\u4ed3\u5e93\u5f00\u53d1\u56e2\u961f\u9700\u540c\u65f6\u62e5\u6709\u6240\u6709\u5b50\u4ed3\u5e93\u7684\u6e90\u7801\u8bbf\u95ee\u6743\u9650\uff08\u5373\u4f7f\u5927\u90e8\u5206\u65f6\u95f4\u7528\u4e8c\u8fdb\u5236\uff09\uff0c\u4e0e\u201c\u57fa\u7840\u5e93\u6e90\u7801\u9694\u79bb\u201d\u7684\u9700\u6c42\u51b2\u7a81\uff08\u5982\u67b6\u6784\u56e2\u961f\u53ef\u80fd\u5e0c\u671b\u57fa\u7840\u5e93\u6e90\u7801\u4ec5\u5185\u90e8\u53ef\u89c1\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><strong>\u56db\u3001\u9002\u7528\u573a\u666f\u4e0e\u6280\u672f\u9009\u578b\u5efa\u8bae<\/strong><\/h3>\n<p>\u8fd9\u79cd\u6a21\u5f0f\u66f4\u9002\u5408<strong>\u4e2d\u578b\u56e2\u961f\uff0820-50\u4eba\uff09\u3001\u4e2d\u7b49\u8026\u5408\u5ea6<\/strong>\u7684\u573a\u666f\uff1a<\/p>\n<ul>\n<li>\u56e2\u961f\u5df2\u62c6\u5206\u591a\u4e2a\u5b50\u4ed3\u5e93\uff0c\u4f46\u6a21\u5757\u95f4\u4ecd\u6709\u4e00\u5b9a\u8026\u5408\uff08\u9700\u5076\u5c14\u534f\u540c\u4fee\u6539\uff09\uff1b<\/li>\n<li>\u5e0c\u671b\u4fdd\u6301\u4e3b\u4ed3\u5e93\u7684\u8f7b\u91cf\u5316\uff08\u9ed8\u8ba4\u4e8c\u8fdb\u5236\u4f9d\u8d56\uff09\uff0c\u4f46\u53c8\u9700\u8981\u7075\u6d3b\u7684\u8de8\u6a21\u5757\u8c03\u8bd5\u80fd\u529b\uff1b<\/li>\n<li>\u6682\u672a\u5efa\u7acb\u5b8c\u5584\u7684\u4e8c\u8fdb\u5236\u5feb\u7167\uff08SNAPSHOT\uff09\u7ba1\u7406\u6d41\u7a0b\uff0c\u7528commit id\u4e34\u65f6\u66ff\u4ee3\u3002<\/li>\n<\/ul>\n<p><strong>\u843d\u5730\u5173\u952e<\/strong>\uff1a<\/p>\n<ol>\n<li><strong>\u5de5\u5177\u81ea\u52a8\u5316<\/strong>\uff1a\u7528\u811a\u672c\u81ea\u52a8\u751f\u6210\u201c\u4e8c\u8fdb\u5236\u7248\u672c\u2192commit id\u201d\u7684\u6620\u5c04\u8868\uff0c\u907f\u514d\u4eba\u5de5\u914d\u7f6e\u9519\u8bef\uff08\u4f8b\uff1a\u5b50\u4ed3\u5e93\u53d1\u5e03<code>v1.3.0<\/code>\u65f6\uff0c\u81ea\u52a8\u8bb0\u5f55\u5176\u5bf9\u5e94\u7684commit id\u5230\u4e3b\u4ed3\u5e93\u914d\u7f6e\u4e2d\uff09\u3002<\/li>\n<li><strong>\u5206\u652f\u7b56\u7565\u7ed1\u5b9a<\/strong>\uff1a\u4e3b\u4ed3\u5e93\u7684\u5f00\u53d1\u5206\u652f\u4e0e\u5b50\u4ed3\u5e93\u7684\u5f00\u53d1\u5206\u652f\u5f3a\u7ed1\u5b9a\uff08\u5982\u4e3b\u4ed3\u5e93<code>feature\/order<\/code>\u5fc5\u987b\u4f9d\u8d56\u5b50\u4ed3\u5e93<code>feature\/order<\/code>\u7684commit\uff09\uff0c\u907f\u514d\u8de8\u5206\u652f\u4f9d\u8d56\u6df7\u4e71\u3002<\/li>\n<li><strong>CI\u6821\u9a8c<\/strong>\uff1a\u4e3b\u4ed3\u5e93\u63d0\u4ea4\u4ee3\u7801\u65f6\uff0cCI\u81ea\u52a8\u68c0\u6d4b\u6240\u6709\u6e90\u7801\u4f9d\u8d56\u7684\u5b50\u4ed3\u5e93\u662f\u5426\u4e0e\u4e8c\u8fdb\u5236\u57fa\u7ebf\u517c\u5bb9\uff08\u5982\u901a\u8fc7\u63a5\u53e3\u6d4b\u8bd5\u3001\u5355\u5143\u6d4b\u8bd5\u9a8c\u8bc1\uff09\uff0c\u63d0\u524d\u66b4\u9732\u51b2\u7a81\u3002<\/li>\n<\/ol>\n<h3><strong>\u603b\u7ed3<\/strong><\/h3>\n<p>\u8fd9\u79cd\u201c\u4e8c\u8fdb\u5236\u57fa\u7ebf+commit id\u6e90\u7801\u5207\u6362\u201d\u7684\u6a21\u5f0f\uff0c\u662f\u4ece\u201c\u4e3b\u4ed3\u5e93\u5168\u6e90\u7801\u4f9d\u8d56\u201d\u5411\u201c\u5168\u4e8c\u8fdb\u5236\u4f9d\u8d56\u201d\u8fc7\u6e21\u7684\u4e2d\u95f4\u5f62\u6001\uff0c\u517c\u987e\u4e86\u7a33\u5b9a\u6027\u548c\u534f\u540c\u6548\u7387\u3002\u4f46\u968f\u7740\u56e2\u961f\u89c4\u6a21\u548c\u5b50\u4ed3\u5e93\u6570\u91cf\u589e\u957f\uff08\u5982\u8d85\u8fc750\u4e2a\u5b50\u4ed3\u5e93\uff09\uff0c\u5efa\u8bae\u9010\u6b65\u5411\u201c\u5b50\u4ed3\u5e93\u72ec\u7acbDemo+\u4e3b\u4ed3\u5e93\u4e8c\u8fdb\u5236\u5347\u7ea7\u201d\u6a21\u5f0f\u6f14\u8fdb\uff0c\u901a\u8fc7\u66f4\u4e25\u683c\u7684\u63a5\u53e3\u5951\u7ea6\u548c\u4e8c\u8fdb\u5236\u7248\u672c\u7ba1\u7406\uff0c\u964d\u4f4e\u914d\u7f6e\u590d\u6742\u5ea6\u548c\u6743\u9650\u6210\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u63cf\u8ff0\u7684\u8fd9\u79cd\u6a21\u5f0f\uff0c\u672c\u8d28\u662f\u201c\u4e8c\u8fdb\u5236\u57fa\u7ebf+\u6e90\u7801\u5206\u652f\u534f\u540c\u201d\u7684\u6df7\u5408\u65b9\u6848\u2014\u2014\u4ee5\u4e8c\u8fdb\u5236\u7248\u672c\u4f5c\u4e3a\u57fa\u7840\u4f9d\u8d56\u57fa\u7ebf\uff0c\u5f00\u53d1\u9636\u6bb5\u901a\u8fc7\u7ed1&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/t.n-years.com\/?p=6822\">\u9605\u8bfb\u66f4\u591a<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-6822","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6822"}],"version-history":[{"count":1,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6822\/revisions"}],"predecessor-version":[{"id":6823,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6822\/revisions\/6823"}],"wp:attachment":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}