aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenny Even Danan <menny@evendanan.net>2020-07-06 03:23:32 +0000
committerGitHub <noreply@github.com>2020-07-06 03:23:32 +0000
commit371fab74a1ee02c665dd556d3e0621853bba0ea6 (patch)
tree2ff17a42470e934cbb9fb73aa96415c3068e78c4
parentbbf9948676d07946c4fa67ee430d4bf13730c4f2 (diff)
parent252638700c668f1cc7c7c3b75e825739bceec52a (diff)
downloadAnySoftKeyboard-371fab74a1ee02c665dd556d3e0621853bba0ea6.tar.gz
AnySoftKeyboard-371fab74a1ee02c665dd556d3e0621853bba0ea6.tar.bz2
Merge pull request #2362 from menny/delayed-deploy
Deploy steps could be no-op
-rw-r--r--.github/workflows/third_party_update.yml5
-rw-r--r--buildSrc/src/main/java/deployment/DeploymentPlugin.java1
-rw-r--r--deployment/build.gradle12
3 files changed, 13 insertions, 5 deletions
diff --git a/.github/workflows/third_party_update.yml b/.github/workflows/third_party_update.yml
index 3a4e35e59..7ace47e6d 100644
--- a/.github/workflows/third_party_update.yml
+++ b/.github/workflows/third_party_update.yml
@@ -35,8 +35,11 @@ jobs:
LATEST_VERSION=$(curl --silent -u "${BOT_USERNAME}:${BOT_TOKEN}" https://api.github.com/repos/gradle/gradle/releases | jq -c -r '.[] | select(.prerelease == false) | .name' | grep -o "${GREP_VERSION_CLASSES}" | uniq | head -n 1)
echo "Found version '${LATEST_VERSION}'."
./gradlew wrapper --gradle-version="${LATEST_VERSION}"
+ ./gradlew wrapper --gradle-version="${LATEST_VERSION}"
- name: Sanity verification
- run: ./gradlew :api:assembleDebug :api:lintDebug
+ run: |
+ ./gradlew :api:assembleDebug :api:lintDebug
+ ./gradlew :api:assembleDebug :api:lintDebug
- name: Add changed gradle files
run: |
git add -f gradlew*
diff --git a/buildSrc/src/main/java/deployment/DeploymentPlugin.java b/buildSrc/src/main/java/deployment/DeploymentPlugin.java
index d6ae4a542..3e2584a21 100644
--- a/buildSrc/src/main/java/deployment/DeploymentPlugin.java
+++ b/buildSrc/src/main/java/deployment/DeploymentPlugin.java
@@ -64,6 +64,7 @@ public class DeploymentPlugin implements Plugin<Project> {
stepIndex < config.environmentSteps.size();
stepIndex++) {
final String stepName = config.environmentSteps.get(stepIndex);
+ if (stepName.isEmpty()) continue;
project.getTasks()
.register(
String.format(
diff --git a/deployment/build.gradle b/deployment/build.gradle
index c62b77143..25335e421 100644
--- a/deployment/build.gradle
+++ b/deployment/build.gradle
@@ -25,14 +25,14 @@ deployments {
environmentSteps = ['alpha_100', 'beta_100']
}
imeProduction {
- environmentSteps = ['production_010', 'production_020', 'production_030', 'production_040', 'production_050', 'production_075', 'production_100']
+ environmentSteps = ['production_010', '', 'production_020', '', '', 'production_030', 'production_040', 'production_050', '', '', '', 'production_075', '', 'production_100']
}
addOnsMaster {
environmentSteps = ['beta_100']
}
addOnsProduction {
- environmentSteps = ['production_010', 'production_050', 'production_100']
+ environmentSteps = ['production_010', '', 'production_050', '', 'production_100']
}
}
@@ -50,9 +50,13 @@ long getDaysFromLastCommitFromGit() {
static String getTaskNameByStepFor(Project project, String processName, long step) {
def processSteps = project.deployments.named(processName).get().environmentSteps
if (step >= processSteps.size()) {
- step = processSteps.size() - 1
+ return 'noOpDeployTask'
}
- return "deploymentRequest_${processName}_${processSteps[step]}"
+ def targetEnvironment = processSteps[step]
+ if (targetEnvironment == '') {
+ return 'noOpDeployTask'
+ }
+ return "deploymentRequest_${processName}_${targetEnvironment}"
}
//////// start - IME