From 37e795d539c045c4b13f9ec2db9d012f64ccfb0b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 28 May 2020 16:07:20 +0300 Subject: [PATCH] Send package checksum when publishing --- platformio/clients/registry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformio/clients/registry.py b/platformio/clients/registry.py index ba52c83b..bbb0725c 100644 --- a/platformio/clients/registry.py +++ b/platformio/clients/registry.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from platformio import __registry_api__ +from platformio import __registry_api__, fs from platformio.clients.account import AccountClient from platformio.clients.rest import RESTClient from platformio.package.spec import PackageType @@ -38,6 +38,7 @@ class RegistryClient(RESTClient): headers={ "Authorization": "Bearer %s" % account.fetch_authentication_token(), "Content-Type": "application/octet-stream", + "X-PIO-SHA256": fs.calculate_file_hashsum("sha256", archive_path), }, data=fp, )