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

Fix specifying a template_file_path #39

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Binaries/PrefireBinary.artifactbundle/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"artifacts": {
"PrefireBinary": {
"type": "executable",
"version": "2.0.0",
"version": "2.0.1",
"variants": [
{
"path": "prefire-2.0.0-macos/bin/prefire",
"path": "prefire-2.0.1-macos/bin/prefire",
"supportedTriples": ["x86_64-apple-macosx", "arm64-apple-macosx"]
},
]
Expand Down
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ build:

binary:
swift run --package-path PrefireExecutable/ -c release prefire
rm -rf Binaries/PrefireBinary.artifactbundle/prefire-2.0.0-macos/bin/*
cp PrefireExecutable/.build/arm64-apple-macosx/release/prefire Binaries/PrefireBinary.artifactbundle/prefire-2.0.0-macos/bin
rm -rf Binaries/PrefireBinary.artifactbundle/prefire-${CUR_VERSION}-macos/bin/*
cp PrefireExecutable/.build/arm64-apple-macosx/release/prefire Binaries/PrefireBinary.artifactbundle/prefire-${CUR_VERSION}-macos/bin

test:
cd PrefireExecutable; swift test
Expand All @@ -21,4 +21,4 @@ update:
cd Binaries/PrefireBinary.artifactbundle; sed -i '' -e '6 s/.*/ "version": "$(version)",/g' info.json
cd Binaries/PrefireBinary.artifactbundle; sed -i '' -e '9 s/.*/ "path": "prefire-$(version)-macos\/bin\/prefire",/g' info.json
cd Binaries/PrefireBinary.artifactbundle; sed -i '' -e '9 s/.*/ "path": "prefire-$(version)-macos\/bin\/prefire",/g' info.json
cd PrefireExecutable/Sources/PrefireExecutable/Commands/Version/; sed -i '' -e '8 s/.*/ static var value: String = "$(version)"/g' Version.swift
cd PrefireExecutable/Sources/prefire/Commands/Version/; sed -i '' -e '8 s/.*/ static var value: String = "$(version)"/g' Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ struct GeneratedTestsOptions {
self.sourcery = sourcery
self.target = config?.tests.target ?? target
self.testTarget = testTarget
self.template = config?.tests.template ?? template
if let template = config?.tests.template, let testTargetURL = testTargetPath.flatMap(URL.init(string:)) {
self.template = testTargetURL.deletingLastPathComponent().appending(path: template).absoluteString
} else {
self.template = template
}
self.sources = sources
self.output = config?.tests.testFilePath ?? output
prefireEnabledMarker = config?.tests.previewDefaultEnabled ?? true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extension Prefire {
struct Version: ParsableCommand {
static let configuration = CommandConfiguration(abstract: "Display the current version of Prefire")

static var value: String = "2.0.0"
static var value: String = "2.0.1"

func run() throws {
print(Self.value)
Expand Down