Titanium Tianium:如何安全地将'tiapp.xml'添加到VCS而不公开密钥

Titanium Tianium:如何安全地将'tiapp.xml'添加到VCS而不公开密钥,titanium,appcelerator,appcelerator-titanium,Titanium,Appcelerator,Appcelerator Titanium,我想将我的钛合金应用程序添加到VCS 然而,我不想分享任何生产密钥或其他重要的东西,应该保密,因此不应该添加到VCS 例如: <property name="acs-password-development" type="string">XXXX</property> <property name="acs-oauth-secret-development" type="string">XXXX</property> <property na

我想将我的钛合金应用程序添加到VCS

然而,我不想分享任何生产密钥或其他重要的东西,应该保密,因此不应该添加到VCS

例如:

<property name="acs-password-development" type="string">XXXX</property>
<property name="acs-oauth-secret-development" type="string">XXXX</property>
<property name="acs-oauth-key-development" type="string">XXXX</property>
<property name="acs-api-key-development" type="string">XXXX</property>
<property name="acs-authbase-url-development" type="string">https://secure-identity.cloud.appcelerator.com</property>
<property name="acs-base-url-development" type="string">https://api.cloud.appcelerator.com</property>
<property name="acs-username-production" type="string">appc_app_user</property>
<property name="acs-password-production" type="string">XXX</property>
<property name="acs-oauth-secret-production" type="string">XXXX</property>
<property name="acs-oauth-key-production" type="string">XXXX</property>
<property name="acs-api-key-production" type="string">XXXX</property>
<property name="acs-authbase-url-production" type="string">https://secure-identity.cloud.appcelerator.com</property>
<property name="acs-base-url-production" type="string">https://api.cloud.appcelerator.com</property>
<property name="appc-org-id" type="string">XXXX</property>
<property name="appc-creator-user-id" type="string">XXXX</property>
XXXX
XXXX
XXXX
XXXX
https://secure-identity.cloud.appcelerator.com
https://api.cloud.appcelerator.com
应用程序用户
XXX
XXXX
XXXX
XXXX
https://secure-identity.cloud.appcelerator.com
https://api.cloud.appcelerator.com
XXXX
XXXX
等等

(我还遗漏了其他重要的东西吗?)


我该如何处理这个问题呢?

好吧,我认为您可以使用一个小脚本来构建应用程序,每个环境都有一个自定义的文件配置(它不在VCS中)。例如:

  • 配置文件可以使用yaml格式(或其他格式):
  • 构建脚本(可以使用nodejs、python等)读取配置文件和环境选项以修改tiapp.xml文件。通过这种方式,您可以避免VCS参与生产配置

要构建脚本,nodejs和python中有许多库可用于修改xml文件。您可以检查:

检查dashboard.appcelerator.com。它们应该包含您正在讨论的应用程序的键。至于URL,它们对于所有项目都是相同的,所以我认为它们可以添加到VCS中。
development:
    configuration_variable: value
    ...
testing:
    configuration_variable: value
    ...
production:
    configuration_variable: value
    ...