Write generated file to current working directory #1
2 changed files with 27 additions and 1 deletions
25
.github/workflows/test.yml
vendored
Normal file
25
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Build and run tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
BuildAndTest:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Cache Swift packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
.build/checkouts
|
||||
.build/repositories
|
||||
.build/workspace-state.json
|
||||
key: ${{ runner.os }}-${{ hashFiles('Package.resolved') }}
|
||||
|
||||
- name: Build
|
||||
run: swift build
|
||||
|
||||
- name: Run tests
|
||||
run: swift test
|
|
@ -76,7 +76,8 @@ public final class MakeColors: ParsableCommand, Context {
|
|||
if let output = output {
|
||||
return URL(fileURLWithPath: output)
|
||||
} else {
|
||||
return URL(fileURLWithPath: input).deletingPathExtension().appendingPathExtension(`extension`)
|
||||
let basename = URL(fileURLWithPath: input).deletingPathExtension().lastPathComponent
|
||||
return URL(fileURLWithPath: basename).appendingPathExtension(`extension`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue