/* Wraps app.json so CI can stamp versions: VERSION_NAME → expo.version,
   VERSION_CODE → android.versionCode (Obtainium needs it to increase). */
module.exports = ({ config }) => {
  const versionCode = parseInt(process.env.VERSION_CODE || '', 10);
  if (process.env.VERSION_NAME) config.version = process.env.VERSION_NAME;
  if (Number.isFinite(versionCode)) {
    config.android = { ...config.android, versionCode };
  }
  return config;
};
