Skip to content

Commit 7ec7529

Browse files
authored
bump: This is a bump in version to support both java and python
This PR updates everything to support both java and python
2 parents e4c4e3e + be9119d commit 7ec7529

119 files changed

Lines changed: 698 additions & 7552 deletions

File tree

Some content is hidden

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

.github/settings.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<servers>
6+
<server>
7+
<id>ossrh</id>
8+
<username>${env.SONATYPE_USERNAME}</username>
9+
<password>${env.SONATYPE_PASSWORD}</password>
10+
</server>
11+
</servers>
12+
<profiles>
13+
<profile>
14+
<id>ossrh</id>
15+
<activation>
16+
<activeByDefault>true</activeByDefault>
17+
</activation>
18+
<properties>
19+
<gpg.executable>gpg</gpg.executable>
20+
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
21+
</properties>
22+
</profile>
23+
</profiles>
24+
</settings>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Conventional Commit Parser
2+
on:
3+
pull_request:
4+
branches: [main, master, develop]
5+
types: [opened, reopened, edited, review_requested, synchronize]
6+
7+
jobs:
8+
conventional_commit:
9+
name: Conventional Commits
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: webiny/action-conventional-commits@v1.0.3

.github/workflows/java.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and Deploy Java Parser
2+
3+
on:
4+
push
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Install ANTLR4 and Maven
15+
run: |
16+
# Add installation steps for ANTLR4 here
17+
sudo apt-get update
18+
sudo apt-get install -y antlr4 maven
19+
20+
- name: Import GPG key
21+
uses: crazy-max/ghaction-import-gpg@v1
22+
env:
23+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
24+
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
25+
26+
- name: Generate and Compile Java Code
27+
run: make java_parser
28+
29+
- name: Cache Maven packages
30+
uses: actions/cache@v2
31+
with:
32+
path: ~/.m2
33+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: ${{ runner.os }}-m2
35+
36+
- name: Deploy to Maven Central
37+
run: cd java && mvn clean deploy --settings ../.github/settings.xml
38+
env:
39+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
40+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
41+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

