Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix the release script #2325

Merged
merged 5 commits into from
Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "com.diffplug.gradle.spotless" version "3.23.1"
id "com.github.b3er.local.properties" version "1.1"
}

def rootConfiguration = {}
Expand All @@ -15,6 +16,8 @@ def YOUTUBE_API_KEY = System.getenv('YOUTUBE_API_KEY') ?: "YOUR_API_KEY"
//noinspection SpellCheckingInspection
def MAPBOX_API_KEY = '"'+System.getenv('MAPBOX_API_KEY')+'"' ?: '"DEFAULT"'

def LOCAL_KEY_PRESENT = project.hasProperty('SIGNING_KEY_FILE') && rootProject.file(SIGNING_KEY_FILE).exists()

android {
compileSdkVersion rootConfiguration.compileSdkVersion

Expand All @@ -35,12 +38,34 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

signingConfigs {
if (CIRCLE_BUILD) {
release {
storeFile KEYSTORE_FILE
storePassword System.getenv("STORE_PASS")
keyAlias System.getenv("ALIAS")
keyPassword System.getenv("KEY_PASS")
}
} else if (LOCAL_KEY_PRESENT) {
release {
storeFile rootProject.file(SIGNING_KEY_FILE)
storePassword STORE_PASS
keyAlias ALIAS
keyPassword KEY_PASS
}
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "SPEAKER_BASE_URL", '"http://10.0.0.1:5000"'
buildConfigField "String", "MAPBOX_API_KEY", MAPBOX_API_KEY

if (LOCAL_KEY_PRESENT || CIRCLE_BUILD)
signingConfig signingConfigs.release
}

debug {
Expand Down
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ allprojects {
repositories {
google()
}

ext {
KEYSTORE_FILE = rootProject.file('scripts/key.jks')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been exec/key.jks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the open event repo, there is a folder called exec, inside which all the files were kept. But here we have a folder named scripts, where such files are kept. So I used scripts there.

Can you please tell what's the use of the above statement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are saying completely opposite things. open event repo has scripts folder and that's why scripts was used and susi has exec folder. You didn't change anything. You just copied. You should have changed this to exec

CIRCLE_BUILD = System.getenv("CIRCLE") == "true" && KEYSTORE_FILE.exists()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show me where does it say that CircleCI Builds have CIRCLE as an environment variable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to CIRCLECI. This is present in the documentation.

}
}