Skip to content

Commit 6266c61

Browse files
authored
fix deploy commands (#313)
1 parent c918994 commit 6266c61

File tree

3 files changed

+12
-45
lines changed

3 files changed

+12
-45
lines changed

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ android:
33
components:
44
- tools
55
- platform-tools
6-
- tools
76

87
- build-tools-28.0.3
9-
10-
# The SDK version used to compile your project
118
- android-28
129

1310
- extra-google-google_play_services
@@ -29,17 +26,18 @@ cache:
2926

3027
before_install:
3128
- java -v
32-
- which docker; echo
3329

3430
script:
35-
- make gradlewTravis
31+
- make testSDK
3632

3733
after_success:
38-
- make releaseArtifacts
34+
- make releasePoms
35+
- curl -fL https://getcli.jfrog.io | sh ; mv jfrog $HOME/bin
36+
- export JFROG_CLI_OFFER_CONFIG=false
3937

4038
deploy:
4139
- provider: script
40+
skip_cleanup: true
4241
script: ./Tools/deploy.py
4342
on:
4443
tags: true
45-

Makefile

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,21 @@
44
#
55
####################################################################
66

7-
SDK_BUILD_IMAGE:=leanplum/android-sdk-build:latest
8-
DOCKER_RUN:=docker run \
9-
--tty --interactive --rm \
10-
--volume `pwd`/..:/leanplum \
11-
--env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
12-
--env DEBUG=1 \
13-
--workdir /leanplum/Leanplum-Android-SDK \
14-
${SDK_BUILD_IMAGE}
15-
16-
clean-local-properties:
17-
rm -f local.properties
18-
19-
GRADLE_COMMANDS:=assembleRelease testReleaseUnitTest generatePomFileForAarPublication
20-
sdk: clean-local-properties
21-
gradle clean ${GRADLE_COMMANDS}
22-
23-
sdk-in-container:
24-
${DOCKER_RUN} make sdk
25-
26-
shell:
27-
${DOCKER_RUN} bash
28-
29-
build-image:
30-
docker build -t ${SDK_BUILD_IMAGE} . -f Tools/jenkins/build.dockerfile
31-
32-
.PHONY: build
33-
34-
GRADLE_COMMAND:=assembleDebug testDebugUnitTest assembleRelease generatePomFileForAarPublication
35-
gradlewTravis:
36-
./gradlew ${GRADLE_COMMAND}
7+
testSDK:
8+
./gradlew assembleRelease testReleaseUnitTest
379

3810
patchReleaseBranch:
3911
./Tools/create-release.bash patch
4012

41-
releaseArtifacts: releaseBinaries releasePoms
42-
4313
releaseBinaries:
4414
./gradlew assembleRelease
4515

4616
releasePoms:
4717
./gradlew generatePomFileForAarPublication
4818

49-
deployArtifacts:
50-
./Tools/deploy.py
19+
releaseArtifacts: releaseBinaries releasePoms
5120

5221
tagCommit:
53-
git tag `cat sdk-version.txt`; git push --tags
22+
git tag `cat sdk-version.txt`; git push origin `cat sdk-version.txt`
5423

55-
deploy: tagCommit releaseArtifacts deployArtifacts
24+
deploy: tagCommit

Tools/deploy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, project, package):
3030
Artifact(
3131
"/build/publications/aar/pom-default.xml", "pom"),
3232
Artifact("/build/outputs/aar/" +
33-
project + "-release.aar", "aar"),
33+
project + ".aar", "aar"),
3434
]
3535

3636
def validate(self):
@@ -74,7 +74,7 @@ def deployArtifacts(localPath, artifactoryPath, bintrayPath):
7474

7575

7676
def artifactoryDeploy(source, destination):
77-
flags = "--url=https://artifactory.leanplum.com --apikey=os.environ['JFROG_CLI_API_KEY']"
77+
flags = "--url=https://artifactory.leanplum.com --apikey=" + os.environ['JFROG_CLI_API_KEY']
7878
command = "jfrog rt u " + source + " " + destination + " " + flags
7979
# print command
8080
os.system(command)

0 commit comments

Comments
 (0)