Skip to content

Commit

Permalink
Add submodule (#104)
Browse files Browse the repository at this point in the history
* chore: add opensourcecobol4j directory as a git sub module

* chore: update workflow files

* chore: use opensource COBOL 4J 1.1.2

* fix: checkout processes in workflow files

* fix: coverage.yml

* fix: ci.yml to pass secrets to test.yml explicitly
  • Loading branch information
yutaro-sakamoto authored Oct 29, 2024
1 parent 1bb63e1 commit a72eb10
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 26 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,8 @@ jobs:
# Checkout
- name: Checkout Open-COBOL-ESQL-4j
uses: actions/checkout@v4

# Checkout opensource COBOL 4J
- name: Checkout opensourcecobol 4J
uses: actions/checkout@v4
with:
repository: opensourcecobol/opensourcecobol4j
path: opensourcecobol4j
submodules: recursive

# Install opensource COBOL 4J
- name: Install opensource COBOL 4J
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,20 @@ jobs:
--health-retries 5
steps:

# Install dependencies (Ubuntu 24.04)
- name: Install dependencies on Ubuntu 24.04
if: matrix.os == 'ubuntu:24.04'
run: |
apt update -y
apt install -y build-essential bison flex gettext texinfo automake autoconf curl
apt install -y build-essential bison flex gettext texinfo automake autoconf curl git
# Install dependencies (Almalinux 9)
- name: Install dependencies on AlmaLinux 9
if: matrix.os == 'almalinux:9'
run: |
dnf -y update
dnf install -y gcc make bison flex automake autoconf diffutils gettext
dnf install -y gcc make bison flex automake autoconf diffutils gettext git
# Setup JDK
- name: Setup JDK
Expand All @@ -87,14 +88,9 @@ jobs:
# Checkout
- name: Checkout Open-COBOL-ESQL-4j
uses: actions/checkout@v4

# Checkout opensource COBOL 4J
- name: Checkout opensourcecobol 4J
uses: actions/checkout@v4
with:
repository: opensourcecobol/opensourcecobol4j
path: opensourcecobol4j

submodules: recursive

# Install opensource COBOL 4J
- name: Install opensource COBOL 4J
working-directory: opensourcecobol4j
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Add MSBuild to PATH
uses: microsoft/[email protected]
Expand All @@ -35,12 +37,6 @@ jobs:
database: testdb
port: 5432
id: postgres

- name: Checkout opensource COBOL 4J
uses: actions/checkout@v4
with:
repository: opensourcecobol/opensourcecobol4j
path: opensourcecobol4j

- name: Build libcobj.jar
working-directory: opensourcecobol4j/libcobj
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "opensourcecobol4j"]
path = opensourcecobol4j
url = https://github.com/opensourcecobol/opensourcecobol4j.git
9 changes: 4 additions & 5 deletions ocesql/ppout.c
Original file line number Diff line number Diff line change
Expand Up @@ -2002,24 +2002,23 @@ void ppoutput(char *ppin, char *ppout, struct cb_exec_list *head) {
len = strlen(outbuff);
fwrite(outbuff, len, 1, outfile);

if (strstr(inbuff, "\n") == NULL){
if (strstr(inbuff, "\n") == NULL) {
fputc('\n', outfile);
}
if (EOFflg == 1) {
fputc('\n', outfile);
}

if (lineNUM == l->endLine){
if (lineNUM == l->endLine) {
if (strcmp(l->commandName, "WORKING_END")) {
ppbuff(l);
}

if (l->next != NULL){
if (l->next != NULL) {
l = l->next;
}
}
}
else {
} else {
outbuff = inbuff;
len = strlen(outbuff);
fwrite(outbuff, len, 1, outfile);
Expand Down
1 change: 1 addition & 0 deletions opensourcecobol4j
Submodule opensourcecobol4j added at 750d45

0 comments on commit a72eb10

Please sign in to comment.