Skip to content

Commit

Permalink
fix(fastlane-appcenter): Separate appName from project id
Browse files Browse the repository at this point in the history
  • Loading branch information
Yann Leflour committed Aug 28, 2018
1 parent 47853be commit bb58ec9
Show file tree
Hide file tree
Showing 5 changed files with 1,183 additions and 623 deletions.
10 changes: 4 additions & 6 deletions generators/fastlane-env/index.js
Expand Up @@ -79,22 +79,20 @@ class FastlaneEnvGenerator extends Base {
name: 'appName',
message: 'The app name for this environment',
default: 'My App',
when: answers =>
['hockeyapp', 'appstore'].includes(answers.deploymentPlatform),
},
{
type: 'input',
name: 'appNameIOS',
name: 'iosAppCenterId',
message:
'The iOS app name for this environment. Name should be different from the Android app and not contain spaces',
'The iOS project id on AppCenter, should be different than Android and not contain spaces',
default: 'MyApp-ios',
when: answers => answers.deploymentPlatform === 'appcenter',
},
{
type: 'input',
name: 'appNameAndroid',
name: 'androidAppCenterId',
message:
'The Android app name for this environment. Name should be different from the iOS app and not contain spaces',
'The Android project id on AppCenter, should be different than iOS and not contain spaces',
default: 'MyApp-android',
when: answers => answers.deploymentPlatform === 'appcenter',
},
Expand Down
8 changes: 4 additions & 4 deletions generators/fastlane-env/templates/fastlane/env
Expand Up @@ -5,8 +5,8 @@ REPO_GIT_BRANCH='<%= repoGitBranch %>'

### IOS ###
IOS_PROJECT_PATH='ios'
<% if (deploymentPlatform !== 'appcenter') { %>IOS_APP_NAME='<%= appName %>'<% } %>
<% if (deploymentPlatform === 'appcenter') { %>IOS_APP_NAME='<%= appNameIOS %>'<% } %>
IOS_APP_NAME='<%= appName %>'
<% if (deploymentPlatform === 'appcenter') { %>IOS_APPCENTER_APP_ID='<%= iosAppCenterId %>'<% } %>
IOS_PROJECT_NAME='<%= projectName %>'
IOS_APP_ID='<%= appId %>'
IOS_TEAM_ID='<%= appleTeamId %>'
Expand All @@ -33,7 +33,7 @@ IOS_IPA_PATH='./dist/app.ipa'
ANDROID_PROJECT_DIR='android'
ANDROID_APK_PATH='android/app/build/outputs/apk/app-release.apk'
GRADLE_APP_IDENTIFIER='<%= appId %>'
<% if (deploymentPlatform !== 'appcenter') { %>GRADLE_APP_NAME='<%= appName %>'<% } %>
<% if (deploymentPlatform === 'appcenter') { %>GRADLE_APP_NAME='<%= appNameAndroid %>'<% } %>
GRADLE_APP_NAME='<%= appName %>'
<% if (deploymentPlatform === 'appcenter') { %>ANDROID_APPCENTER_APP_ID='<%= androidAppCenterId %>'<% } %>
GRADLE_KEYSTORE='<%= lowerCaseProjectName %>.<%= environmentName %>.keystore'
GRADLE_KEYSTORE_ALIAS='<%= lowerCaseProjectName %>'
4 changes: 2 additions & 2 deletions generators/fastlane-setup/templates/fastlane/Fastfile
Expand Up @@ -107,7 +107,7 @@ platform :ios do
appcenter_upload(
api_token: ENV['FL_APPCENTER_API_TOKEN'],
owner_name: ENV['APPCENTER_USERNAME'],
app_name: ENV['IOS_APP_NAME'],
app_name: ENV['IOS_APPCENTER_APP_ID'],
ipa: ENV['IOS_IPA_PATH']
)
end
Expand Down Expand Up @@ -159,7 +159,7 @@ platform :android do
appcenter_upload(
api_token: ENV['FL_APPCENTER_API_TOKEN'],
owner_name: ENV['APPCENTER_USERNAME'],
app_name: ENV['GRADLE_APP_NAME'],
app_name: ENV['ANDROID_APPCENTER_APP_ID'],
apk: ENV['ANDROID_APK_PATH']
)
end
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -54,10 +54,10 @@
"jest": "^21.2.1",
"prettier": "^1.11.1",
"semantic-release": "^15.9.9",
"travis-deploy-once": "^5.0.2",
"validate-commit-msg": "^2.14.0",
"yeoman-environment": "^2.0.5",
"yeoman-test": "^1.7.0",
"travis-deploy-once": "^5.0.2"
"yeoman-test": "^1.7.0"
},
"config": {
"commitizen": {
Expand Down

0 comments on commit bb58ec9

Please sign in to comment.