Skip to content

Commit 2bee126

Browse files
committed
chore: First batch of changes
1 parent 1f19d00 commit 2bee126

Some content is hidden

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

43 files changed

+8559
-14741
lines changed

.gitattributes

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.inc text
7+
*.pas text
8+
*.pp text
9+
*.lpk text
10+
*.lpi text
11+
*.lps text
12+
*.lpr text
13+
*.def text
14+
*.css text
15+
*.html text
16+
*.xml text
17+
*.sql text
18+
*.txt text
19+
20+
# Declare files that will always have CRLF line endings on checkout.
21+
*.iss text eol=crlf
22+
*.dpk text eol=crlf
23+
*.dproj text eol=crlf
24+
25+
# Declare files that will always have LF line endings on checkout.
26+
27+
28+
# Denote all files that are truly binary and should not be modified.
29+
*.png binary
30+
*.jpg binary
31+
*.exe binary
32+
*.res binary
33+
*.ico binary
34+
*.dll binary
35+
36+
# Keep these files from archive/exports, mainly from production.
37+
.gitignore export-ignore
38+
.gitattributes export-ignore
39+
40+
# Add scripts that do not need to be exported, here

.github/cliff.toml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
[remote.github]
2+
owner = "gcarreno"
3+
repo = "gcarreno-HeidiSQL"
4+
5+
[changelog]
6+
# A Tera template to be rendered as the changelog's header.
7+
# See https://keats.github.io/tera/docs/#introduction
8+
header = """
9+
# Change Log
10+
11+
Notable changes up to the last release.
12+
13+
"""
14+
# A Tera template to be rendered for each release in the changelog.
15+
# See https://keats.github.io/tera/docs/#introduction
16+
body = """
17+
{%- macro remote_url() -%}
18+
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
19+
{%- endmacro -%}
20+
21+
{% macro print_commit(commit) -%}
22+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
23+
{% if commit.breaking %}[**breaking**] {% endif %}\
24+
{{ commit.message | upper_first }} - \
25+
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
26+
{% endmacro -%}
27+
28+
{% if version %}\
29+
{% if previous.version %}\
30+
## [{{ version | trim_start_matches(pat="v") }}]\
31+
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
32+
{% else %}\
33+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
34+
{% endif %}\
35+
{% else %}\
36+
## [unreleased]
37+
{% endif %}\
38+
39+
{% for group, commits in commits | group_by(attribute="group") %}
40+
### {{ group | striptags | trim | upper_first }}
41+
{% for commit in commits
42+
| filter(attribute="scope")
43+
| sort(attribute="scope") %}
44+
{{ self::print_commit(commit=commit) }}
45+
{%- endfor %}
46+
{% for commit in commits %}
47+
{%- if not commit.scope -%}
48+
{{ self::print_commit(commit=commit) }}
49+
{% endif -%}
50+
{% endfor -%}
51+
{% endfor -%}
52+
{%- if github -%}
53+
{% if github.contributors | filter(attribute="is_first_time", value=false) | length != 0 %}
54+
## Contributors
55+
{% endif %}\
56+
{% for contributor in github.contributors | filter(attribute="is_first_time", value=false) %}
57+
* [@{{ contributor.username }}](https://github.com/{{ contributor.username }})
58+
{%- if contributor.pr_number %} in \
59+
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
60+
{%- endif %}
61+
{%- endfor -%}
62+
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
63+
## New Contributors ❤️
64+
{% endif %}\
65+
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
66+
* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) made their first contribution
67+
{%- if contributor.pr_number %} in \
68+
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
69+
{%- endif %}
70+
{%- endfor -%}
71+
{%- endif %}
72+
73+
74+
"""
75+
# A Tera template to be rendered as the changelog's footer.
76+
# See https://keats.github.io/tera/docs/#introduction
77+
footer = """
78+
> [!NOTE]
79+
>
80+
> For a list of all the changes up to date, please read [CHANGELOG.md](<REPO>/blob/lazarus/CHANGELOG.md).
81+
"""
82+
# Remove leading and trailing whitespaces from the changelog's body.
83+
trim = true
84+
# An array of regex based postprocessors to modify the changelog.
85+
postprocessors = [
86+
# Replace the placeholder `<REPO>` with a URL.
87+
{ pattern = '<REPO>', replace = "https://github.com/gcarreno/gcarreno-HeidiSQL" }, # replace repository URL
88+
]
89+
90+
[git]
91+
# Parse commits according to the conventional commits specification.
92+
# See https://www.conventionalcommits.org
93+
conventional_commits = true
94+
# Exclude commits that do not match the conventional commits specification.
95+
filter_unconventional = true
96+
# Split commits on newlines, treating each line as an individual commit.
97+
split_commits = false
98+
# An array of regex based parsers to modify commit messages prior to further processing.
99+
commit_preprocessors = [
100+
# Replace issue numbers with link templates to be updated in `changelog.postprocessors`.
101+
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
102+
# Check spelling of the commit message using https://github.com/crate-ci/typos.
103+
# If the spelling is incorrect, it will be fixed automatically.
104+
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
105+
]
106+
# An array of regex based parsers for extracting data from the commit message.
107+
# Assigns commits to groups.
108+
# Optionally sets the commit's scope and can decide to exclude commits from further processing.
109+
commit_parsers = [
110+
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
111+
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
112+
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
113+
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
114+
{ message = "^refactor\\(clippy\\)", skip = true },
115+
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
116+
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
117+
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
118+
{ message = "^chore\\(release\\): prepare for", skip = true },
119+
{ message = "^chore\\(deps.*\\)", skip = true },
120+
{ message = "^chore\\(pr\\)", skip = true },
121+
{ message = "^chore\\(pull\\)", skip = true },
122+
{ message = "^chore\\(npm\\).*yarn\\.lock", skip = true },
123+
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
124+
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
125+
{ message = "^ign", skip = true},
126+
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
127+
]
128+
# Prevent commits that are breaking from being excluded by commit parsers.
129+
protect_breaking_commits = false
130+
# Exclude commits that are not matched by any commit parser.
131+
filter_commits = false
132+
# Regex to select git tags that represent releases.
133+
tag_pattern = "v[0-9].*"
134+
# Regex to select git tags that do not represent proper releases.
135+
# Takes precedence over `tag_pattern`.
136+
# Changes belonging to these releases will be included in the next release.
137+
skip_tags = "beta|alpha"
138+
# Regex to exclude git tags after applying the tag_pattern.
139+
ignore_tags = "rc|v2.1.0|v2.1.1"
140+
# Order releases topologically instead of chronologically.
141+
topo_order = false
142+
# Order of commits in each group/release within the changelog.
143+
# Allowed values: newest, oldest
144+
sort_commits = "newest"

