Skip to content

Commit

Permalink
ci: update gradle settings so it builds add new update since tags script
Browse files Browse the repository at this point in the history
  • Loading branch information
bendavies99 committed Jun 2, 2023
1 parent 326f69a commit 89965a2
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 61 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
plugins {
id 'application'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '3.1.0'
}

sourceCompatibility = '17'
targetCompatibility = '17'
mainClassName = 'net.bdavies.BabbleBot'

application {
mainClassName = 'net.bdavies.BabbleBot'
applicationName = 'Babblebot'
}


dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:3.1.0")
Expand Down
110 changes: 53 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,98 +1,94 @@
{
"repository": {
"type": "git",
"url": "git+https://github.com/bendavies99/BabbleBot-Server.git"
"repository" : {
"type" : "git",
"url" : "git+https://github.com/bendavies99/BabbleBot-Server.git"
},
"bugs": {
"url": "https://github.com/bendavies99/BabbleBot-Server/issues"
"bugs" : {
"url" : "https://github.com/bendavies99/BabbleBot-Server/issues"
},
"homepage": "https://github.com/bendavies99/BabbleBot-Server#readme",
"devDependencies": {
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.2.0",
"@semantic-release/release-notes-generator": "^9.0.1",
"commitlint": "^11.0.0",
"conventional-changelog-conventionalcommits": "^4.5.0",
"cz-conventional-changelog": "^3.3.0",
"gradle-semantic-release-plugin": "^1.4.13",
"husky": "^4.3.6",
"lint-staged": "^10.5.3",
"prettier": "^2.2.1",
"remark-cli": "^9.0.0",
"remark-preset-lint-recommended": "^5.0.0",
"semantic-release": "^17.3.0"
"homepage" : "https://github.com/bendavies99/BabbleBot-Server#readme",
"devDependencies" : {
"@semantic-release/changelog" : "^5.0.1",
"@semantic-release/commit-analyzer" : "^8.0.1",
"@semantic-release/exec" : "^5.0.0",
"@semantic-release/git" : "^9.0.0",
"@semantic-release/github" : "^7.2.0",
"@semantic-release/release-notes-generator" : "^9.0.1",
"commitlint" : "^11.0.0",
"conventional-changelog-conventionalcommits" : "^4.5.0",
"cz-conventional-changelog" : "^3.3.0",
"gradle-semantic-release-plugin" : "^1.4.13",
"husky" : "^4.3.6",
"lint-staged" : "^10.5.3",
"prettier" : "^2.2.1",
"remark-cli" : "^9.0.0",
"remark-preset-lint-recommended" : "^5.0.0",
"semantic-release" : "^17.3.0"
},
"scripts": {
"release": "semantic-release"
"scripts" : {
"release" : "semantic-release"
},
"remarkConfig": {
"plugins": ["remark-preset-lint-recommended"]
"remarkConfig" : {
"plugins" : [
"remark-preset-lint-recommended"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
"husky" : {
"hooks" : {
"commit-msg" : "commitlint -E HUSKY_GIT_PARAMS"
}
},
"release": {
"branches": [
"release" : {
"branches" : [
"master",
{
"name": "next",
"channel": "channel-next",
"prerelease": "rc"
"name" : "next",
"channel" : "channel-next",
"prerelease" : "rc"
},
{
"name": "2.x.x",
"range": "2.x.x",
"channel": "2.x.x"
"name" : "2.x.x",
"range" : "2.x.x",
"channel" : "2.x.x"
}
],
"plugins": [
"plugins" : [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"gradle-semantic-release-plugin",
[
"@semantic-release/exec",
{
"prepareCmd": "bash -c \"rm -rf ./app/build/distributions && ./gradlew assembleDist\""
"prepareCmd" : "bash -c \"rm -rf ./app/build/distributions && ./gradlew assembleDist\""
}
],
[
"@semantic-release/github",
"@semantic-release/exec",
{
"assets": [
{
"path": "app/build/distributions/*.tar",
"label": "Tar Archive"
},
{
"path": "app/build/distributions/*.zip",
"label": "Zip Archive"
}
]
"prepareCmd" : "bash -c \"./scripts/update-since-tags.sh\""
}
],
[
"@semantic-release/github"
],
[
"@semantic-release/git",
{
"assets": [
"assets" : [
"gradle.properties",
"CHANGELOG.md"
]
}
]
]
},
"engines": {
"node": "^12.12.0"
"engines" : {
"node" : "^12.12.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
"config" : {
"commitizen" : {
"path" : "./node_modules/cz-conventional-changelog"
}
}
}
34 changes: 34 additions & 0 deletions scripts/update-since-tags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# MIT License
#
# Copyright (c) 2020 Ben Davies
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#



version=$(grep -E 'version\s*=\s*([a-zA-Z0-9\-\.]+)' ./gradle.properties | cut -d " " -f3)

for i in `find . -name "*.java" -type f`; do
echo "Updating since in file $i"
sed -i "/__RELEASE_VERSION__/c\ \* @since \\$version" $i
done

16 changes: 14 additions & 2 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.0'
id 'io.spring.dependency-management' version '1.1.0'
id 'org.asciidoctor.jvm.convert' version '2.4.0'
id 'org.liquibase.gradle' version '2.2.0'
id 'org.springframework.boot' version '3.1.0'
}

sourceCompatibility = '17'
Expand All @@ -19,6 +19,18 @@ repositories {
mavenCentral()
}

bootJar {
enabled = false
}

bootRun {
enabled = false
}

bootBuildImage {
enabled = false
}

dependencies {
implementation project(':api')
implementation 'org.springframework.boot:spring-boot-starter-actuator'
Expand All @@ -34,7 +46,7 @@ dependencies {
}
implementation 'commons-io:commons-io:2.11.0'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
Expand Down

0 comments on commit 89965a2

Please sign in to comment.