Skip to content

Commit cecb317

Browse files
authored
Merge pull request #185 from xdev-software/develop
Release 3.0.1
2 parents 87c62a2 + 38d651e commit cecb317

File tree

13 files changed

+222
-56
lines changed

13 files changed

+222
-56
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ updates:
2222
open-pull-requests-limit: 10
2323
ignore:
2424
- dependency-name: "org.eclipse.jetty:jetty-maven-plugin"
25-
versions: ">=10.0.0"
25+
# Version 11+ requires jakarta.* instead of javax.* (see https://www.eclipse.org/jetty/download.php#what-jetty-version)
26+
versions: ">=11.0.0"

.github/workflows/checkBuild.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
paths-ignore:
1212
- '**.md'
1313

14+
env:
15+
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
16+
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
17+
1418
jobs:
1519
build:
1620
runs-on: ubuntu-latest
@@ -55,5 +59,5 @@ jobs:
5559
uses: actions/upload-artifact@v3
5660
with:
5761
name: demo-files-java-${{ matrix.java }}
58-
path: vaadin-date-range-picker-demo/target/vaadin-date-range-picker-demo.war
62+
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.war
5963
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches: [ master ]
66

7+
env:
8+
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
9+
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
10+
711
jobs:
812
check_code: # Validates the code (see develop.yml)
913
runs-on: ubuntu-latest
@@ -15,14 +19,7 @@ jobs:
1519
with:
1620
java-version: '11'
1721
distribution: 'temurin'
18-
19-
- name: Cache local Maven repository
20-
uses: actions/cache@v3
21-
with:
22-
path: ~/.m2/repository
23-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24-
restore-keys: |
25-
${{ runner.os }}-maven-
22+
cache: 'maven'
2623

2724
- name: Build with Maven
2825
run: mvn -B clean package -Pproduction
@@ -63,17 +60,19 @@ jobs:
6360

6461
- name: Un-SNAP demo
6562
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
66-
working-directory: vaadin-date-range-picker-demo
63+
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
6764

6865
- name: Un-SNAP
6966
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
70-
working-directory: vaadin-date-range-picker
67+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
7168

7269
- name: Get version
7370
id: version
7471
run: |
75-
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
76-
working-directory: vaadin-date-range-picker
72+
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
73+
echo "::set-output name=release::$version"
74+
echo "::set-output name=releasenumber::${version//[!0-9]/}"
75+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
7776

