#!/usr/bin/env bash
cd ../../
. gradle.properties

v_code=$((${version_code}+1))
v_name=$((${v_code}/100))"."$((${v_code}%100/10))"."$((${v_code}%10))

echo "appId=${1},versionCode=${v_code},verionName=${v_name}"

sed -i "" "s#^app_id=.*#app_id=${1}#g"  gradle.properties
sed -i "" "s#^version_code=.*#version_code=${v_code}#g"  gradle.properties
sed -i "" "s#^version_name=.*#version_name=${v_name}#g"  gradle.properties