Skip to content

Commit

Permalink
Include service scripts and all wrapper files in generic release
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp committed Jan 21, 2023
1 parent 3c0ab9d commit 70eed43
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 49 deletions.
1 change: 0 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions core/src/main/resources/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- version: "v5.0.5"
changes:
- type: "feature"
text: "Include service scripts for windows and linux in generic release"
final: true
- version: "v5.0.4"
date: "2023-01-22"
changes:
Expand Down
74 changes: 37 additions & 37 deletions misc/build-and-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,43 @@ if (-not $?) {
exit 1
}

if ($dryRun) {
Write-Host "Committing (not really, just dry run) ***********************************************************************"
} else {
Write-Host "Committing ***********************************************************************"
git commit -am "Update to $version"
if (-not $?) {
Write-Error "Commit failed"
git reset --hard
exit 1
}
}

if ($dryRun) {
Write-Host "Tagging (not really, just dry run) ***********************************************************************"
} else {
Write-Host "Tagging ***********************************************************************"
git tag -a v$version -m v$version
if (-not $?) {
Write-Error "Tagging failed"
git reset --hard
exit 1
}
}

if ($dryRun) {
Write-Host "Pushing (not really, just dry run) ***********************************************************************"
} else {
Write-Host "Pushing ***********************************************************************"
git push
git push origin v$version
if (-not $?) {
Write-Error "Pushing failed"
git reset --hard
exit 1
}
}


Write-Host "Building core jar"
exec { mvn -q -pl org.nzbhydra:nzbhydra2,org.nzbhydra:shared,org.nzbhydra:mapping,org.nzbhydra:assertions,org.nzbhydra:core clean install -B -T 1C `-DskipTests=true}
Expand Down Expand Up @@ -164,43 +201,6 @@ Write-Host "Building releases **************************************************
exec { mvn -q -pl org.nzbhydra:windows-release,org.nzbhydra:generic-release,org.nzbhydra:linux-release clean install -T 1C `-DskipTests=true}


if ($dryRun) {
Write-Host "Committing (not really, just dry run) ***********************************************************************"
} else {
Write-Host "Committing ***********************************************************************"
git commit -am "Update to $version"
if (-not $?) {
Write-Error "Commit failed"
git reset --hard
exit 1
}
}

if ($dryRun) {
Write-Host "Tagging (not really, just dry run) ***********************************************************************"
} else {
Write-Host "Tagging ***********************************************************************"
git tag -a v$version -m v$version
if (-not $?) {
Write-Error "Tagging failed"
git reset --hard
exit 1
}
}

if ($dryRun) {
Write-Host "Pushing (not really, just dry run) ***********************************************************************"
} else {
Write-Host "Pushing commits and tags ***********************************************************************"
git push
git push origin v$version
if (-not $?) {
Write-Error "Pushing failed"
git reset --hard
exit 1
}
}

if ($dryRun) {
Write-Host "Releasing to github (not really, just dry run) ***********************************************************************"
exec { mvn -B org.nzbhydra:github-release-plugin:3.0.0:release `-DdryRun }
Expand Down
1 change: 1 addition & 0 deletions misc/rsyncToHome.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rsync -rvu --exclude "target" --exclude "bower_components" --exclude "node_modules" --exclude ".git" --exclude ".idea" --exclude "results" --exclude "*.db" --exclude "venv*" . ~/nzbhydra2/
6 changes: 0 additions & 6 deletions other/mockserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
<scope>compile</scope>
</dependency>
</dependencies>


Expand Down
19 changes: 19 additions & 0 deletions releases/generic-release/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,24 @@
</includes>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<!-- Include service scripts -->
<directory>../linux-release/include</directory>
<outputDirectory>./</outputDirectory>
<excludes>
<exclude>core</exclude>
<exclude>nzbhydra</exclude>
</excludes>
</fileSet>
<fileSet>
<!-- Include service scripts -->
<directory>../windows-release/include</directory>
<outputDirectory>./</outputDirectory>
<includes>
<include>WindowsService</include>
<include>NZBHydra2.exe</include>
<include>NZBHydra2 Console.exe</include>
</includes>
</fileSet>
</fileSets>
</assembly>
5 changes: 0 additions & 5 deletions shared/mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
Expand Down

0 comments on commit 70eed43

Please sign in to comment.