To generate a shared key-pair we have to call torchbear
's crypto.sign.new_keypair()
function. To do so, create a file named init.lua
and add this:
local sign_priv, sign_pub = crypto.sign.new_keypair()
local file = io.open("private_key", "w")
local file2 = io.open("public_key", "w")
file:write(tostring(sign_priv), "\n")
file2:write(tostring(sign_pub), "\n")
To create a signature file, we have to first set some environment variables, here's the list:
PROJECT = name of project
TRAVIS_TAG = release tag
ARCH = architecture
PLATFORM = x86/arm/...
CHANNEL = stable/beta
After setting them, we will have to run torchbear
binary in the directory where we have private_key
and init.lua.
This should create the .sig
file with following name format: ${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.sig