Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update last release's CHANGELOG with some tips #215

Merged
merged 5 commits into from Dec 1, 2016

Conversation

AliSoftware
Copy link
Collaborator

@AliSoftware AliSoftware commented Nov 29, 2016

Note that we should also think about providing an error message when swiftgen images is passed a non-xcassets directory (instead of making the command line succeed without error but have the generated file contain "// No images found")

\cc @djbe
\ref #175 #214 (imports)
\ref #199 #207 (assets catalogs)
\ref #213 (multiple paths)

Note that we should also think about providing an error message when `swiftgen images` is passed a non-`xcassets` directory (instead of making the command line succeed without error but have the generated file contain "// No images found")
@djbe
Copy link
Member

djbe commented Nov 29, 2016

We'll have to do this based on the "extension" of the folder, because actool happily tries to parse a folder structure but does not then "dive" into catalog "files", and ignores any other files. Sample output from xcrun actool --print-contents UnitTests/:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.actool.catalog-contents</key>
	<array>
		<dict>
			<key>children</key>
			<array>
				<dict>
					<key>filename</key>
					<string>expected</string>
				</dict>
				<dict>
					<key>filename</key>
					<string>Filters</string>
				</dict>
				<dict>
					<key>children</key>
					<array>
						<dict>
							<key>filename</key>
							<string>Fonts</string>
						</dict>
						<dict>
							<key>filename</key>
							<string>Storyboards-iOS</string>
						</dict>
						<dict>
							<key>filename</key>
							<string>Storyboards-OSX</string>
						</dict>
					</array>
					<key>filename</key>
					<string>fixtures</string>
				</dict>
				<dict>
					<key>filename</key>
					<string>TestSuites</string>
				</dict>
			</array>
			<key>filename</key>
			<string>UnitTests</string>
		</dict>
	</array>
</dict>
</plist>

@AliSoftware
Copy link
Collaborator Author

AliSoftware commented Nov 29, 2016

Yeah, I was more thinking about checking each file extension before invoking actool on each of them. I'll let you implement that on the upcoming PR you talked about in #213, so I guess we can merge this one as soon as the CI is ok?

@@ -38,7 +38,7 @@
* The `swiftgen images` command now uses the `actool` utility to parse asset catalogs,
ensuring that the parser correctly handles namespaced folders.
 ⚠️ Note that you now have to specify the exact path to your `.xcassets` assets catalogs
 when using `swiftgen images` (and not just a directory to parse)
 when using `swiftgen images` (and not just a directory to parse).
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahaha for once it's me who misformatted the CHANGELOG 😆

@djbe djbe added this to the Next patch (4.0.1) milestone Nov 29, 2016
@djbe
Copy link
Member

djbe commented Nov 29, 2016

Jup, #217 should be merged alongside this.

@AliSoftware
Copy link
Collaborator Author

Cool!

CI might take some time, it seems like Travis is having issues again: https://www.traviscistatus.com/incidents/nq0sf0srvx8s

@djbe djbe merged commit e18f0ac into master Dec 1, 2016
@djbe djbe deleted the AliSoftware-fix-changelog-4.0.0 branch December 1, 2016 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants