Skip to content

Commit

Permalink
docs: Add android readme
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 22, 2024
1 parent 6c7e03b commit c0a9fb8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/fetch-icons/generators/generateAndroidIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { createFolder, toSnakeCase } from "../../utils/fileUtils.js";
*/
export const generateAndroidIcons = (outputDir: string, iconManifest: IconManifest) => {
createFolder(outputDir);
copyReadme(outputDir);
for (const icon of iconManifest) {
const definition = icon[1];
const svg = readFileSync(definition.roundPath).toString();
Expand Down Expand Up @@ -55,3 +56,13 @@ export const extractPath = (svgData: string): string => {
}
return path;
};

/**
* Copies the README file to the output directory.
* This is useful for users to understand how to use the generated icons, but is also useful for the CI/CD pipeline so that for every version release there will be a change.
* @param outputDir - The android output directory.
*/
const copyReadme = (outputDir: string) => {
const readme = readFileSync("./scripts/fetch-icons/templates/android-readme.md.template").toString();
writeFileSync(`${outputDir}/README.md`, readme);
};
7 changes: 7 additions & 0 deletions scripts/fetch-icons/templates/android-readme.md.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- x-release-please-start-version -->

# Zeta Icons v0.8.1

<!-- x-release-please-end -->

The icons in this directory are part of the Zeta Icons library. To see a full list of icons, visit [Zeta Icons](https://design.zebra.com/icons)

0 comments on commit c0a9fb8

Please sign in to comment.