Skip to content

Commit af241cf

Browse files
committed
updated podspec and deploy script
1 parent e3e9a2f commit af241cf

File tree

4 files changed

+15
-34
lines changed

4 files changed

+15
-34
lines changed

.github/workflows/deploy.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ jobs:
1111
- name: Select Xcode
1212
run: sudo xcode-select -s /Applications/Xcode_14.0.app
1313
- name: Publish Pod
14-
run: pod trunk push --allow-warnings
14+
run: |
15+
sed -i '' "s|[[:blank:]]*s\.version[[:blank:]].*|s.version = '${VERSION}'|g" ScaleCodec.podspec
16+
pod trunk push --allow-warnings
1517
env:
1618
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
19+
VERSION: ${{ github.event.release.tag_name }}
1720

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55

66
let package = Package(
77
name: "ScaleCodec",
8-
platforms: [.macOS(.v10_12), .iOS(.v10), .tvOS(.v10), .watchOS(.v6)],
8+
platforms: [.macOS(.v10_13), .iOS(.v11), .tvOS(.v11), .watchOS(.v6)],
99
products: [
1010
.library(
1111
name: "ScaleCodec",

README.md

-19
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,6 @@ assert(compact == UInt64(1 << 32))
8888
// let compact = try decode(Compact<UInt64>.self, from: data).value
8989
```
9090

91-
#### Int[128-1024] and UInt[128-1024]
92-
93-
`Int[128-1024]` and `UInt[128-1024]` types implemented with `DoubleWidth` Swift type from Apple. It works fine for 128-256 bits but slow for 512-1024 bits.
94-
95-
```Swift
96-
import ScaleCodec
97-
98-
let data = Data([
99-
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
100-
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
101-
])
102-
103-
let encoded = try encode(UInt128(UInt256(2)^128 - 1))
104-
assert(encoded == data))
105-
106-
let compact = try decode(UInt128.self, from: data)
107-
assert(compact == UInt128(UInt256(2)^128 - 1))
108-
```
109-
11091
#### Data fixed encoding
11192

11293
`Data` type can be encoded with fixed encoding. In this mode data length will not be stored so length should be provided manually.

ScaleCodec.podspec

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Pod::Spec.new do |s|
22
s.name = 'ScaleCodec'
3-
s.version = '0.3.0'
3+
s.version = '999.99.9'
44
s.summary = 'SCALE codec implementation for Swift language'
55

66
s.description = <<-DESC
7-
SCALE codec implementation for Swift language. Supports all SCALE standard types.
7+
SCALE codec implementation for Swift language. Supports all SCALE standard types.
88
DESC
99

1010
s.homepage = 'https://github.com/tesseract-one/ScaleCodec.swift'
@@ -13,21 +13,18 @@ SCALE codec implementation for Swift language. Supports all SCALE standard types
1313
s.author = { 'Tesseract Systems, Inc.' => '[email protected]' }
1414
s.source = { :git => 'https://github.com/tesseract-one/ScaleCodec.swift.git', :tag => s.version.to_s }
1515

16-
s.ios.deployment_target = '10.0'
17-
s.osx.deployment_target = '10.12'
18-
s.tvos.deployment_target = '10.0'
19-
s.watchos.deployment_target = '6.0'
16+
s.swift_version = '5.4'
17+
s.module_name = 'ScaleCodec'
2018

21-
s.swift_version = '5.4'
19+
base_platforms = { :ios => '11.0', :osx => '10.13', :tvos => '11.0' }
20+
s.platforms = base_platforms.merge({ :watchos => '6.0' })
2221

23-
s.module_name = 'ScaleCodec'
22+
s.source_files = 'Sources/ScaleCodec/**/*.swift'
2423

2524
s.dependency 'Tuples', '~> 0.1.0'
26-
27-
s.source_files = 'Sources/ScaleCodec/**/*.swift', 'Sources/DoubleWidth/*.swift'
2825

29-
s.test_spec 'Tests' do |test_spec|
30-
test_spec.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
31-
test_spec.source_files = 'Tests/ScaleCodecTests/**/*.swift', 'Tests/DoubleWidthTests/DoubleWidthTests.swift'
26+
s.test_spec 'Tests' do |ts|
27+
ts.platforms = base_platforms
28+
ts.source_files = 'Tests/ScaleCodecTests/**/*.swift'
3229
end
3330
end

0 commit comments

Comments
 (0)