From 6ff8bb11774c51fd341b7699a3938fd894995fbf Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 25 Apr 2024 17:45:42 -0400 Subject: refactor: Finish support and testing for mbedtls --- Taskfile.yaml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'Taskfile.yaml') diff --git a/Taskfile.yaml b/Taskfile.yaml index 2d85a0c..77572f0 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -111,4 +111,61 @@ tasks: #tar up the source - tar -czf "{{.TARGET_SOURCE}}" {{.SOURCE_FILES}} - \ No newline at end of file + + dev-update-deps: + desc: "Updates vendored projects files (headers mostly) from their source repositories to the latest version" + cmds: + - task: dev-update-monocypher + - task: dev-update-mbedtls-headers + - task: dev-update-openssl-headers + + dev-update-monocypher: + vars: + MC_GIT_URL: 'https://github.com/LoupVaillant/Monocypher' + MC_GIT_BRANCH: 'master' #NOTE: Always update to the latest master branch, then verify changes manually + MC_DIR: 'vendor/monocypher' + TMP_DIR: '.task/mc' + cmds: + - cmd: powershell mkdir '{{.TMP_DIR}}' -Force + ignore_error: true + + - defer: powershell rm -Recurse '{{.TMP_DIR}}' -Force + + - git clone --branch {{.MC_GIT_BRANCH}} {{.MC_GIT_URL}} '{{.TMP_DIR}}' + + - for: [ 'src/monocypher.h', 'src/monocypher.c' ] + cmd: powershell cp '{{.TMP_DIR}}/{{.ITEM}}' '{{.MC_DIR}}' + + dev-update-mbedtls-headers: + vars: + MBEDTLS_GIT_URL: 'https://github.com/Mbed-TLS/mbedtls' + MBEDTLS_GIT_BRANCH: 'development' + MBEDTLS_DIR: 'vendor/mbedtls' + TMP_DIR: '.task/mbedtls' + cmds: + - cmd: powershell mkdir '{{.TMP_DIR}}' -Force + ignore_error: true + + - defer: powershell rm -Recurse '{{.TMP_DIR}}' -Force + + - git clone --branch {{ .MBEDTLS_GIT_BRANCH }} {{ .MBEDTLS_GIT_URL }} '{{ .TMP_DIR }}' + + - for: [ 'include/mbedtls', 'include/psa' ] + cmd: powershell cp -Recurse -Force '{{ .TMP_DIR }}/{{ .ITEM }}' '{{.MBEDTLS_DIR}}/include' + + dev-update-openssl-headers: + vars: + OPENSSL_GIT_URL: 'git://git.openssl.org/openssl.git' + OPENSSL_GIT_BRANCH: 'master' + OPENSSL_DIR: 'vendor/openssl' + TMP_DIR: '.task/openssl' + cmds: + - cmd: powershell mkdir '{{.TMP_DIR}}' -Force + ignore_error: true + + - defer: powershell rm -Recurse '{{.TMP_DIR}}' -Force + + - git clone --branch {{ .OPENSSL_GIT_BRANCH }} {{ .OPENSSL_GIT_URL }} '{{ .TMP_DIR }}' + + - for: [ 'include/openssl' ] + cmd: powershell cp -Recurse -Force '{{ .TMP_DIR }}/{{ .ITEM }}' '{{.OPENSSL_DIR}}/include/openssl/' \ No newline at end of file -- cgit