<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Markus Cadonau</title>
    <description>The latest articles on DEV Community by Markus Cadonau (@cadonau).</description>
    <link>https://dev.to/cadonau</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F5523%2F8995a1c6-435f-48e2-95a3-e52b23fe07a3.png</url>
      <title>DEV Community: Markus Cadonau</title>
      <link>https://dev.to/cadonau</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cadonau"/>
    <language>en</language>
    <item>
      <title>AVIF Images in iOS 16.0’s Safari</title>
      <dc:creator>Markus Cadonau</dc:creator>
      <pubDate>Thu, 03 Nov 2022 07:54:30 +0000</pubDate>
      <link>https://dev.to/cadonau/avif-images-in-ios-160s-safari-1kkc</link>
      <guid>https://dev.to/cadonau/avif-images-in-ios-160s-safari-1kkc</guid>
      <description>&lt;p&gt;I noticed that some of my (&lt;a href="https://www.cadonau.net/photos/"&gt;album cover&lt;/a&gt;) photos don’t display in Safari on the newly released iOS 16. Xe Iaso had already &lt;a href="https://xeiaso.net/blog/avif-help-requested"&gt;posted about problems&lt;/a&gt;, as well. To me, it looks like the exact same issue: AVIF images encoded with &lt;a href="https://github.com/Kagami/go-avif"&gt;&lt;code&gt;go-avif&lt;/code&gt;&lt;/a&gt; appear broken.&lt;br&gt;&lt;br&gt;
As there is a &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=245097"&gt;WebKit bug report&lt;/a&gt; now, I’m wondering whether the encoding is actually the problem, as the images have also been showing fine in Firefox and Chrome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update
&lt;/h2&gt;

&lt;p&gt;The issue is &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=244103"&gt;fixed&lt;/a&gt; in iOS &lt;a href="https://webkit.org/blog/13399/webkit-features-in-safari-16-1/"&gt;16.1’s Safari&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fixed some AVIF images not rendering because of their container format.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(Changing the “major brand” from &lt;code&gt;mif1&lt;/code&gt; to &lt;code&gt;avif&lt;/code&gt; in the &lt;a href="https://en.wikipedia.org/wiki/ISO_base_media_file_format#File_type_box"&gt;file type box&lt;/a&gt; of the images would have also worked.)&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>DeployBot Configuration with Git LFS</title>
      <dc:creator>Markus Cadonau</dc:creator>
      <pubDate>Mon, 18 Oct 2021 06:20:03 +0000</pubDate>
      <link>https://dev.to/cadonau/deploybot-configuration-with-git-lfs-55i5</link>
      <guid>https://dev.to/cadonau/deploybot-configuration-with-git-lfs-55i5</guid>
      <description>&lt;p&gt;I recently started using Git LFS for image and video files in an existing repository. Migrating the repository to Git LFS would be another Odyssean story.&lt;/p&gt;

&lt;p&gt;However, since I’m using DeployBot to deploy the repository to a web server, I also had to make sure &lt;em&gt;it&lt;/em&gt; would handle the files properly, i.e. the actual image files, not the text pointers would be transferred to the host.&lt;br&gt;&lt;br&gt;
An answer to DeployBot’s “&lt;a href="https://support.deploybot.com/article/63-common-questions-about-build-tools"&gt;common questions about build tools&lt;/a&gt;” says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unfortunately, we do not yet support LFS by default. But it is possible to use Git LFS right now by using build tools. Inside the container, you are free to install the LFS plugin and set things up yourself. You could also use a command to install the LFS distribution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It took me a while to figure out how to do it but I think it now works for my scenario. It’s probably not ideal; I will try to update this post, if I change my configuration. Let me go through what I’ve tried:&lt;/p&gt;

&lt;h2&gt;
  
  
  First Attempt
&lt;/h2&gt;

&lt;p&gt;I started &lt;a href="https://support.deploybot.com/article/61-setting-up-and-using-build-tools"&gt;configuring my own container&lt;/a&gt; based on the existing Ubuntu 18.04 one with the&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Build commands&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt install git-lfs
git lfs install --system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;to install Git LFS and set its Git hooks up.&lt;br&gt;&lt;br&gt;
That alone was not sufficient. Git LFS was set up — so I kept the setting — but text pointers were being deployed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Second Attempt
&lt;/h2&gt;

&lt;p&gt;In the deployment server settings, by adding the following commands to the &lt;a href="https://support.deploybot.com/article/61-setting-up-and-using-build-tools"&gt;Build Tools&lt;/a&gt; section&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Compile, compress, or minimize your code&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /source/
git lfs pull
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I tried to make Git LFS replace the text pointers with the media files. Yet, text pointers were still being deployed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Third Attempt
&lt;/h2&gt;

&lt;p&gt;Realizing that the files weren’t being pulled from my original (Github) repository, I modified&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Compile, compress, or minimize your code&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /source/
git remote set-url origin %REPO_URL%
git lfs pull
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;so that the ”origin” remote was set to my repository, not to some intermediate one by DeployBot.&lt;br&gt;&lt;br&gt;
While this worked, DeployBot viewed all LFS files as different and always deployed all of them again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fourth Attempt
&lt;/h2&gt;

&lt;p&gt;Once again, I modified&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Compile, compress, or minimize your code&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /source/
git checkout -b deploy %PREVIOUS_COMMIT%
git remote set-url origin %REPO_URL%
git pull origin %BRANCH%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;to only pull the files from my repository that were modified since the last deployed commit.&lt;br&gt;&lt;br&gt;
This worked until I had to roll back for the first time since making these configuration modifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fifth Attempt
&lt;/h2&gt;

&lt;p&gt;So I first made sure that a rollback was not happening by using a conditional statement in&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Compile, compress, or minimize your code&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /source/
if [ %ROLLBACK?% != 1 ]; then
    git checkout -b deploy %PREVIOUS_COMMIT%
    git remote set-url origin %REPO_URL%
    git pull origin %BRANCH%
fi   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Sixth Attempt (November 2021 Update)
&lt;/h2&gt;

&lt;p&gt;After some renamed/moved LFS files had — once again — not been properly pulled and deployed, I realized that the “deploy” branch could not be created on DeployBot instances where it already existed (from a recent deployment) resulting in a failed checkout.&lt;br&gt;&lt;br&gt;
By making the option uppercase I think I finally managed to configure DeployBot with Git LFS to my satisfaction. For completeness sake, I’m including all parts of my current configuration, again:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Build commands&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt install git-lfs
git lfs install --system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Compile, compress, or minimize your code&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /source/
if [ %ROLLBACK?% != 1 ]; then
    git checkout -B deploy %PREVIOUS_COMMIT%
    git remote set-url origin %REPO_URL%
    git pull origin %BRANCH%
fi   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>git</category>
      <category>lfs</category>
      <category>deployment</category>
    </item>
  </channel>
</rss>
