Skip to content

Commit 2b12e40

Browse files
committed
Merge branch 'develop'
2 parents c18194c + 9a0081d commit 2b12e40

File tree

21 files changed

+697
-49
lines changed

21 files changed

+697
-49
lines changed

CHANGELOG.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
11
# Changelog
22

3+
## Version 0.3.0
4+
5+
Released on *2025-03-15*
6+
7+
### Improved:
8+
9+
- Removed all restrictions on executor services
10+
- Improved logging
11+
- Improved error handling in the REPL
12+
13+
## Development:
14+
15+
- Upgrade to gradle 8
16+
17+
18+
## Version 0.2.0
19+
20+
Released on *2023-12-16*
21+
22+
### Improved:
23+
24+
- Added all minibase keywords to SqlRepl
25+
- Added module definition and utf-8 encoding explicitly
26+
327
## Version 0.1.0
428

5-
Released on *2023-xx-xx*
29+
Released on *2023-01-11*
30+
31+
### Migration:
32+
33+
- Project migrated from the main `miniconnect` repo
34+
- Split to two projects: `repl` (a little neutral REPL framework) and `client`
635

7-
**Migration:**
36+
### Improved:
837

9-
- Project migrated from the main miniconnect repo
10-
- Splitted to two projects: `repl` (a little neutral REPL framework) and `client`
38+
- New `regexbee` version

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
11
# MiniConnect client
22

