Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freddi-kit/ArtifactBundleGen
https://github.com/freddi-kit/ArtifactBundleGen
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/freddi-kit/ArtifactBundleGen
- Owner: freddi-kit
- License: mit
- Created: 2022-12-07T16:18:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T15:26:13.000Z (5 months ago)
- Last Synced: 2024-11-10T01:51:29.166Z (3 months ago)
- Language: Swift
- Size: 27.3 KB
- Stars: 24
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ArtifactBundleGen (Beta)
Generates Artifact Bundle from Swift Package (Executable only)
## Example
```sh
# Go to Package directory. it is expeced that ArtifactBundleGen is added as command plugin in Package.swift
$ cd some-awesome-tool# Call build command
$ swift build -c debug --arch arm64 --arch x86_64# .build is generated
# Call command
$ swift package plugin generate-artifact-bundle --package-version 0.5.11 --executable-name some-awesome-tool --build-config debug --build-folder .build$ ls
> some-awesome-tool.artifactbundle.zip
```## Usase
### 1. Add ArtifactBundleGen as plugin in Package.swift```swift
let package = Package(
name: "SomeTools",
products: [
// ... some products
],
dependencies: [
// ... some dependencies
.package(url: "https://github.com/freddi-kit/ArtifactBundleGen.git", .exact("0.0.2"))
],```
### 2. Build your product in Shell
```sh
# Call build command
$ swift build -c debug --arch arm64 --arch x86_64
```### 3. Call ArtifactBundleGen
```sh
$ swift package plugin generate-artifact-bundle --package-version {version} --executable-name {executable-name} --build-config {config} --build-folder {folder}
```{tool_name}.artifactbundle will be generated!
#### Opitions
- --executable-name: Name of Aritfact Bundle. Please specify executable product's `name` string```swift
let package = Package(
...
products: [
// here
.executable(name: {executable-name}, targets: [...]),
],
```- --build-config: build config. `debug` or `release`
##### optionals
- --package-version: version of package (default is 1.0.0)
- --build-folder: version of package (default is .build)
- --include-resource-path: path to add as resources to artifact bundle (multiple is okay)```
swift package plugin generate-artifact-bundle --package-version ... \
--include-resource-path some-awesome-bundle.bundle \
--include-resource-path some-awesome-image.jpg \
```### 4. Complete!
Zip file is generated!
```sh
$ ls
> {tool_name}.artifactbundle.zip
```## TODOs
- [ ] Suport XCFramework