.github/workflows/lazarus.yaml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Lazarus
2+
3+
defaults:
4+
run:
5+
shell: bash
6+
7+
permissions:
8+
contents: write
9+
10+
11+
on:
12+
13+
push:
14+
branches: [ lazarus ]
15+
tags: [ "*" ]
16+
paths-ignore: [ "README.md", "LICENSE", "CHANGELOG.md", ".github/cliff.toml" ]
17+
18+
pull_request:
19+
branches: [ lazarus ]
20+
21+
jobs:
22+
23+
build:
24+
runs-on: ${{ matrix.operating-system }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
operating-system: [ubuntu-latest]
29+
lazarus-versions: ["stable"]
30+
31+
steps:
32+
- name: Checkout source code
33+
uses: actions/checkout@v4
34+
35+
- name: Install Lazarus
36+
uses: gcarreno/setup-lazarus@v3
37+
with:
38+
lazarus-version: ${{ matrix.lazarus-versions }}
39+
with-cache: false
40+
41+
- name: Build HeidiSQL (Ubuntu GTK)
42+
if: ${{ matrix.operating-system == 'ubuntu-latest' }}
43+
run: |
44+
echo Building with GTK2
45+
make heidisql-gtk2
46+
47+
- name: Upload binaries GTK
48+
if: ${{ matrix.lazarus-versions == 'stable' }}
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: ${{ matrix.operating-system }}-GTK
52+
path: out/gtk2/heidisql
53+
54+
- name: Getting libqt5pas-dev
55+
run: |
56+
sudo apt update
57+
sudo apt install -y libqt5pas-dev
58+
59+
- name: Build HeidiSQL (Ubuntu QT)
60+
if: ${{ matrix.operating-system == 'ubuntu-latest' }}
61+
run: |
62+
echo Building with QT5
63+
make heidisql-qt5
64+
65+
- name: Upload binaries QT
66+
if: ${{ matrix.lazarus-versions == 'stable' }}
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: ${{ matrix.operating-system }}-QT
70+
path: out/qt5/heidisql
71+
72+
release:
73+
if: contains(github.ref_type, 'tag')
74+
75+
name: Create GitHub Release
76+
runs-on: [ubuntu-latest]
77+
needs: [build]
78+
79+
steps:
80+
- name: Checkout source code
81+
uses: actions/checkout@v4
82+
with:
83+
fetch-depth: 0
84+
85+
- name: Set env
86+
run: echo "tag=${{ github.ref_name }}" >> "$GITHUB_ENV"
87+
88+
- name: Download Ubuntu GTK
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: ubuntu-latest-GTK
92+
path: out/gtk2
93+
94+
- name: Download Ubuntu QT
95+
uses: actions/download-artifact@v4
96+
with:
97+
name: ubuntu-latest-QT
98+
path: out/qt5
99+
100+
- name: List files
101+
run: |
102+
ls -alF out/gtk2
103+
ls -alF out/qt5
104+
105+
- name: Install gettext
106+
run: sudo apt install -y gettext
107+
108+
- name: Install FPM
109+
run: sudo gem install --no-document fpm
110+
111+
- name: Pull from transifex
112+
uses: transifex/cli-action@v2
113+
with:
114+
token: ${{ secrets.TX_TOKEN }}
115+
args: pull -a
116+
117+
- name: Create release archives (Linux GTK)
118+
run: make tar-gtk2
119+
120+
- name: Create debian package
121+
run: make deb-package
122+
123+
- name: Create release archives (Linux QT)
124+
run: make tar-qt5
125+
126+
- name: Generate Release Notes
127+
id: git-cliff
128+
uses: orhun/git-cliff-action@main
129+
with:
130+
config: .github/cliff.toml
131+
args: --latest --strip header
132+
133+
- name: Create GitHub release
134+
uses: softprops/action-gh-release@v2
135+
with:
136+
name: HeidiSQL Linux ${{ env.tag }}
137+
body: ${{ steps.git-cliff.outputs.content }}
138+
files: dist/*
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)