7877
- name: Commit and Push
7978
run: |
@@ -93,12 +92,15 @@ jobs:
9392
release_name: v${{ steps.version.outputs.release }}
9493
commitish: master
9594
body: |
95+
## [Changelog](https://github.com/xdev-software/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }})
96+
See [Changelog#v${{ steps.version.outputs.release }}](https://github.com/xdev-software/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) for more information.
97+
9698
## Installation
9799
Add the following lines to your pom:
98100
```XML
99101
<dependency>
100102
<groupId>com.xdev-software</groupId>
101-
<artifactId>vaadin-date-range-picker</artifactId>
103+
<artifactId>${{ env.PRIMARY_MAVEN_MODULE }}</artifactId>
102104
<version>${{ steps.version.outputs.release }}</version>
103105
</dependency>
104106
```
@@ -134,7 +136,7 @@ jobs:
134136
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
135137
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
136138
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
137-
working-directory: vaadin-date-range-picker
139+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
138140

139141
build_directory: # Build a ZIP that can be uploaded to Vaadin Directory
140142
runs-on: ubuntu-latest
@@ -156,29 +158,29 @@ jobs:
156158

157159
- name: Build for Vaadin Directory
158160
run: mvn -B install -Pdirectory
159-
working-directory: vaadin-date-range-picker
161+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
160162

161163
- name: Upload asset
162164
uses: actions/upload-artifact@v3
163165
with:
164166
name: vaadin-directory-files
165-
path: vaadin-date-range-picker/target/vaadin-date-range-picker-*.zip
167+
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/${{ env.PRIMARY_MAVEN_MODULE }}-*.zip
166168
if-no-files-found: error
167169

168170
- name: Get version
169171
id: version
170172
run: |
171173
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
172-
working-directory: vaadin-date-range-picker
174+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
173175

174176
- name: Upload Release Asset
175177
uses: actions/upload-release-asset@v1
176178
env:
177179
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
178180
with:
179181
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
180-
asset_path: vaadin-date-range-picker/target/vaadin-date-range-picker-${{ steps.version.outputs.release }}.zip
181-
asset_name: vaadin-date-range-picker-${{ steps.version.outputs.release }}.zip
182+
asset_path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/${{ env.PRIMARY_MAVEN_MODULE }}-${{ steps.version.outputs.release }}.zip
183+
asset_name: ${{ env.PRIMARY_MAVEN_MODULE }}-${{ steps.version.outputs.release }}.zip
182184
asset_content_type: application/zip
183185

184186
publish-pages:
@@ -203,19 +205,19 @@ jobs:
203205

204206
- name: Build dependencies/licenses files
205207
run: mvn -B project-info-reports:dependencies
206-
working-directory: vaadin-date-range-picker
208+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
207209

208210
- name: Upload licenses - Upload Artifact
209211
uses: actions/upload-artifact@v3
210212
with:
211213
name: dependencies-licenses
212-
path: vaadin-date-range-picker/target/site
214+
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/site
213215

214216
- name: Generate docs/dependencies dir
215217
run: mkdir -p docs/dependencies
216218

217219
- name: Move built files into docs/dependencies
218-
run: mv vaadin-date-range-picker/target/site/* docs/dependencies
220+
run: mv ${{ env.PRIMARY_MAVEN_MODULE }}/target/site/* docs/dependencies
219221

220222
- name: Rename dependencies.html to index.html
221223
working-directory: docs/dependencies
@@ -253,11 +255,11 @@ jobs:
253255

254256
- name: Inc Version and SNAP demo
255257
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
256-
working-directory: vaadin-date-range-picker-demo
258+
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
257259

258260
- name: Inc Version and SNAP
259261
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
260-
working-directory: vaadin-date-range-picker
262+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
261263

262264
- name: Git Commit and Push
263265
run: |

.github/workflows/test-deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test Deployment
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
8+
9+
jobs:
10+
publish_central: # Publish the code to central
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up JDK OSSRH
16+
uses: actions/setup-java@v3
17+
with: # running setup-java again overwrites the settings.xml
18+
distribution: 'temurin'
19+
java-version: '11'
20+
server-id: ossrh
21+
server-username: MAVEN_CENTRAL_USERNAME
22+
server-password: MAVEN_CENTRAL_TOKEN
23+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
24+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
25+
26+
- name: Publish to OSSRH
27+
run: mvn -B deploy -Possrh
28+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
29+
env:
30+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
31+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
32+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Update from Template
2+
3+
# This workflow keeps the repo up to date with changes from the template repo (REMOTE_URL)
4+
# It duplicates the REMOTE_BRANCH (into UPDATE_BRANCH) and tries to merge it into the
5+
# this repos default branch (which is checked out here)
6+
# Note that this requires a PAT (Personal Access Token) - at best from a servicing account
7+
# Also note that you should have at least once merged the template repo into the current repo manually
8+
# otherwise a "refusing to merge unrelated histories" error might occur.
9+
10+
on:
11+
schedule:
12+
- cron: '55 2 * * 1'
13+
workflow_dispatch:
14+
15+
env:
16+
UPDATE_BRANCH: update-from-template
17+
REMOTE_URL: https://github.com/xdev-software/vaadin-addon-template.git
18+
REMOTE_BRANCH: master
19+
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
24+
jobs:
25+
update:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- uses: actions/checkout@v3
30+
with:
31+
# Required because otherwise there are always changes detected when executing diff/rev-list
32+
fetch-depth: 0
33+
# If no PAT is used the following error occurs on a push:
34+
# refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission
35+
token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}
36+
37+
- name: Init Git
38+
run: |
39+
git config --global user.email "[email protected]"
40+
git config --global user.name "GitHub Actions"
41+
42+
- name: Main workflow
43+
id: main
44+
run: |
45+
echo "Adding remote template-repo"
46+
git remote add template ${{ env.REMOTE_URL }}
47+
48+
echo "Fetching remote template repo"
49+
git fetch template
50+
51+
echo "Deleting local branch that will contain the updates - if present"
52+
git branch -D ${{ env.UPDATE_BRANCH }} || true
53+
54+
echo "Checking if the remote template repo has new commits"
55+
git rev-list ..template/${{ env.REMOTE_BRANCH }}
56+
57+
if [ $(git rev-list --count ..template/${{ env.REMOTE_BRANCH }}) -eq 0 ]; then
58+
echo "There are no commits new commits on the template repo"
59+
60+
echo "Deleting origin branch that contains the updates - if present"
61+
git push -f origin --delete ${{ env.UPDATE_BRANCH }} || true
62+
63+
echo "::set-output name=abort::1"
64+
exit 0
65+
fi
66+
67+
echo "Found new commits on the template repo"
68+
69+
echo "Creating update branch"
70+
git branch ${{ env.UPDATE_BRANCH }} template/${{ env.REMOTE_BRANCH }}
71+
git branch --unset-upstream ${{ env.UPDATE_BRANCH }}
72+
73+
echo "Pushing update branch"
74+
git push -f -u origin ${{ env.UPDATE_BRANCH }}
75+
76+
echo "Getting current branch"
77+
current_branch=$(git branch --show-current)
78+
echo "Current branch is $current_branch"
79+
echo "::set-output name=current_branch::$current_branch"
80+
81+
echo "::set-output name=abort::0"
82+
83+
- name: pull-request
84+
uses: repo-sync/pull-request@v2
85+
if: steps.main.outputs.abort == 0
86+
with:
87+
github_token: ${{ secrets.GITHUB_TOKEN }}
88+
source_branch: ${{ env.UPDATE_BRANCH }}
89+
destination_branch: ${{ steps.main.outputs.current_branch }}
90+
pr_title: "Update from template"
91+
pr_body: "An automated PR to sync changes from the template into this repo"
92+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ webpack.generated.js
7777
webpack.config.js
7878
tsconfig.json
7979
types.d.ts
80+
vite.config.ts
81+
vite.generated.ts
8082
/*/frontend/generated/
8183
/*/frontend/index.html
8284

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## 3.0.1
2+
3+
* Updated dependencies
4+
* Vaadin 23.2
5+
6+
## 3.0.0
7+
8+
⚠️<i>This release contains breaking changes</i>
9+
10+
* Adds support for Vaadin 23+, drops support for Vaadin 14 #155
11+
<i>If you are still using Vaadin 14, use the ``2.x`` versions.</i>
12+
* Requires Java 11+
13+
* Updated dependencies

README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
# vaadin-date-range-picker
77
A Vaadin Flow DateRangePicker implementation
88

9-
![demo](demo.png)
9+
![demo](assets/demo.png)
10+
1011

1112
## Installation
1213
[Installation guide for the latest release](https://github.com/xdev-software/vaadin-date-range-picker/releases/latest#Installation)
@@ -30,17 +31,41 @@ A Vaadin Flow DateRangePicker implementation
3031
<details>
3132
<summary>Show example</summary>
3233

33-
![demo](demo.gif)
34+
![demo](assets/demo.gif)
3435
</details>
3536

3637

38+
## Dependencies and Licenses
39+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/vaadin-date-range-picker/dependencies/)
40+
41+
3742
## Releasing [![Build](https://img.shields.io/github/workflow/status/xdev-software/vaadin-date-range-picker/Release?label=Release)](https://github.com/xdev-software/vaadin-date-range-picker/actions/workflows/release.yml)
43+
44+
Before releasing:
45+
* Consider doing a [test-deployment](https://github.com/xdev-software/vaadin-addon-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
46+
* Check the [changelog](CHANGELOG.md)
47+
3848
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes
3949

4050
When the release is finished do the following:
4151
* Merge the auto-generated PR (with the incremented version number) back into the ``develop``
42-
* Add the release notes to the [GitHub release](https://github.com/xdev-software/vaadin-date-range-picker/releases/latest)
4352
* Upload the generated release asset zip into the [Vaadin Directory](https://vaadin.com/directory) and update the component there
4453

45-
## Dependencies and Licenses
46-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/vaadin-date-range-picker/dependencies/)
54+
55+
## Developing
56+
57+
### Software Requirements
58+
You should have the following things installed:
59+
* Git
60+
* Java 11 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
61+
* Maven
62+
63+
### Recommended setup
64+
* Install ``IntelliJ`` (Community Edition is sufficient)
65+
* Install the following plugins:
66+
* [Save Actions](https://plugins.jetbrains.com/plugin/7642-save-actions) - Provides save actions, like running the formatter or adding ``final`` to fields
67+
* [SonarLint](https://plugins.jetbrains.com/plugin/7973-sonarlint) - CodeStyle/CodeAnalysis
68+
* [Checkstyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) - CodeStyle/CodeAnalysis
69+
* Import the project
70+
* Ensure that everything is encoded in ``UTF-8``
71+
* Ensure that the JDK/Java-Version is correct
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)