diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index cd0d451..ecd7f7d 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index 6282c3e..65d3a61 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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; } @@ -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') { @@ -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") { @@ -112,9 +111,9 @@ node { } } } - } finally { + } finally { stage("Cleanup") { deleteDir(); } - } + } } \ No newline at end of file diff --git a/README.md b/README.md index 2857aa5..e60cb0c 100644 --- a/README.md +++ b/README.md @@ -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! \ No newline at end of file +4. When I implement lidarr support I want to search by song instead of just artist/album (since lidarr doesn't support song search) \ No newline at end of file diff --git a/images/initial_commands.png b/images/initial_commands.png new file mode 100644 index 0000000..35daace Binary files /dev/null and b/images/initial_commands.png differ diff --git a/upload-release.sh b/upload-release.sh index ad691d4..2b3f644 100644 --- a/upload-release.sh +++ b/upload-release.sh @@ -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