Skip to content

Commit 2e6a29b

Browse files
CI/CD Build Errors (#305)
1 parent e647151 commit 2e6a29b

11 files changed

Lines changed: 19 additions & 15 deletions

File tree

.github/workflows/build-golang.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
uses: actions/setup-python@v2
3131
with:
3232
python-version: 3.9
33-
- name: Display Golang version
33+
- name: Build and Test Golang
3434
run: |
3535
go version
3636
go install golang.org/x/lint/golint@latest
3737
go install github.com/jstemmer/go-junit-report@latest
38-
python ../../devops/build_sdks.py --package-version=${{ github.event.inputs.packageVersion }}
38+
python ../../devops/build_sdks.py
3939
go build
4040
golint
4141
go test -v | go-junit-report > test_output.xml

devops/build_sdks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def build_ruby(args) -> None:
8787
ruby_dir = abspath(join(dirname(__file__), '..', 'ruby'))
8888
update_line(join(ruby_dir, 'lib', 'version.rb'),
8989
{' VERSION =': f" VERSION = '{get_package_versions(args)}'"})
90+
copy_okapi_libs(abspath(join(ruby_dir, '..', 'libs')))
91+
copy_okapi_libs(ruby_dir) # Ruby FFI loads from current directory first, this enables macos
9092

9193

9294
def build_golang(args) -> None:

go/okapi/native.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ import "C"
99

1010
import (
1111
"fmt"
12-
"unsafe"
13-
1412
"google.golang.org/protobuf/proto"
13+
"unsafe"
1514
)
1615

17-
type OkapiError struct {
16+
type NativeError struct {
1817
Message string
1918
InternalError error
2019
}
2120

22-
func (o OkapiError) Error() string {
21+
func (o NativeError) Error() string {
2322
return fmt.Sprintf("Error:%s InternalError:%v", o.Message, o.InternalError)
2423
}
2524

@@ -124,7 +123,7 @@ func createError(code int32, err C.ExternError) error {
124123
}
125124
}
126125
func wrapError(message string, internalError error) error {
127-
return &OkapiError{
126+
return &NativeError{
128127
Message: message,
129128
InternalError: internalError,
130129
}

go/okapi/oberon_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ func TestDemoWithBlinding(t *testing.T) {
4040
data := []byte("alice")
4141
nonce := []byte("1234")
4242
// blinding code to be used by issuer and given to holder to transfer the token securely
43-
issuer_2fa := []byte("issuer code")
43+
issuer2fa := []byte("issuer code")
4444

4545
tokenRequest := okapiproto.CreateOberonTokenRequest{Data: data, Sk: key.Sk}
46-
tokenRequest.Blinding = append(tokenRequest.Blinding, issuer_2fa)
46+
tokenRequest.Blinding = append(tokenRequest.Blinding, issuer2fa)
4747

4848
blindedToken, _ := ob.CreateToken(&tokenRequest)
4949

5050
// Holder unblinds token
5151
unblindRequest := okapiproto.UnBlindOberonTokenRequest{Token: blindedToken.Token}
52-
unblindRequest.Blinding = append(unblindRequest.Blinding, issuer_2fa)
52+
unblindRequest.Blinding = append(unblindRequest.Blinding, issuer2fa)
5353
token, _ := ob.UnblindToken(&unblindRequest)
5454

5555
// Holder prepares a proof without blinding

java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
def jarDomainId = "id"
1313
def jarGroupId = "trinsic"
1414
def jarArtifactId = "okapi"
15-
def jarVersion = "1.1.1"
15+
def jarVersion = "1.2.0"
1616

1717
publishing {
1818
repositories {

python/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = trinsic-okapi
3-
version = 1.1.1
3+
version = 1.2.0
44
author = Scott Phillips
55
author_email = [email protected]
66
description = Trinsic okapi SDK bindings

ruby/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24
gemspec

ruby/Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'bundler/gem_tasks'
24
require 'rake/testtask'
35

ruby/lib/okapi.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ def self.ffi_call(function, request, response_klass)
123123
class DidError < StandardError
124124
def initialize(code = 0, msg = nil)
125125
@code = code
126-
# @msg = msg
127126
super(msg)
128127
end
129128

ruby/lib/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Okapi
4-
VERSION = '1.1.1'
4+
VERSION = '1.2.0'
55
end

0 commit comments

Comments
 (0)