Commit 04163606 authored by Aleksey Mikhailov's avatar Aleksey Mikhailov 🗻
Browse files

setup android signing script

parent cb855043
#!/bin/bash
set -euo pipefail
KEY_ALIAS=$1
GITLAB_TOKEN=$2
GITLAB_PROJECT_ID=$3
PASSWORD=$(openssl rand -base64 16)
KEYSTORE_PATH="signing/release.jks"
mkdir signing || true
keytool -genkey -v -keystore $KEYSTORE_PATH -alias "$KEY_ALIAS" -storepass "$PASSWORD" -keypass "$PASSWORD" -keyalg RSA -sigalg SHA256withRSA -keysize 2048 -validity 10000 -noprompt
echo "created store at: $KEYSTORE_PATH"
echo "key alias: $KEY_ALIAS"
echo "store password: $PASSWORD"
echo "key password: $PASSWORD"
curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
"https://gitlab.icerockdev.com/api/v4/projects/$GITLAB_PROJECT_ID/variables" \
--form "key=RELEASE_KEY_ALIAS" --form "value=$KEY_ALIAS"
curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
"https://gitlab.icerockdev.com/api/v4/projects/$GITLAB_PROJECT_ID/variables" \
--form "key=RELEASE_STORE_PASSWORD" --form "value=$PASSWORD"
curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
"https://gitlab.icerockdev.com/api/v4/projects/$GITLAB_PROJECT_ID/variables" \
--form "key=RELEASE_KEY_PASSWORD" --form "value=$PASSWORD"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment