Skip to content

Commit b3b9046

Browse files
Update plugin sdk build script to only copy files instead of cherry-picking functions
1 parent 5bf5023 commit b3b9046

File tree

10 files changed

+21
-285
lines changed

10 files changed

+21
-285
lines changed

.github/workflows/sdk-generation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
persist-credentials: false
2727

2828
- name: Build new SDK
29-
run: python tools/build_sdk.py
29+
run: ./tools/build_sdk.sh
3030

3131
- name: Extract branch name
3232
shell: bash

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ ifeq ($(CHAIN),ethereum)
277277
endif
278278

279279
# rebuild SDK
280-
$(shell python3 tools/build_sdk.py)
280+
$(shell ./tools/build_sdk.sh)
281281

282282
# check if a difference is noticed (fail if it happens in CI build)
283283
ifneq ($(shell git status | grep 'ethereum-plugin-sdk'),)

src_common/eth_plugin_interface.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// clang-format off
22

3-
#ifndef _ETH_PLUGIN_INTERFACE_H_
4-
#define _ETH_PLUGIN_INTERFACE_H_
3+
#pragma once
54

65
#include "os.h"
76
#include "cx.h"
7+
8+
// Include other header compatible with plugins
89
#include "asset_info.h"
10+
#include "caller_api.h"
11+
#include "common_utils.h"
12+
#include "plugin_utils.h"
913
#include "tx_content.h"
1014

1115
/*************************************************************************************************
@@ -217,6 +221,4 @@ typedef struct ethQueryContractUI_s {
217221
} ethQueryContractUI_t;
218222
// void handle_query_contract_ui(ethQueryContractUI_t *parameters);
219223

220-
#endif // _ETH_PLUGIN_INTERFACE_H_
221-
222224
// clang-format on

src_common/plugin_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <stdint.h>
2121
#include <stdbool.h>
2222

23+
#include "eth_plugin_interface.h"
24+
2325
#define SELECTOR_SIZE 4
2426
#define PARAMETER_LENGTH 32
2527

src_plugin_sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ Be careful, and weight your choices.
1414
If for some reasons you want to rebuild this SDK manually from [app-ethereum](https://github.com/LedgerHQ/app-ethereum) (reminder: it is rebuild automatically when building app-ethereum itself):
1515

1616
```shell
17-
$> python3 tools/build_sdk.py
17+
$> ./tools/build_sdk.sh
1818
```

src_plugin_sdk/plugin_utils.c

Lines changed: 0 additions & 28 deletions
This file was deleted.

src_plugin_sdk/plugin_utils.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

src_plugin_sdk/main.c renamed to src_plugin_sdk/src/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* limitations under the License.
1616
*****************************************************************************/
1717

18-
#include "eth_internals.h"
1918
#include "eth_plugin_interface.h"
2019
#include "lib_standard_app/swap_lib_calls.h" // RUN_APPLICATION
2120

tools/build_sdk.py

Lines changed: 0 additions & 222 deletions
This file was deleted.

tools/build_sdk.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Clean the sdk
4+
find ./ethereum-plugin-sdk/ -mindepth 1 -maxdepth 1 ! -name .git -exec rm -r {} \;
5+
6+
# Copy exclusive files
7+
cp -r src_plugin_sdk/* ./ethereum-plugin-sdk/
8+
9+
# Copy common sources
10+
cp -r src_common/* ./ethereum-plugin-sdk/src/

0 commit comments

Comments
 (0)