Skip to content

Commit

Permalink
rename ffi-xcframework repo to CiteprocRs.xcframework
Browse files Browse the repository at this point in the history
  • Loading branch information
cormacrelf committed Sep 3, 2021
1 parent 25e561e commit e0dafdf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
21 changes: 17 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@

import PackageDescription

// https://gist.github.com/Sorix/21e61347f478ae2e83ef4d8a92d933af
// To use the debug copy built by Scripts/xcframework
//
// export CITEPROC_RS_BINARY=local
// swift test
//
// To test with a draft binary release:
//
// Scripts/release --release --draft --push-binary-repo
// export CITEPROC_RS_BINARY=draft
// # (swift test will fail because the _test_* symbols are not available on release builds)
// swift build

#if os(Linux)
import Glibc
#else
import Darwin.C
#endif


// https://gist.github.com/Sorix/21e61347f478ae2e83ef4d8a92d933af
enum Environment {
static let `default`: Environment = .preBuiltRelease

Expand Down Expand Up @@ -41,21 +54,21 @@ enum Environment {
func releasedPackage(from version: Version) -> Package.Dependency {
.package(
name: "CiteprocRs",
url: "https://github.com/citeproc-rs/ffi-xcframework",
url: "https://github.com/citeproc-rs/CiteprocRs.xcframework",
from: version
)
}

let draftBranchPackage: Package.Dependency = .package(
name: "CiteprocRs",
url: "https://github.com/citeproc-rs/ffi-xcframework",
url: "https://github.com/citeproc-rs/CiteprocRs.xcframework",
.branch("draft")
)


let localTarget: Target = .binaryTarget(
name: "CiteprocRs",
path: "citeproc-rs/target/xcframework/CiteprocRs.xcframework"
path: "citeproc-rs/target/xcframework/debug/CiteprocRs.xcframework"
)

var dependencies: [Package.Dependency] = [
Expand Down
4 changes: 2 additions & 2 deletions Scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ push_binary_repo() {
fi

cd "$TMP"
git clone https://github.com/citeproc-rs/ffi-xcframework.git --branch master
cd ffi-xcframework
git clone https://github.com/citeproc-rs/CiteprocRs.xcframework.git --branch master
cd CiteprocRs.xcframework
# https://stackoverflow.com/a/26961416
git switch -c $BINARY_BRANCH
cp -R "$DIR"/Scripts/BinaryPackage/* .
Expand Down

0 comments on commit e0dafdf

Please sign in to comment.