Add rpc submodule.

This commit is contained in:
Dain Nilsson 2021-11-19 09:08:04 +01:00
parent f9159e0096
commit 18d729beee
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
4 changed files with 62 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "yubikey-manager"]
path = yubikey-manager
url = https://github.com/Yubico/yubikey-manager

16
build-ykman.bat Normal file
View File

@ -0,0 +1,16 @@
@echo off
REM Make sure the submodule is cloned, but if it already is, don't reset it.
( dir /b /a "yubikey-manager" | findstr . ) > nul || (
git submodule init
git submodule update
)
echo Building ykman CLI for Windows...
cd yubikey-manager
poetry install
rmdir /s /q ..\build\windows\ykman
poetry run pyinstaller ykman.spec --distpath ..\build\windows
cd ..
echo All done, output in build/windows/

42
build-ykman.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/sh
#
# This script creates a pyinstaller build of yubikey-manager from the submodule in this repository.
#
set -e
# Make sure the submodule is cloned, but if it already is, don't reset it.
if ! [ "$(ls yubikey-manager)" ]; then
git submodule init
git submodule update
fi
case "$(uname)" in
Darwin*)
OS="macos";;
Linux*)
OS="linux";;
MINGW*)
OS="windows";;
esac
echo "Building ykman CLI for $OS..."
OUTPUT="build/$OS"
cd yubikey-manager
poetry install
rm -rf ../$OUTPUT/ykman
poetry run pyinstaller ykman.spec --distpath ../$OUTPUT
cd ..
# Fixup permissions (should probably be more strict)
find $OUTPUT/ykman -type f -exec chmod a-x {} +
chmod a+x $OUTPUT/ykman/ykman
# Adhoc sign executable (MacOS)
if [ "$OS" = "macos" ]; then
codesign -f --timestamp --entitlements macos/ykman.entitlements --sign - $OUTPUT/ykman/ykman
fi
echo "All done, output in $OUTPUT/"

1
yubikey-manager Submodule

@ -0,0 +1 @@
Subproject commit 739f3122a43adfcd2549374bc4cd11e88a483a8d