Skip to content

Commit

Permalink
Remove the artifact of the same version if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
64json committed Jun 23, 2019
1 parent efdf5c7 commit 5cf5fdf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ deploy:

# Trigger JitPack to build
- provider: script
script: .travis/jitpack.sh $TRAVIS_TAG
script: .travis/jitpack.sh $JITPACK_ACCESS_TOKEN $TRAVIS_TAG
on:
tags: true

Expand All @@ -40,3 +40,5 @@ env:
- secure: hEgt5ke7q8FouZlRjKTq6eXWSKOAzEK3Li8ffBl7WdcXgorRH7C6dY4aXldHNaG4+R2FCOSzwf8ke5XYZRJT/J45QKWAapJ/hTOqzjD2kWBf0sBcshLrSsyKWx3o6n0jaO8Owv+pgw0f4IcEIOoGW0Lj6Sq1RmErn6i8Whi9FIV9BSKG/ICpyPA+iqqpwYdZzP87D/w4wrlYzSOwLfmM08m46n/xsBiazNFH+Urj4/a9Lo2doA6FoCcFyc8wPQ0naX/y1Mj2UyJdlhVAqgmHGZ06DWpl8sUAXos/gCLOrSRgittjyDh+echRsziIJCBuIHdx1vSyUWiGpLzrb42FM6QuD0GoqqXbK84dm9rdK43rO/jBbGgib5xJK3itguqRk6BlSgMoYMZ5Fiv4uo42UDwgz+XF6xfw84eJdbwk+GtGzN5VgH9Qgnkl6sDsEkvPUAR6tlXvqP8s9Jkvkc4Xte4pXDL/m8Penv3ZBfwGsQQXB6tYEVS452HbhqPPRgrGM0LTGXIf/GyfLq2wEl1xVHZNcb7IP/I61X5A6B9szhtITqft6YEmAgyB8wdoQh8g/7pl8cFIh1kRvzS/MzMBaYhORS1kDbukYFLvscVwLwedUohsNlfpek744E1OUP26YYxwPF1NU2ym1R/hZ/M8O/C2gwAa8bZtRKQcQDDv/GY=
# TRAVIS_ACCESS_TOKEN
- secure: r2CXlCj8MkmlF+TPpBaRXy8Kl7le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FDdyGqtyaAPe1lOF4SR3qqSTuxNdVsx9Ll0VZPGVhWMmrUr6kJfhIIW/eCrUwsQVGoJoeYQEcf3EGEEa/NtzHdNbITy3EZ68Gg29Pf6T+dJE/HtnuMrMvLeaKRovk/Ry60yDPIwTQohBCl3r6uL2pSj7hxacP2byeAB4CxxweBeX/pPIEP6LzqYOdmJ9Tv42JgPFYlbf8gjXS2arJTl3+sOALWgKYO9wsFnCxaP3739j1l6W01hp1Xpc2px0c9+faSMzvRE=
8 changes: 7 additions & 1 deletion .travis/jitpack.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/usr/bin/env bash

TRAVIS_TAG=$1
JITPACK_ACCESS_TOKEN=$1
TRAVIS_TAG=$2
GROUP_ID="org.algorithm-visualizer"
ARTIFACT_ID="tracers.java"
MAX_RETRIES=42
INTERVAL=5

# Remove the artifact of the same version if it already exists
curl -u${JITPACK_ACCESS_TOKEN}: -X DELETE "https://jitpack.io/api/builds/${GROUP_ID}/${ARTIFACT_ID}/${TRAVIS_TAG}"

for (( i=1; i<=MAX_RETRIES; ++i)); do
STATUS_CODE=$(curl -s -o /dev/stderr -w "%{http_code}" \
-H "Content-Type: application/json" \
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'java-library'
apply plugin: 'maven'

group = 'org.algorithm-visualizer'
version = '2.3.9'
version = '2.3.10'
sourceCompatibility = 1.8

repositories {
Expand Down

0 comments on commit 5cf5fdf

Please sign in to comment.