Skip to content

Anthropic built Scion for itself. Carbon Forge is yours →

Carbon Forge
Menu

गाइड

Carbon Forge में रिलीज़ काटें और उसे GitHub पर पुश करें

cut वर्कस्पेस के एक सील किए snapshot को नाम देता है और कभी नहीं खिसकता, इसलिए जब तक वर्कस्पेस है, रिलीज़ का एक ही जवाब होता है। git उस रिकॉर्ड का एक प्रक्षेपण है: यह गाइड एक रिलीज़ काटती है और उसे GitHub पर पुश करती है।

अन्य भाषाओं में: English, Español, Português, 日本語, Deutsch, Français, 한국어, 简体中文, Italiano · हिन्दी में सभी गाइड

खुलासा: Carbon Forge को हम 100monkeys.ai पर बनाते हैं, इसलिए इसे बनाने वाले का विवरण मानकर पढ़ें। इस गाइड का मसौदा हमारे एक AI एजेंट ने सार्वजनिक दस्तावेज़ों से तैयार किया, ख़ासकर Code and files on the substrate के "Cut a release" और "Publish to git" हिस्सों, Archives कैटलॉग पन्ने और Source control settings से, और कंपनी ने इसकी समीक्षा की; यह हिन्दी संस्करण मूल अंग्रेज़ी गाइड का अनुवाद है। हर कॉल दस्तावेज़ों का अपना उदाहरण है, और उद्धरण अंग्रेज़ी में हैं, अनुवाद साथ में। जहाँ दस्तावेज़ कोई सवाल खुला छोड़ते हैं, आख़िरी हिस्सा यह बताता है।

दो वाक्यों में मॉडल

"A cut names the whole workspace's state at one moment and never moves." (cut पूरे वर्कस्पेस की एक पल की स्थिति को नाम देता है और कभी नहीं खिसकता।) "The git archive renders a code tree as git: one commit per tree revision, whose message is the landing's intent, and an annotated tag refs/tags/nn/<cut> per cut, whose message carries the cut's notes." (git आर्काइव किसी कोड ट्री को git के रूप में बनाता है: ट्री के हर revision का एक commit, जिसका संदेश लैंडिंग का intent होता है, और हर cut का एक annotated tag, जिसके संदेश में cut के नोट्स होते हैं।) क्योंकि यह "from the record byte for byte, so the same revision always renders to the same commit" (रिकॉर्ड से byte दर byte बनता है, इसलिए एक ही revision हमेशा एक ही commit बनाता है), GitHub की कॉपी को कभी भी रिकॉर्ड से मिलाया जा सकता है।

चरण 1. वह काम लैंड करें जो रिलीज़ में होना चाहिए

cut trunk को नाम देता है, इसलिए जो कुछ अब भी किसी lane पर है वह उसमें नहीं है। पहले वह लैंड करें जो रिलीज़ में होना चाहिए, ऐसे intent के साथ जो feat, fix, docs, chore या revert से शुरू हों: वही पहला शब्द तय करता है कि नोट्स हर लैंडिंग को किस समूह में रखें (कोड बदलाव और उसका दस्तावेज़ एक ही changeset में लैंड करें एक लैंडिंग से गुज़रती है)।

चरण 2. रिलीज़ का cut बनाएँ

snapshots.cut { "name": "v1.4.0" }

cut स्थायी है। paradigm पन्ना कहता है "the database refuses to change or remove a snapshot or a cut while the workspace exists." (जब तक वर्कस्पेस मौजूद है, डेटाबेस किसी snapshot या cut को बदलने या हटाने से इनकार करता है।) snapshots.materialize किसी भी इकाई को वैसा पढ़ता है जैसा cut में है, और trees.diff व trees.grep भी snapshot लेते हैं।

चरण 3. रिलीज़ नोट्स पढ़ें

cuts.notes { "from": "v1.3.0", "to": "v1.4.0" }

cuts.notes "lists every changeset landed between the two cuts, grouped by the first word of its intent" (दोनों cut के बीच लैंड हुए हर changeset की सूची देता है, उसके intent के पहले शब्द के हिसाब से समूह में), साथ में वह lane जिससे वह लैंड हुआ और जिन पाथ को उसने छुआ; path_glob इसे वर्कस्पेस के एक हिस्से तक सीमित करता है। ऐप में /<workspace>/cuts/<name> उन्हीं नोट्स पर खुलता है, Notes from <previous cut> शीर्षक के साथ, और Compare with another cut कोई भी दो चुनता है।

