Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
shayaantx committed Jan 18, 2020
2 parents bc4b290 + 7b65c34 commit 0fd58b7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
25 changes: 12 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def getChangelistDescription() {
def description = "";
def changeLogSets = currentBuild.changeSets;
for (int i = 0; i < changeLogSets.size(); i++) {
def entries = changeLogSets[i].items;
for (int j = 0; j < entries.length; j++) {
def entry = entries[j]
description += "${entry.commitId} by ${entry.author} on ${new Date(entry.timestamp)}: ${entry.msg}\n";
}
def entries = changeLogSets[i].items;
for (int j = 0; j < entries.length; j++) {
def entry = entries[j]
description += "${entry.commitId} by ${entry.author} on ${new Date(entry.timestamp)}: ${entry.msg}\n";
}
}
return description;
}
Expand All @@ -41,7 +41,7 @@ def getNextVersion(scope) {
node {
try {
stage("Checkout") {
checkout([$class: 'GitSCM', branches: [[name: '**']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'git-user', url: 'https://github.com/shayaantx/botdar.git']]])
checkout([$class: 'GitSCM', branches: [[name: '**']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github', url: 'https://github.com/shayaantx/botdar.git']]])
}

stage('Prepare docker') {
Expand All @@ -55,17 +55,16 @@ node {
def image = docker.build("botdar-image", "-f ./Dockerfile .");
image.inside('-u root') {
stage('Build') {
sh 'mvn -version'
sh 'mvn compile'
sh './mvnw --no-transfer-progress compile'
}

stage("Test") {
sh 'mvn test'
sh './mvnw --no-transfer-progress test'
}

stage("Package") {
fileOperations([fileCreateOperation(fileContent: "version=${tag}", fileName: './src/main/resources/version.txt')]);
sh 'mvn package'
sh './mvnw --no-transfer-progress package -DskipTests'
}

stage("Archive") {
Expand Down Expand Up @@ -112,9 +111,9 @@ node {
}
}
}
} finally {
} finally {
stage("Cleanup") {
deleteDir();
}
}
}
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,4 @@ TODO: need to add more tips for sonarr
1. Interactive season search/download (only available in v3 sonarr)
2. Per episode search/download
3. Cancelling/blacklisting downloads (movies and tvshows)
4. When I implement lidarr support I want to search by song instead of just artist/album (since lidarr doesn't support song search)
5. Test cases!
4. When I implement lidarr support I want to search by song instead of just artist/album (since lidarr doesn't support song search)
Binary file added images/initial_commands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions upload-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tag=${2}
name=${2}

description=$(echo "${3}" | sed -z 's/\n/\\n/g') # Escape
release=$(curl -XPOST -H "Authorization:token $token" --data "{\"tag_name\": \"$tag\", \"target_commitish\": \"master\", \"name\": \"$name\", \"body\": \"$description\", \"draft\": false, \"prerelease\": false}" https://api.github.com/repos/shayaantx/botdar/releases)
release=$(curl -XPOST -H "Authorization:token $token" --data "{\"tag_name\": \"$tag\", \"target_commitish\": \"master\", \"name\": \"$name\", \"body\": \"$description\", \"draft\": false, \"prerelease\": false}" https://api.github.com/repos/shayaantx/botdarr/releases)
id=$(echo "$release" | sed -n -e 's/"id":\ \([0-9]\+\),/\1/p' | head -n 1 | sed 's/[[:blank:]]//g')

curl -vv -XPOST -H "Authorization:token $token" -H "Content-Type:application/octet-stream" --data-binary @target/botdar-release.jar https://uploads.github.com/repos/shayaantx/botdar/releases/$id/assets?name=botdar-release.jar
curl -vv -XPOST -H "Authorization:token $token" -H "Content-Type:application/octet-stream" --data-binary @target/botdar-release.jar https://uploads.github.com/repos/shayaantx/botdarr/releases/$id/assets?name=botdar-release.jar

0 comments on commit 0fd58b7

Please sign in to comment.