Add write version file rule.

Signed-off-by: servanter <fengshang@126.com>