Github corrupting .png files on download (resolved)
Hi $all,
I have now uploaded fresh source with the correct git attributes to all our repositories and I did some spot checks of importing libraries from JSON which I knew contained .png files. As I said before, simply updating the .gitattributes file with the lines below was not enough, although a little more than I originally thought was required. I had to also physically remove the library source on github and then replace it with a fresh source, before the downloads were free of corruption. This suggests to me that the corruption to the .png file occurs on the upload, not just the download. For anyone who needs to know, I used the following steps, which worked for me.
– updated .gitattributes file with these lines
> # Declare files that will always have CRLF line endings on checkout.
> * .omh text eol=crlf
> # Prevent png images from being normalised
> * .png -text
( I use Atom to edit these files as this appears to be the suggested default repository editor but Sublime works too)
– removed the library folder from the src folder in my local repository
– committed the changes and updated github online.
– replaced the library folder in the src folder in my local repository
– committed the changes and updated github online
Hope this helps anyone who encounters similar problems.
Regards,
Michael
> On 15 Feb 2018, at 23:59, Michael Monschau <michael@brainydata.co.uk> wrote:
>
> Hi $all,
>
> After doing some reading and some testing that I carried out on our OGanttProjectManager Library on github, I have figured out that a additional line needs to be added to .gitattributes so the file now reads
>
> # Declare files that will always have CRLF line endings on checkout.
> * .omh text eol=crlf
> # Prevent png images from being normalized
> * .png -text
>
> However just changing .gitattributes was not enough, I also had to re-export the original library so that the repository via the Github desktop app received a fresh copy of the entire source. Now when I download OGanttProjectManager from github and import the JSON, everything is fine.
>
> Alex, perhaps this needs adding to your documentation on omnis.ci.
>
> I will now go and update all our other libraries with this change.
>
> Regards,
> Michael
>
>
>> On 15 Feb 2018, at 22:44, Michael Monschau <michael@brainydata.co.uk> wrote:
>>
>> Hi $all,
>>
>> Just discovered that some of our libraries we uploaded contain .png files in the src, such as images from #ICONS, but when downloading the source from github as a zip, the .png files are corrupt and will not import when trying to build the library from JSON, which fails. I followed Alex’s instructions and exported and reimported the libraries as a test, I never tried downloading the src once it was uploaded and importing from the downloaded source. Has anyone else tried to do that with libraries that contain images?
>>
>> I have created the correct .gitattributes file which contains the lines as specified in Alex’s document. But github should be able to handle .png files I would have thought. Does anyone have any ideas?
>>
>> Regards,
>> Michael
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com