{"id":19442411,"url":"https://github.com/ackeecz/tapestry","last_synced_at":"2025-04-25T00:31:49.818Z","repository":{"id":48748290,"uuid":"200710927","full_name":"AckeeCZ/tapestry","owner":"AckeeCZ","description":"Generate and maintain Swift frameworks with support for Cocoapods, Carthage and SPM","archived":false,"fork":false,"pushed_at":"2022-10-06T07:24:12.000Z","size":14373,"stargazers_count":65,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-15T00:06:29.020Z","etag":null,"topics":["cli","generate","swift","swift-framework","swift-package-manager"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AckeeCZ.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-05T18:47:14.000Z","updated_at":"2022-03-25T02:24:38.000Z","dependencies_parsed_at":"2023-01-19T09:45:15.723Z","dependency_job_id":null,"html_url":"https://github.com/AckeeCZ/tapestry","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ftapestry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ftapestry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ftapestry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Ftapestry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AckeeCZ","download_url":"https://codeload.github.com/AckeeCZ/tapestry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223974790,"owners_count":17234718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","generate","swift","swift-framework","swift-package-manager"],"created_at":"2024-11-10T15:39:14.460Z","updated_at":"2024-11-10T15:39:15.166Z","avatar_url":"https://github.com/AckeeCZ.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![ackee|Tapestry](Resources/cover-image.png)\n[![Build Status](https://travis-ci.com/AckeeCZ/tapestry.svg?branch=master)](https://travis-ci.com/AckeeCZ/tapestry)\n\n## What's Tapestry 🤔\n\nTapestry helps you with **creating** and **managing** your Swift frameworks 💫\n\nDo you want to easily create a Swift framework that supports [Carthage][carthage], [Cocoapods][cocoapods] and [SPM][spm]?\n\nOr define your release steps in a type-safe way?\n\nWell, look no further, `tapestry` shall help you with exactly that!\n\n## Projects Using Tapestry\n\n| Project  | Repository                                                                             |\n| -------- | -------------------------------------------------------------------------------------- |\n| XcodeProj| [tuist/XcodeProj](https://github.com/tuist/xcodeproj)                               |\n| ACKategories | [AckeeCZ/ACKategories](https://github.com/AckeeCZ/ACKategories) |\n\nIf you are also leveraging Tapestry in your project, feel free to open a PR to include it in the list above.\n\nThese repositories can also serve as a great example configuration for your own projects.\n\n## Installation\n\n### Using [mint](https://github.com/yonaskolb/mint)\n\n```bash\n$ mint install AckeeCZ/tapestry\n```\n\n### Using [SPM][spm]\n\nAdd this to your `Package.swift`:\n\n```swift\n.package(url: \"https://github.com/AckeeCZ/tapestry.git\", .branch(\"master\")),\n```\n\n### Using Swift directly\n\n```bash\n$ git clone https://github.com/AckeeCZ/tapestry.git\n$ cd tapestry\n$ swift run tapestry\n```\n\n## Setup release steps\n\nTo get you started with tapestry (if you did not generate your framework with it!), you can run \n```bash\ntapestry up\n```\n\nThis will create a `TapestryConfig.swift` that you can then customize per your needs\n\nTo configure your release steps, run:\n```bash\ntapestry edit\n```\n\nThis opens Xcode with easily editable `TapestryConfig.swift`.\n\nThe generated file will look like this:\n```swift\nimport TapestryDescription\n\nlet config = TapestryConfig(release: Release(actions: [.pre(.docsUpdate),\n                                                       .pre(.dependenciesCompatibility([.cocoapods, .carthage, .spm(.all)]))],\n                                             add: [\"README.md\",\n                                                   \"YourLibraryName.podspec\",\n                                                   \"CHANGELOG.md\"],\n                                             commitMessage: \"Version \\(Argument.version)\",\n                                             push: false))\n```\n\nYou can see lower below how to configure the manifest to your needs.\n\n# Release Github Action\n\nJust by adding a simple tapestry step `.post(.githubRelease(owner: \"owner\", repository: \"repository\", assetPaths: [\"build.zip\"]))`\nyou can automate your whole release process with Github actions. If that sounds interesting to you, check out the [action here](https://github.com/fortmarek/tapestry-action)\n\nTo then create a new release with github action, simply run `tapestry github-release 0.0.1` and ... that's all! 🙂\n\n# Editing `TapestryConfig`\n\nTo edit the manifest, simply run `tapestry edit`.\nThat will open Xcode project with that manifest, so you can easily edit the Swift file.\nYou can use the documentation right in the new Xcode project or you can use the documentation below 👇\n\n## TapestryConfig\n\nThis currently only has one argument `release`, more will be added here\n\n## Release\n\nThe main component of the release process.\n\n| Property        | Description           | Type  | Optional      |   Default   |\n| ------------- |:-------------:| :-----:| :-----:| :-----:|\n| actions      | Your custom release steps, more about how you can define them below (see `ReleaseAction`) | [ReleaseAction] | No | []\n| add      | Glob of your files that you want to add to git before releasing a version   |   [String] |   Yes\n| commitMessage |  Commit message - use `Argument.version` in your string which will translate to the version you are releasing   |  String |  No\n| push      | This option determines if the changes are committed at the end | Bool | No | \n\nRunning `tapestry release 0.0.7` also automatically tags the latest commit.\n\n## ReleaseAction\n\nThis type lets you define the individual actions. \n\n| Case        | Description           | \n| ------------- |:-------------:|\n| `pre(tool: String, arguments: [String] = [])`      | Runs before commiting and pushing. Runs the custom command from the root folder.\n| `pre(_ predefinedAction: PredefinedAction)`      | Runs before commiting and pushing. Runs a `PredefinedAction`, more on that below.\n| `post(tool: String, arguments: [String] = [])` |  Runs after commiting and pushing. Runs the custom command from the root folder.\n| `post(_ predefinedAction: PredefinedAction)`       | Runs after commiting and pushing. Runs a `PredefinedAction`, more on that below.\n\n\n## PredefinedAction\n\nThis is a set of predefined actions.\n\n| Case        | Description           | \n| ------------- |:-------------:|\n| `githubRelease`   | Creates a new release on github. If you specify `assetPaths`, the files at the paths will be uploaded along with the new Github release.\n| `docsUpdate`      | Updates version in your `.podspec, README.md` and adds it in `CHANGELOG.md`\n|  `dependenciesCompatibility([DependenciesManager])` |  Checks compatibility with given `DependenciesManager`s\n\nNote that for `docsUpdate` your changelog must be in this format:\n```\n## Next\n\n- your way of adding logs\n\n## 1.0.0\n....\n```\n\nWhich will be changed to\n```\n## Next\n\n## 1.0.1\n\n- your way of adding logs\n\n## 1.0.0\n....\n```\n\nTo change the version in your `README.md`, we use the latest tag in your git history.\n\nYou can also try out the individual actions:\n```bash\ntapestry run action docs-update 1.0.0\ntapestry run action compatibilty spm carthage cocoapods\n```\n\n## DependenciesManager\n\nLet's you say what dependency managers you want to check compatibility for.\n\n| Case        | Description           | \n| ------------- |:-------------:|\n| `cocoapods`      | Runs compatibility check for [Cocoapods][cocoapods]\n| `carthage`     | Runs compatibility check for [Carthage][carthage]\n| `spm(Platform)` |  Runs compatibility check for [SPM][spm] - define platform if you are using platform-specific libraries (eg `UIKit`)\n\n# Generating project\n\n\u003cimg alt=\"Screenshot\" src=\"Resources/tapestry.gif\" width=\"700\"\u003e\n\n\nTo generate your project, simply run: \n```bash\ntapestry init --path TapestryProject\n```\n\nYou can omit `--path` argument and it will generate your framework in the current directory.\n\nIt uses [tuist][tuist] and [SPM][spm] tools, so it's very easy to adjust it to your needs (no complicated template structure, all code is generated from the **ground up**!)\n\nYou can change the generated files in `InitCommand` and your example project in `ExampleModelLoader`. In the future, I'd like to make this customization even easier, so watch this space 👀\n\n## Generated project features\n\n- [x] `CocoaPods`, `Carthage` and `Swift Package Manager` compatibility\n- [x] `README.md` template\n- [x] `travis` to automate your builds\n- [x] `Library` support\n- [x] `Executable` support for your CLI tools\n- [ ] more and even more to come!\n\nYou can check out an example project that was generated with `tapestry` [here](https://github.com/fortmarek/TapestryDemo).\n\n# Releasing project\n\n\u003cimg alt=\"Screenshot\" src=\"Resources/release.gif\" width=\"700\"\u003e\n\n### Inspiration and thanks\n\nI'd like to thank [tuist][tuist] for inspiration and help in this project. This project was also inspired by [rocket](https://github.com/shibapm/Rocket)\n\n\n[cocoapods]: https://github.com/CocoaPods/CocoaPods\n[carthage]: https://github.com/Carthage/Carthage\n[spm]: https://github.com/apple/swift-package-manager\n[tuist]: https://github.com/tuist/tuist\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fackeecz%2Ftapestry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fackeecz%2Ftapestry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fackeecz%2Ftapestry/lists"}