Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,21 @@ Copy *tools* directory into *gui-database* to make it work properly.
* Update and commit *dist/version.info* file according to desired version
* Make working directory clean (commit/push or stash changes)
* Check version: execute *currentVersion* task from Gradle
* Execute *release* task from Gradle to automatically select release tag version, or *release -Prelease.forceVersion=[version]* to specify a version.

...it will:

* Set local tag *tduf-[version]*
* Push it to remote.
* Perform release manually or via Github

### Preparing next development version ###

* Execute *markNextVersion -Prelease.forceVersion=[version]* task from Gradle to specify next dev version.
* Update and commit *dist/version.info* file according to desired development (alpha) version

### Packaging ###

This needs a release tag to be set, see *Releasing* section above.

* Checkout project from target release tag *tduf-[version]*
* Execute one ok *pack...* tasks from Gradle:
- packCore: minimal set to run CLI with LIB
- packDatabaseEditor: minimal set to run Database Editor
- packFull: all TDUF in a single package.
- `packCore`: minimal set to run CLI with LIB
- `packDatabaseEditor`: minimal set to run Database Editor
- `packFull`: all TDUF in a single package.

...it will:

Expand Down
20 changes: 11 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@ buildscript {
}

plugins {
id 'pl.allegro.tech.build.axion-release' version '1.10.3'
id 'org.kordamp.markdown.convert' version '1.2.0'
}

// configures version for release plugin
scmVersion {
tag {
prefix = 'tduf'
}
}

// Helper script
apply from: './src/main/groovy/helper.gradle'

Expand All @@ -24,7 +16,7 @@ allprojects {
project.group = 'fr.tduf'

// version defined by plugin (if changes or ahead commits: x.y.z-SNAPSHOT)
project.version = scmVersion.version
project.version = getCurrentVersion

// Version for common dependencies
ext {
Expand Down Expand Up @@ -430,3 +422,13 @@ task copyIcons(type: Copy) {
include 'TDU-256px.ico'
into 'pack/icons'
}

task currentVersion() {
description('Displays current version to console')
group('help')

doLast {
println "Current version is ${project.version}."
}
}

2 changes: 1 addition & 1 deletion dist/version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1-SNAPSHOT
18 changes: 18 additions & 0 deletions src/main/groovy/helper.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,31 @@ def databaseEditorPackDependencies = { ->
*commonPackDeps ]
}

/**
* @returns current version, as specified in dist/version.info file
*/
def currentVersion = { ->
File file = new File('./dist/version.info')
def version = ""
file.withReader { reader ->
def line = reader.readLine()
if (line == null) {
version = 'NA'
} else {
version = line
}
}
return version
}

ext {
getCoreProjects = { -> coreProjects }
getFullProjects = { -> fullProjects }
getDatabaseEditorProjects = { -> databaseEditorProjects }
getCoreDependencies = corePackDependencies
getFullDependencies = fullPackDependencies
getDatabaseEditorDependencies = databaseEditorPackDependencies
getCurrentVersion = currentVersion
LINUX_TARGET = PARAM_LINUX_TARGET
WINDOWS_TARGET = PARAM_WINDOWS_TARGET
}