<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Atul anand on Medium]]></title>
        <description><![CDATA[Stories by Atul anand on Medium]]></description>
        <link>https://medium.com/@atul.dc?source=rss-25b8b648ed75------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*drFpr4DoHBMmg4a6PjxUpw.jpeg</url>
            <title>Stories by Atul anand on Medium</title>
            <link>https://medium.com/@atul.dc?source=rss-25b8b648ed75------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 19:40:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@atul.dc/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Increment Build Number using Fastlane]]></title>
            <link>https://medium.com/@atul.dc/increment-build-number-using-fastlane-c12b4b886ea3?source=rss-25b8b648ed75------2</link>
            <guid isPermaLink="false">https://medium.com/p/c12b4b886ea3</guid>
            <category><![CDATA[fastlane]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Atul anand]]></dc:creator>
            <pubDate>Sat, 28 Mar 2020 19:57:12 GMT</pubDate>
            <atom:updated>2020-03-28T19:57:12.238Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*mpBHBsTu-KNsIwbKN5m8Vw.png" /></figure><p><em>My Flutter and swift skills are much better than my English</em> So, here is a small demo to showcase my skill ;).</p><p>I think Incrementing build no. for an application is not a big deal for you all.</p><p>Yes, it is not a big deal in IOS applications if we use fastlane but what about Android, how do we implement it in android applications is a big question.</p><p>First lets see how it works in IOS.</p><pre>lane :Build do<br><br>     ENV[&quot;FASTLANE_ITC_TEAM_ID&quot;] = &quot;YOUR TEAM ID”<br>            increment_build_number({<br>                     build_number: latest_testflight_build_number +1<br>                   })<br>     build_ios_app(<br>             scheme: &quot;Runner&quot;,<br>             clean: true,<br>            export_method: &quot;app-store&quot;,<br>            output_directory: &quot;./Runner&quot;,<br><br>          )<br>          upload_to_testflight(<br>           ipa: &quot;./Runner/Runner.ipa&quot;,<br>           skip_waiting_for_build_processing: &quot;true&quot;<br>          )<br><br>end</pre><blockquote>for android, there is <strong>no action</strong> available on Fastlane So,</blockquote><p>There are 3 methods</p><ol><li>Create your Fastlane action just type fastlane new_action (basic idea about ruby?)</li><li>Fetch current version from play store using</li></ol><p>versions = google_play_track_version_codes(track: “beta”)</p><p>version = (versions[0]+1),</p><p>Write a shell script open build.gradel increment version-code + 1 and push. back to git.</p><p>3. If you are too lazy like me then this is the write method for you :P</p><h4>so you just need to add 3 lanes in you fast file</h4><h4>1. Increment build number is for increment you build number.</h4><h4>2. IMPORTANT :- git-push is very important because when it runs on pipeline you need to push back your changes to the origin.</h4><h4>3 .Play store is easy and available in Fastlane docs as well</h4><pre>lane :IncrementBuildNumber do<br><br>    path = &#39;../app/build.gradle&#39;<br>    re = /versionCode\s+(\d+)/<br>    s = File.read(path)<br>    versionCode = s[re, 1].to_i<br>    s[re, 1] = (versionCode + 1).to_s<br>    f = File.new(path, &#39;w&#39;)<br>    f.write(s)<br>    f.close<br><br>end<br><br>lane :gitpush do<br><br>        git_add<br>        git_commit(path: &quot;*&quot;, message: &quot;Version&quot;)<br>        push_to_git_remote<br><br><br>end<br><br>lane :playstore do<br><br>    upload_to_play_store(track: &#39;beta&#39;,<br>    aab_paths: &#39;yourpath.aab&#39;,<br>    skip_upload_apk: false,<br>    skip_upload_metadata: false,<br>    skip_upload_images: true,<br>    skip_upload_screenshots: true,<br>    skip_upload_aab: false,<br>    json_key: &quot;your.json&quot;,<br>    )<br><br><br><br>end</pre><p>That&#39;s it,</p><p>Good Luck have fun</p><p>query ? :</p><p>atul.dc@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c12b4b886ea3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter CI/CD = Fastlane+gitlab-runner+TestFairy]]></title>
            <link>https://medium.com/@atul.dc/flutter-ci-cd-fastlane-gitlab-runner-testfairy-8c24df1ba1c9?source=rss-25b8b648ed75------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c24df1ba1c9</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[gitlab-runner]]></category>
            <category><![CDATA[fastlane]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[testflight]]></category>
            <dc:creator><![CDATA[Atul anand]]></dc:creator>
            <pubDate>Sun, 11 Aug 2019 18:15:56 GMT</pubDate>
            <atom:updated>2019-08-11T18:15:56.484Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rturD-j-WgpWOCIo3bfL_g.png" /></figure><p>In this tutorial, we will be setting up CI/CD environment for your Flutter projects using Fastlane with Gitlab runner. Here, we are using Gitlab-runner only to trigger Fastlane because Fastlane is capable enough to build the code and deployment on testfairy.</p><p>If we are using Fastlane we need to pull a code every time and switch to each android and ios folder then write a command manually. After gitlab-runner and Fastlane integration we are able to mitigate the manual task</p><p>In Simple worlds — Build a code in every git commit or push :)</p><p><strong>Prerequisite</strong></p><p>You are all set with the android and ios build with flutter</p><p>Let’s Started</p><ol><li>Install Fastlane</li></ol><p><a href="https://flutter.dev/docs/deployment/cd">Continuous delivery with Flutter</a></p><blockquote>2. After installation go to your project cd ios, cd android and run the command Fastlane init</blockquote><p>then you have a folder structure like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*fHEPNw-s_le7_jxfVHaoFQ.png" /></figure><p>There are many tutorials for Fastlane over the internet but they are very confusing so we need basic command in Fastlane or you can create your own custom commands.</p><p>Example of Fastfile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K4pbkCNdVoQTB6xv0WuByw.png" /></figure><p>These commands are more than enough to build test (in this SS test commands are not present)and deploy over and distributed app like HOCKEY, Testfairy.</p><p><strong>Gitlab Runner Integration</strong></p><p>First, we will add a <em>.gitlab-ci.yml</em> file to the root directory of the project by terminal:</p><p>touch .gitlab-ci.yml</p><p>Now, we will install Gitlab Runner on MacOS.</p><ol><li>Download the binary for your system:</li></ol><pre>$ sudo curl — output /usr/local/bin/gitlab-runner <a href="https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64">https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64</a></pre><p>2. Give it permissions to execute:</p><pre>$ sudo chmod +x /usr/local/bin/gitlab-runner</pre><p>After you installed Runner, you need to register runner for your project.</p><ol><li>Run the following command:</li></ol><pre>$ gitlab-runner register</pre><p>2. Enter your GitLab instance URL:</p><pre>Please enter the gitlab-ci coordinator URL (e.g. <a href="https://gitlab.com/">https://gitlab.com</a>) <a href="https://gitlab.com/">https://gitlab.com</a></pre><p>3. Enter the token you obtained to register the Runner. You can get your token in <strong>Gitlab Setting</strong> -&gt; <strong>CI/CD</strong> -&gt; <strong>Runner</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/0*Ok-gEjxWZhayNXhR.png" /></figure><pre>Please enter the gitlab-ci token for this runner<br>Your token</pre><p>4. Enter the <a href="https://docs.gitlab.com/ee/ci/runners/#using-tags">tags associated with the Runner</a>, you can change this later in GitLab’s UI:</p><pre>Please enter the gitlab-ci tags for this runner (comma separated): ios</pre><p>5. Enter the <a href="https://docs.gitlab.com/runner/executors/README.html">Runner executor</a>:</p><pre>Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:<br> shell</pre><p>If you don&#39;t know your executor select ‘shell’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*oQ7k_b9-CZ3785C2kc_KKw.png" /></figure><p>My .yml file looks like this.</p><p>If all looks good then after every commit on Dev branch build will be triggered and tester got a new mail with the new build from testfairy.</p><h4>IF you got any error don’t panic just take a deep breath.</h4><ol><li>You need to give permissions to your folder.</li><li>Sometimes you need to run a Pod install.</li><li>You may need to delete Runner.xcworkspace.</li><li>Open your ios project in Xcode and add certificates stuff there.</li></ol><p>Any Query Please write on ~ . atul.dc@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c24df1ba1c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>