3-
Command line client for miniConnect
3+
Command line REPL client for miniConnect
4+
5+
## Installation
6+
7+
[See the Releases page for downloadable artifacts](https://github.com/miniconnect/miniconnect-client/releases)
8+
9+
Currently, there are two distributions available for download:
10+
11+
- **fat jar**: standalone all-in-one jar file, can be executed with `java -jar <...>`
12+
- **debian package**: standard package for any Debian based OS,
13+
installs `micl` and `miniconnect-client` binaries and their accessories
14+
15+
## Usage
16+
17+
You can connect to a miniConnect server with the `micl` (or `miniconnect-client`) command:
18+
19+
```bash
20+
micl
21+
```
22+
23+
In case of custom server and port:
24+
25+
```bash
26+
micl server.local:9876
27+
```

build.gradle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ allprojects {
3232
group 'hu.webarticum.miniconnect.client'
3333
version automaticVersion
3434

35-
ext.miniConnectApiVersion = '0.1.0-SNAPSHOT'
36-
ext.miniConnectVersion = '0.3.1-SNAPSHOT'
35+
ext.miniConnectApiVersion = '0.3.0'
36+
ext.miniConnectVersion = '0.6.0'
3737

3838
repositories {
3939
mavenCentral()
@@ -66,6 +66,7 @@ subprojects {
6666
}
6767

6868
tasks.withType(JavaCompile) {
69+
options.encoding = 'UTF-8'
6970
options.release = 8
7071
}
7172

@@ -78,6 +79,16 @@ subprojects {
7879
options.addStringOption('Xdoclint:none', '-quiet')
7980
}
8081

82+
def moduleNamePrefix = 'hu.webarticum.miniconnect.'
83+
def cleanProjectName = project.name.replaceAll(/\W/, ".")
84+
def moduleName = "${moduleNamePrefix}${cleanProjectName}"
85+
86+
jar {
87+
manifest {
88+
attributes('Automatic-Module-Name': moduleName)
89+
}
90+
}
91+
8192
test {
8293
useJUnitPlatform()
8394
testLogging {

gradle/wrapper/gradle-wrapper.jar

818 Bytes
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

8888
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac

gradlew.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

projects/client/build.gradle

Lines changed: 103 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
plugins {
22
id 'java-library'
33
id 'application'
4-
id 'eclipse'
54
id 'com.github.johnrengelman.shadow' version '7.1.2'
5+
id "com.netflix.nebula.ospackage" version "11.8.1"
66
}
77

8+
apply from: 'helpers.gradle'
9+
10+
import org.apache.tools.ant.filters.ReplaceTokens
11+
812
sourceCompatibility = 1.8
913
targetCompatibility = 1.8
1014

11-
description "MiniConnect REPL"
15+
description "Command line database client for miniconnect"
16+
17+
def deploymentName = 'miniconnect-client'
18+
def executableName = 'micl'
19+
def longExecutableName = deploymentName
20+
def maintainerName = 'Dávid Horváth'
21+
def maintainerEmail = 'horvath@webarticum.hu'
22+
def websiteUrl = 'https://github.com/miniconnect/miniconnect-client'
23+
def mainClassName = 'hu.webarticum.miniconnect.client.client.ClientMain'
24+
def longDescription = """Connects to the specified server via miniconnect protocol.
25+
It's basically a SQL REPL that you can use to run queries.
26+
It displays result sets and error responses in a friendly manner."""
1227

1328
dependencies {
1429
implementation project(':repl')
@@ -24,9 +39,94 @@ dependencies {
2439
}
2540

2641
application {
27-
mainClass = "hu.webarticum.miniconnect.client.client.ClientMain"
42+
mainClass = mainClassName
2843
}
2944

3045
run {
3146
standardInput = System.in
3247
}
48+
49+
50+
task buildDebPackage(type: Deb, dependsOn: ['jar']) {
51+
File jarFile = jar.archiveFile.getAsFile().get();
52+
String jarFileName = jarFile.getName()
53+
54+
doFirst {
55+
mkdir 'build/deb-prepare'
56+
57+
// TODO: generate from picocli
58+
compressWithGzip9('packaging/deb/manpage', 'build/deb-prepare/manpage.gz')
59+
60+
def changelogData = parseChangelogMarkdown('../../CHANGELOG.md')
61+
buildDebianChangelog('build/deb-prepare/changelog', changelogData)
62+
compressWithGzip9('build/deb-prepare/changelog', 'build/deb-prepare/changelog.Debian.gz')
63+
64+
copy {
65+
from (file('packaging/deb/copyright'))
66+
into 'build/deb-prepare'
67+
filteringCharset = 'UTF-8'
68+
filter(ReplaceTokens, tokens: [
69+
'CURRENT_YEAR': new Date().format('yyyy').toString(),
70+
])
71+
}
72+
73+
copy {
74+
from (file('packaging/deb/start.sh'))
75+
into 'build/deb-prepare'
76+
filteringCharset = 'UTF-8'
77+
filter(ReplaceTokens, tokens: [
78+
'JAVA_ROOT': "/usr/share/${deploymentName}".toString(),
79+
'JAR_FILENAME': jarFileName.toString(),
80+
'MAIN_CLASS': mainClassName.toString(),
81+
])
82+
}
83+
}
84+
85+
dirMode 0755
86+
fileMode 0644
87+
user "root"
88+
permissionGroup "root"
89+
90+
packageName = deploymentName
91+
version = project.version
92+
release = null
93+
maintainer = maintainerName + ' <' + maintainerEmail + '>'
94+
url = websiteUrl
95+
summary = project.description
96+
packageDescription = longDescription
97+
98+
99+
// TODO: that dependency should be set?
100+
requires('default-jre').or('java8-runtime').or('java9-runtime')
101+
requires('jarwrapper')
102+
103+
from (jarFile) {
104+
into "/usr/share/${deploymentName}"
105+
}
106+
107+
from (file('build/deb-prepare/copyright')) {
108+
into "/usr/share/doc/${deploymentName}"
109+
}
110+
111+
from (file('build/deb-prepare/start.sh')) {
112+
into '/usr/bin'
113+
rename(/.*/, executableName)
114+
fileMode 0755
115+
}
116+
117+
from (file('build/deb-prepare/manpage.gz')) {
118+
into '/usr/share/man/man1'
119+
rename(/.*/, "${deploymentName}.1.gz")
120+
}
121+
122+
from (file('build/deb-prepare/changelog.Debian.gz')) {
123+
into "/usr/share/doc/${deploymentName}"
124+
}
125+
126+
link("/usr/bin/${longExecutableName}", executableName)
127+
link("/usr/share/man/man1/${executableName}.1.gz", "${deploymentName}.1.gz")
128+
129+
from (configurations.runtimeClasspath) {
130+
into "/usr/share/${deploymentName}/lib"
131+
}
132+
}

0 commit comments

Comments
 (0)