From e777f3baf21793d33219b5450813ff0aca00c969 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Thu, 21 Nov 2024 00:07:57 +0300 Subject: [PATCH] Move to Woodpecker CI --- .drone.yml => .woodpecker.yml | 29 ++++------------------------- NSIS/installer.nsi | 2 +- README.md | 2 +- README_ES.md | 2 +- README_JP.md | 2 +- README_RU.md | 2 +- README_RYU.md | 2 +- src/main/java/tihwin/MainAppUi.java | 5 ++--- 8 files changed, 12 insertions(+), 34 deletions(-) rename .drone.yml => .woodpecker.yml (58%) diff --git a/.drone.yml b/.woodpecker.yml similarity index 58% rename from .drone.yml rename to .woodpecker.yml index 791b934..f31d6f7 100644 --- a/.drone.yml +++ b/.woodpecker.yml @@ -1,7 +1,3 @@ -kind: pipeline -type: docker -name: default - steps: - name: build image: maven:3-openjdk-17 @@ -9,9 +5,7 @@ steps: - mvn -B -DskipTests clean install - mvn test -B volumes: - - name: m2 - path: /root/.m2 - + - /home/docker/woodpecker/files/m2:/root/.m2 - name: archive-artifacts image: alpine:latest commands: @@ -19,9 +13,7 @@ steps: - cp target/Tihwin-*[0-9].jar /builds/Tihwin/ - cp target/Tihwin-*[0-9].exe /builds/Tihwin/ volumes: - - name: builds - path: /builds - + - /home/www/builds:/builds - name: make-win-installer image: wheatstalk/makensis:3 commands: @@ -31,18 +23,5 @@ steps: - makensis -V4 ./installer.nsi - cp Installer-*.exe /builds/Tihwin/ volumes: - - name: builds - path: /builds - - name: jdk - path: /drone/src/NSIS/jdk - -volumes: - - name: m2 - host: - path: /home/docker/drone/files/m2 - - name: builds - host: - path: /home/www/builds - - name: jdk - host: - path: /home/docker/drone/files/assembly/openjdk-19.0.2 \ No newline at end of file + - /home/www/builds:/builds + - /home/docker/woodpecker/files/assembly/openjdk-19.0.2:/assembly/jdk \ No newline at end of file diff --git a/NSIS/installer.nsi b/NSIS/installer.nsi index 62caefe..0aa7959 100644 --- a/NSIS/installer.nsi +++ b/NSIS/installer.nsi @@ -79,7 +79,7 @@ Section "Tihwin" Install SetOutPath "$INSTDIR" - file /r jdk + file /r \assembly\jdk file Tihwin.exe file logo.ico diff --git a/README.md b/README.md index d73648e..d47e45d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Tihwin -![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) +![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![status-badge](https://ci.redrise.ru/api/badges/6/status.svg)](https://ci.redrise.ru/repos/6) #### Other languages [![Russian](flag/ru-flag.svg)](README_RU.md) diff --git a/README_ES.md b/README_ES.md index d02daf0..991365c 100644 --- a/README_ES.md +++ b/README_ES.md @@ -1,5 +1,5 @@ ## Tihwin -![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) +![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![status-badge](https://ci.redrise.ru/api/badges/6/status.svg)](https://ci.redrise.ru/repos/6) #### Otros idiomas [![Inglés](flag/us-flag.svg)](README.md) diff --git a/README_JP.md b/README_JP.md index 635137f..8f5535c 100644 --- a/README_JP.md +++ b/README_JP.md @@ -1,5 +1,5 @@ ## Tihwin -![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) +![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![status-badge](https://ci.redrise.ru/api/badges/6/status.svg)](https://ci.redrise.ru/repos/6) #### 他の言語 [![英語](flag/us-flag.svg)](README.md) diff --git a/README_RU.md b/README_RU.md index 22910b5..54d0597 100644 --- a/README_RU.md +++ b/README_RU.md @@ -1,5 +1,5 @@ ## Tihwin -![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) +![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![status-badge](https://ci.redrise.ru/api/badges/6/status.svg)](https://ci.redrise.ru/repos/6) #### Другие языки [![Английский язык](flag/us-flag.svg)](README.md) diff --git a/README_RYU.md b/README_RYU.md index d527cf0..0c050fe 100644 --- a/README_RYU.md +++ b/README_RYU.md @@ -1,5 +1,5 @@ ## Tihwin -![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) +![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![status-badge](https://ci.redrise.ru/api/badges/6/status.svg)](https://ci.redrise.ru/repos/6) #### 他ぬ言語 [![英語](flag/us-flag.svg)](README.md) diff --git a/src/main/java/tihwin/MainAppUi.java b/src/main/java/tihwin/MainAppUi.java index 90e5db0..beb954b 100644 --- a/src/main/java/tihwin/MainAppUi.java +++ b/src/main/java/tihwin/MainAppUi.java @@ -68,7 +68,6 @@ public class MainAppUi extends JFrame { private Thread splitThread; public MainAppUi(String appName) { - super(appName); $$$setupUI$$$(); resourceBundle = ResourceBundle.getBundle("locale"); AwesomeMediator.setMainUi(this); @@ -139,7 +138,7 @@ public class MainAppUi extends JFrame { String proposedName = diskImage.getName().replaceAll("(\\..*)|(\\[.*)", "").trim(); if (proposedName.length() > 31) proposedName = proposedName.substring(0, 31); - if (proposedName.length() == 0) + if (proposedName.isEmpty()) proposedName = "My favorite game"; titleField.setText(proposedName); } @@ -164,7 +163,7 @@ public class MainAppUi extends JFrame { return; } - if (titleField.getText().length() == 0) { + if (titleField.getText().isEmpty()) { setProposedTitle(); return; }