Skip to content

Commit 019bffd

Browse files
authored
Merge pull request #156 from doubleSlashde/release/v1.3
Release/v1.3
2 parents aad505c + a4d6339 commit 019bffd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2313
-970
lines changed

.github/workflows/mavenCi.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Java CI with Maven
5+
6+
on:
7+
push:
8+
branches: [ "master", "develop" ]
9+
pull_request:
10+
branches: [ "master", "develop" ]
11+
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
12+
schedule:
13+
- cron: "0 8 * * 1" #Runs pipeline once a week https://jasonet.co/posts/scheduled-actions/
14+
15+
jobs:
16+
17+
build-analyze:
18+
19+
runs-on: ubuntu-latest
20+
21+
env:
22+
version: 1.3.${{ github.run_number }}
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: Set up JDK 11
28+
uses: actions/setup-java@v3
29+
with:
30+
java-version: '11'
31+
distribution: 'corretto'
32+
cache: maven
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v2
36+
with:
37+
languages: 'java'
38+
39+
- name: Build
40+
run: mvn -V -B clean package org.jacoco:jacoco-maven-plugin:0.8.7:prepare-agent org.jacoco:jacoco-maven-plugin:0.8.7:report -Pcoverage -Dproject.version=${{ env.version }}-SNAPSHOT
41+
42+
- name: Upload Build Artifact
43+
uses: actions/upload-artifact@v3
44+
with:
45+
name: KeepTime-${{ env.version }}
46+
path: /home/runner/work/KeepTime/KeepTime/target/*-bin.zip
47+
48+
- name: Analyze
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52+
run: mvn -V -B sonar:sonar
53+
-Dsonar.host.url=${{ secrets.HOST_URL }}
54+
-Dsonar.organization=${{ secrets.ORGANIZATION_NAME }}
55+
-Dsonar.projectKey=${{ secrets.PROJECT_KEY }}
56+
-Dsonar.java.binaries=.
57+
-Dsonar.qualitygate.wait=false
58+
59+
- name: Perform CodeQL Analysis
60+
uses: github/codeql-action/analyze@v2
61+
62+
dependency-check:
63+
64+
runs-on: ubuntu-latest
65+
66+
steps:
67+
- uses: actions/checkout@v3
68+
69+
- name: Set up JDK 11
70+
uses: actions/setup-java@v3
71+
with:
72+
java-version: '11'
73+
distribution: 'corretto'
74+
cache: maven
75+
76+
- name: dependencyCheck
77+
run: mvn dependency-check:check

.mvn/wrapper/maven-wrapper.jar

12 KB
Binary file not shown.
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,30 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## v1.2.0 - yyyy-mm-dd
5+
## v1.3.x - 2023-02-14
6+
7+
### Added
8+
- option to show note reminder only when switching from a work project without notes
9+
- option to show a 'are you sure' confirmation before closing KeepTime
10+
- import functionality of database (to be used with an export of the export functionality)
11+
- app icon shown in dialogs
12+
- in the report a collapse / expand button was added
13+
14+
### Changed
15+
- updated the settings dialog design
16+
- replaced deprecated fontawesome dependencies
17+
- updated dependencies - we now also require Java 11 (instead of 8). **note** migration of data of previous version. see section 'Migrate from old version' in readme before updating
18+
- when creating a new project 'isWork' is selected by default
19+
- when editing a note the note field will be in focus instead of the project
20+
- in the report dialog the currently active work item is not editable anymore (marked as 'active work' instead)
21+
- in report dialog simplified the note format when copying them (removed the note count)
22+
- when creating/editing a project the name cannot be empty anymore
23+
- moved CI to github actions
24+
25+
### Fixed
26+
- 'hide projects' setting was not working correctly on linux. we disabled the setting for linux
27+
28+
## v1.2.0 - 2021-04-14
629

730
### Added
831

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Create projects and choose if they are counted as 'work time'. Select the projec
1212
+ You can move the window by dragging it around
1313
+ Open the context menu (with a right-click) for a project to edit/delete or change the project and transfer n minutes of the current running one
1414
+ In the taskbar you will also see the current time + the color of the active project
15-
+ The current Project will be saved eyery minute to mitigate loss on system crash or shutdown without closing window manually first.
15+
+ The current Project will be saved every minute to mitigate loss on system crash or shutdown without closing window manually first.
1616
+ After a day you can open the Reports, which will summarize the work done for the different projects during the day
1717

18-
**You need to close the application manualy before you shutdown your PC. Otherwise the last running project is not saved completely to database. (will be last state saved by auto-save)**
18+
**You need to close the application manually before you shut down your PC. Otherwise, the last running project is not saved completely to database. (will be last state saved by auto-save)**
1919

2020
### Settings:
21-
![Settings Screen](readme/images/settings.png?raw=true "Settings")
21+
![Settings Screen](readme/images/settingsColor.PNG?raw=true "Settings")
2222

2323
+ Colors: you can define various colors to use in the UI to customize the application. The Reset resets the color to the default color.
2424
+ Display projects on the right: Will show the list of projects on the right side, instead of the left
@@ -37,24 +37,34 @@ Create projects and choose if they are counted as 'work time'. Select the projec
3737

3838
* Download keeptime.bat and keeptime-<version>-bin.zip (see [releases](https://github.com/doubleSlashde/KeepTime/releases))
3939
* Extract the downloaded .zip
40-
* Copy the downloaded keeptime.bat file next to the *.jar*. Adapt the path inside the *keeptime.bat* to the name of the *.jar* file (if needed). Try starting the application by executing the *keeptime.bat* file. The start may take up to one minute.
40+
* Try starting the application by executing the *keeptime.bat* file. The start may take up to one minute.
4141

42-
It is recommended to run the application at computer start so you do not forget to track your time. For autostart also execute the following steps (for windows)
42+
It is recommended to run the application at computer start, so you do not forget to track your time. For autostart also execute the following steps (for windows)
4343
* Open the autostart folder: Press *Windows+R*, execute *shell:startup*
4444
* Create a shortcut to the *.bat* in the autostart folder
4545

4646
You should put the .jar in an extra folder as a *logs* and a *db* folder will be created next to it.\
4747

48-
### Migrate from old version
48+
### Migrate from older version than v1.2.0
4949

5050
1. Download new version and replace the .jar file.
5151
2. Start new version of KeepTime. Notice that your old data is not available.
5252
3. Stop KeepTime
5353
4. Copy the files (not directories) of directory `db` (next to the .jar file) into `db/1.4.197/` (path now includes the database version).
5454
5. Start KeepTime again. Notice that your data is available again.
5555

56+
### Migrate from KeepTime v1.2.0
57+
58+
1. Start your current version of KeepTime (v1.2.0)
59+
2. Go to the settings and export your KeepTime data
60+
3. Download new version and replace the .jar file.
61+
4. Start new version of KeepTime. Notice that your old data is not available.
62+
5. Open the new version and import the exported sql script
63+
6. After the import KeepTime closes automatically
64+
7. To see the changes just start the new KeepTime again
65+
5666
## Requirements
5767

5868
* Windows 7, 10
5969
* Linux (tested on Ubuntu 18.04)
60-
* Java 8 + JavaFX
70+
* Java 11

assembly.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<id>bin</id>
55

66
<formats>
7-
<format>zip</format>
7+
<format>zip</format>
88
</formats>
99

1010
<includeBaseDirectory>false</includeBaseDirectory>
@@ -15,12 +15,19 @@
1515
<outputDirectory>licenses</outputDirectory>
1616
</fileSet>
1717
</fileSets>
18+
<files>
19+
<file>
20+
<source>${project.basedir}/keeptime.bat</source>
21+
</file>
22+
</files>
1823

1924
<dependencySets>
2025
<dependencySet>
2126
<includes>
2227
<include>de.doubleslash:keeptime</include>
2328
</includes>
29+
<!-- default value is ${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension} - #152 removed version-->
30+
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
2431
</dependencySet>
2532
</dependencySets>
2633
</assembly>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
3+
<suppress>
4+
<notes>
5+
<![CDATA[
6+
file name: maven-core-3.0.jar
7+
suppression-reason: referenced from 'maven-assembly-plugin' which is executed in build step (no runtime vulnerability). no assembly-plugin update available.
8+
]]>
9+
</notes>
10+
<packageUrl regex="true">^pkg:maven/org\.apache\.maven/maven\-core@.*$</packageUrl>
11+
<cve>CVE-2021-26291</cve>
12+
</suppress>
13+
<suppress>
14+
<notes>
15+
<![CDATA[
16+
file name: maven-settings-3.0.jar
17+
suppression-reason: referenced from 'maven-assembly-plugin' which is executed in build step (no runtime vulnerability). no assembly-plugin update available.
18+
]]>
19+
</notes>
20+
<packageUrl regex="true">^pkg:maven/org\.apache\.maven/maven\-settings@.*$</packageUrl>
21+
<vulnerabilityName>CVE-2021-26291</vulnerabilityName>
22+
</suppress>
23+
<suppress>
24+
<notes>
25+
<![CDATA[
26+
file name: snakeyaml-1.30.jar
27+
suppression-reason: we are not using .yaml files
28+
]]>
29+
</notes>
30+
<packageUrl regex="true">^pkg:maven/org\.yaml/snakeyaml@.*$</packageUrl>
31+
<cve>CVE-2022-1471</cve>
32+
</suppress>
33+
</suppressions>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
H2_VERSION=1.4.197
3+
DB_URL=jdbc:h2:file:./db/$H2_VERSION/keeptime-h2-db;DB_CLOSE_ON_EXIT=FALSE
4+
DB_USER=sa
5+
DB_PASSWD=
6+
SQL_BACKUP_FILENAME=KeepTime_database-export_H2-version-$H2_VERSION.sql
7+
8+
echo "Script to export the content of H2 databse from KeepTime version 1.2.0-SNAPSHOT to .sql file."
9+
echo "The script should be placed next to the .jar file."
10+
read -p "Press enter to continue"
11+
12+
echo -e "\nExtracting H2 driver from KeepTime .jar file."
13+
DRIVER_JAR_FROM_KEEPTIME=BOOT-INF/lib/h2-$H2_VERSION.jar
14+
jar xfv keeptime-1.2.0-SNAPSHOT.jar $DRIVER_JAR_FROM_KEEPTIME
15+
16+
echo -e "\nTriggering database backup."
17+
java -cp $DRIVER_JAR_FROM_KEEPTIME org.h2.tools.Script -url $DB_URL -user $DB_USER -script $SQL_BACKUP_FILENAME -options DROP
18+
19+
echo -e "\nCleanup of extracted .jar file."
20+
rm -rv BOOT-INF
21+
22+
echo -e "\nIf no error occured the export has succeeded."
23+
echo "The exported file was created at '$(pwd)/$SQL_BACKUP_FILENAME'."
24+
echo -e "\nYou can now import this file in a new version of KeepTime.\n"
25+
26+
read -p "All set. Press enter to exit script."

keeptime.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
start "" "javaw" -Dprism.order=sw -jar keeptime-1.2.0-SNAPSHOT.jar
1+
start "" "javaw" -Dprism.order=sw -jar keeptime.jar

0 commit comments

Comments
 (0)