चरण 4. इंस्टेंस से एक GitHub अकाउंट जोड़ें

पुश "as the instance's GitHub App" (इंस्टेंस के GitHub App के रूप में) जाता है, इसलिए App उस अकाउंट पर इंस्टॉल होना चाहिए जिसकी रिपॉज़िटरी है। इंस्टेंस एडमिन Settings → Instance → Source control खोलकर Connect a GitHub account दबाता है, जो ब्राउज़र को "GitHub's install page for the CarbonForge.dev GitHub App" (CarbonForge.dev GitHub App के लिए GitHub का इंस्टॉल पन्ना) पर भेजता है। वहाँ आप अकाउंट या संगठन और रिपॉज़िटरी चुनते हैं। दस्तावेज़ों में दी गई अनुमतियाँ:

Carbon Forge में लौटने पर टैब Connected to @<account> दिखाता है।

चरण 5. git आर्काइव बनाएँ और जाँचें

archives.render { "tree": "app", "cut": "v1.4.0" }
archives.verify { "tree": "app", "cut": "v1.4.0" }

Render ट्री के commits और cut का tag आर्काइव में लिखता है; verify आर्काइव की स्थिति और, अगर कोई हो, पहला अंतर बताता है। cut के पन्ने पर वर्कस्पेस एडमिन के पास यही Render और Verify बटन हैं, और हर जवाब हूबहू दिखाया जाता है: Rendered: tag <id>, Verify: <status>।

चरण 6. remote सेट करें

archives.set_remote { "tree": "app", "remote": "https://github.com/acme/app.git" }

remote https://github.com/<owner>/<repo>.git के रूप में लिखा जाता है। यह Settings → Workspace → Source control में हर रिपॉज़िटरी का Remote फ़ील्ड भी है। इसे सेट करने के लिए वर्कस्पेस एडमिन होना ज़रूरी है, "because the remote decides where the archive is published" (क्योंकि remote तय करता है कि आर्काइव कहाँ प्रकाशित होगा)।

चरण 7. पुश करें

archives.push { "tree": "app" }

"The push sends the remote only what it lacks, fast-forward only, as the instance's GitHub App, and refuses rather than move main backwards or move a tag." (पुश remote को सिर्फ़ वही भेजता है जो उसके पास नहीं है, सिर्फ़ fast-forward, इंस्टेंस के GitHub App के रूप में, और main को पीछे ले जाने या tag खिसकाने के बजाय मना कर देता है।) यह एक job के रूप में कतार में लगता है (Push queued as job <id>.)। इनकार अपना कारण बताते हैं, जैसे The tree <path> has no archive remote; set one with archives.set_remote, and nothing was pushed., या ऐसा इनकार जो कहता है कि आर्काइव "has no rendered cut" (में कोई बना हुआ cut नहीं है)। GitHub का इनकार The remote refused <ref>: <reason>. के रूप में, GitHub के अपने कारण के साथ लौटता है।

"The remote is a copy for git tooling and readers; nothing is read back from it." (remote git टूल और पाठकों के लिए एक कॉपी है; उससे कुछ वापस नहीं पढ़ा जाता।) काम Carbon Forge में जारी रहता है, और अगला cut फिर से पुश करता है।

चरण 8. डिप्लॉय को वापस पढ़ें

"Once a cut is pushed, its deploy can be read back" (cut पुश हो जाने के बाद उसका डिप्लॉय वापस पढ़ा जा सकता है): archives.deploy_status cut के commit के लिए remote के GitHub Actions runs लौटाता है, अधिकतम 100, एक सारांश के साथ, "and the record still takes nothing from the remote." (और रिकॉर्ड अब भी remote से कुछ नहीं लेता।) cuts इंडेक्स हर ट्री को pushed, tagged या not rendered चिह्नित करता है। cut.taken या archive.pushed पर webhook किसी डिप्लॉय स्क्रिप्ट को बिना polling के ख़बर देता है।

दस्तावेज़ किन सवालों का जवाब नहीं देते

संबंधित गाइड

एक बार काटें। GitHub पर पुश करें।