.github/workflows/python.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and Deploy Python Parser
2+
3+
on:
4+
push
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Install ANTLR4 and Python dependencies
15+
run: |
16+
# Add installation steps for ANTLR4 here
17+
sudo apt-get update
18+
sudo apt-get install -y python3 python3-pip
19+
make dev
20+
21+
- name: Generate and Build Python Code
22+
run: make python_parser
23+
24+
- name: Build and publish python package
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
28+
run: |
29+
make python_prepare_package
30+
cd python && twine upload dist/*

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Create Release and publish pypi package
2+
on:
3+
push:
4+
tags:
5+
- v[0-9]+.[0-9]+.*
6+
7+
jobs:
8+
released:
9+
name: Released
10+
if: github.ref_type == 'tag'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout git repo
14+
uses: actions/checkout@v2
15+
16+
- name: Automated Version Bump
17+
id: changelog
18+
uses: Requarks/changelog-action@v1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
tag: ${{github.ref_name}}
22+
writeToFile: 'false'
23+
24+
- name: Get variables
25+
id: get_variables
26+
run: |
27+
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
28+
echo ::set-output name=IS_PRERELEASE::"${{contains(github.ref, 'dev')}}"
29+
30+
- name: Publish release github
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
prerelease: ${{ steps.get_variables.outputs.IS_PRERELEASE }}
35+
tag_name: ${{ steps.get_variables.outputs.VERSION }}
36+
body: ${{ steps.changelog.outputs.changes }}
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@v4
40+
with:
41+
python-version: '3.9'
42+
43+
- name: Install dependencies and ANTLR requirements
44+
run: |
45+
sudo apt-get install antlr4
46+
pip install twine build
47+
48+
- name: Compile
49+
run: make build
50+
51+
- name: Build and publish python package
52+
env:
53+
TWINE_USERNAME: __token__
54+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
55+
run: |
56+
python3 -m build
57+
twine upload dist/*

.gitignore

Lines changed: 4 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,162 +1,5 @@
1-
# Created by https://www.toptal.com/developers/gitignore/api/maven,intellij,java
2-
# Edit at https://www.toptal.com/developers/gitignore?templates=maven,intellij,java
3-
4-
### Intellij ###
5-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7-
81
# User-specific stuff
9-
.idea/**/workspace.xml
10-
.idea/**/tasks.xml
11-
.idea/**/usage.statistics.xml
12-
.idea/**/dictionaries
13-
.idea/**/shelf
14-
15-
# AWS User-specific
16-
.idea/**/aws.xml
17-
18-
# Generated files
19-
.idea/**/contentModel.xml
20-
21-
# Sensitive or high-churn files
22-
.idea/**/dataSources/
23-
.idea/**/dataSources.ids
24-
.idea/**/dataSources.local.xml
25-
.idea/**/sqlDataSources.xml
26-
.idea/**/dynamic.xml
27-
.idea/**/uiDesigner.xml
28-
.idea/**/dbnavigator.xml
29-
30-
# Gradle
31-
.idea/**/gradle.xml
32-
.idea/**/libraries
33-
34-
# Gradle and Maven with auto-import
35-
# When using Gradle or Maven with auto-import, you should exclude module files,
36-
# since they will be recreated, and may cause churn. Uncomment if using
37-
# auto-import.
38-
# .idea/artifacts
39-
# .idea/compiler.xml
40-
# .idea/jarRepositories.xml
41-
# .idea/modules.xml
42-
# .idea/*.iml
43-
# .idea/modules
44-
# *.iml
45-
# *.ipr
46-
47-
# CMake
48-
cmake-build-*/
49-
50-
# Mongo Explorer plugin
51-
.idea/**/mongoSettings.xml
52-
53-
# File-based project format
54-
*.iws
55-
56-
# IntelliJ
57-
out/
58-
59-
# mpeltonen/sbt-idea plugin
60-
.idea_modules/
61-
62-
# JIRA plugin
63-
atlassian-ide-plugin.xml
64-
65-
# Cursive Clojure plugin
66-
.idea/replstate.xml
67-
68-
# SonarLint plugin
69-
.idea/sonarlint/
70-
71-
# Crashlytics plugin (for Android Studio and IntelliJ)
72-
com_crashlytics_export_strings.xml
73-
crashlytics.properties
74-
crashlytics-build.properties
75-
fabric.properties
76-
77-
# Editor-based Rest Client
78-
.idea/httpRequests
79-
80-
# Android studio 3.1+ serialized cache file
81-
.idea/caches/build_file_checksums.ser
82-
83-
### Intellij Patch ###
84-
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
85-
86-
# *.iml
87-
# modules.xml
88-
# .idea/misc.xml
89-
# *.ipr
90-
91-
# Sonarlint plugin
92-
# https://plugins.jetbrains.com/plugin/7973-sonarlint
93-
.idea/**/sonarlint/
94-
95-
# SonarQube Plugin
96-
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
97-
.idea/**/sonarIssues.xml
98-
99-
# Markdown Navigator plugin
100-
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
101-
.idea/**/markdown-navigator.xml
102-
.idea/**/markdown-navigator-enh.xml
103-
.idea/**/markdown-navigator/
104-
105-
# Cache file creation bug
106-
# See https://youtrack.jetbrains.com/issue/JBR-2257
107-
.idea/$CACHE_FILE$
108-
109-
# CodeStream plugin
110-
# https://plugins.jetbrains.com/plugin/12206-codestream
111-
.idea/codestream.xml
112-
113-
# Azure Toolkit for IntelliJ plugin
114-
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
115-
.idea/**/azureSettings.xml
116-
117-
### Java ###
118-
# Compiled class file
119-
*.class
120-
121-
# Log file
122-
*.log
123-
124-
# BlueJ files
125-
*.ctxt
126-
127-
# Mobile Tools for Java (J2ME)
128-
.mtj.tmp/
129-
130-
# Package Files #
131-
*.jar
132-
*.war
133-
*.nar
134-
*.ear
135-
*.zip
136-
*.tar.gz
137-
*.rar
138-
139-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
140-
hs_err_pid*
141-
replay_pid*
142-
143-
### Maven ###
144-
target/
145-
pom.xml.tag
146-
pom.xml.releaseBackup
147-
pom.xml.versionsBackup
148-
pom.xml.next
149-
release.properties
150-
dependency-reduced-pom.xml
151-
buildNumber.properties
152-
.mvn/timing.properties
153-
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
154-
.mvn/wrapper/maven-wrapper.jar
155-
156-
# Eclipse m2e generated files
157-
# Eclipse Core
158-
.project
159-
# JDT-specific (Eclipse Java Development Tools)
160-
.classpath
161-
162-
# End of https://www.toptal.com/developers/gitignore/api/maven,intellij,java
2+
.vscode
3+
env
4+
python/uvl/__pycache__
5+
uvl/.antlr

.idea/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/compiler.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.idea/jarRepositories.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)