Skip to content

Commit 0cf2cd3

Browse files
committed
chore: remove blank spaces
Signed-off-by: Ruben Romero Montes <rromerom@redhat.com>
1 parent a4c044c commit 0cf2cd3

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,39 @@ jobs:
2424
permissions:
2525
contents: read
2626
packages: write
27-
27+
2828
steps:
2929
- name: Checkout code
3030
uses: actions/checkout@v4
31-
31+
3232
- name: Set up JDK 21
3333
uses: actions/setup-java@v4
3434
with:
3535
java-version: '21'
3636
distribution: 'temurin'
37-
37+
3838
- name: Set up Node.js
3939
uses: actions/setup-node@v4
4040
with:
4141
node-version: '20'
4242
registry-url: 'https://npm.pkg.github.com'
4343
scope: '@trustification'
44-
44+
4545
- name: Cache Maven packages
4646
uses: actions/cache@v4
4747
with:
4848
path: ~/.m2
4949
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
5050
restore-keys: ${{ runner.os }}-m2
51-
51+
5252
- name: Cache npm dependencies
5353
uses: actions/cache@v4
5454
with:
5555
path: ~/.npm
5656
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
5757
restore-keys: |
5858
${{ runner.os }}-node-
59-
59+
6060
- name: Get API version
6161
id: api-version
6262
run: |
@@ -65,7 +65,7 @@ jobs:
6565
else
6666
echo "version=v1" >> $GITHUB_OUTPUT
6767
fi
68-
68+
6969
- name: Build and Release Java Models
7070
if: ${{ github.event.inputs.release_java != 'false' }}
7171
run: |
@@ -81,7 +81,7 @@ jobs:
8181
env:
8282
GITHUB_ACTOR: ${{ github.actor }}
8383
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84-
84+
8585
- name: Build and Release TypeScript Models
8686
if: ${{ github.event.inputs.release_typescript != 'false' }}
8787
run: |
@@ -90,15 +90,16 @@ jobs:
9090
# Set the release version
9191
npm version ${{ steps.api-version.outputs.version }} --no-git-tag-version
9292
npm ci
93-
npm run generate --version ${{ steps.api-version.outputs.version }}
93+
npm run generate --version=${{ steps.api-version.outputs.version }}
9494
npm run build
9595
npm publish
9696
# Reset to SNAPSHOT version
9797
npm version 1.0.0-SNAPSHOT --no-git-tag-version
9898
echo "✅ TypeScript models released successfully"
9999
env:
100100
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101-
101+
npm_config_version: ${{ steps.api-version.outputs.version }}
102+
102103
- name: Summary
103104
run: |
104105
echo "🎉 API Models release completed!"

.github/workflows/validate-api.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,37 @@ jobs:
1717
runs-on: ubuntu-latest
1818
permissions:
1919
contents: read
20-
20+
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
24-
24+
2525
- name: Set up JDK 21
2626
uses: actions/setup-java@v4
2727
with:
2828
java-version: '21'
2929
distribution: 'temurin'
30-
30+
3131
- name: Set up Node.js
3232
uses: actions/setup-node@v4
3333
with:
3434
node-version: '20'
35-
35+
3636
- name: Cache Maven packages
3737
uses: actions/cache@v4
3838
with:
3939
path: ~/.m2
4040
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4141
restore-keys: ${{ runner.os }}-m2
42-
42+
4343
- name: Cache npm dependencies
4444
uses: actions/cache@v4
4545
with:
4646
path: ~/.npm
4747
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
4848
restore-keys: |
4949
${{ runner.os }}-node-
50-
50+
5151
- name: Get API version
5252
id: api-version
5353
run: |
@@ -56,7 +56,7 @@ jobs:
5656
else
5757
echo "version=v1" >> $GITHUB_OUTPUT
5858
fi
59-
59+
6060
- name: Check Git repository state
6161
run: |
6262
echo "🔍 Checking Git repository state..."
@@ -82,7 +82,7 @@ jobs:
8282
cd api-models/java
8383
mvn clean generate-sources compile -Dapi.version=${{ steps.api-version.outputs.version }} -q
8484
echo "✅ Java models generated successfully"
85-
85+
8686
- name: Test TypeScript model generation
8787
run: |
8888
echo "🔨 Testing TypeScript model generation..."
@@ -91,7 +91,7 @@ jobs:
9191
npm run generate --version=${{ steps.api-version.outputs.version }}
9292
npm run build --silent
9393
echo "✅ TypeScript models generated successfully"
94-
94+
9595
- name: Validate tools configuration
9696
run: |
9797
echo "🔍 Validating tools configuration..."
@@ -100,35 +100,35 @@ jobs:
100100
npm run build --silent
101101
node dist/index.js config validate --root ../
102102
echo "✅ Tools configuration validated"
103-
103+
104104
- name: Test API model generation (no unintended file changes)
105105
run: |
106106
echo "🔍 Testing API generation doesn't create/modify unintended files..."
107-
107+
108108
# Store current Git state
109109
echo "📸 Storing current Git state..."
110110
git status --porcelain > /tmp/before_generate.txt
111111
git diff --name-only > /tmp/before_generate_diff.txt
112-
112+
113113
# Clean generated files to start fresh
114114
echo "🧹 Cleaning previously generated files..."
115115
cd tools
116116
node dist/index.js api clean --type both
117117
cd ..
118-
118+
119119
# Run API model validation
120120
echo "🔨 Running API model validation..."
121121
cd tools
122122
node dist/index.js api validate --spec-version=${{ steps.api-version.outputs.version }}
123123
cd ..
124-
124+
125125
# The API model validation handles all the validation logic
126126
echo "✅ API model validation completed successfully"
127-
127+
128128
- name: Validate generated files
129129
run: |
130130
echo "🔍 Validating generated files..."
131-
131+
132132
# Check Java generated files
133133
if [ -d "api-models/java/target/generated-sources/openapi" ]; then
134134
echo "✅ Java models generated in target/generated-sources/openapi"
@@ -137,7 +137,7 @@ jobs:
137137
echo "❌ Java models not generated"
138138
exit 1
139139
fi
140-
140+
141141
# Check TypeScript generated files
142142
if [ -d "api-models/typescript/src/generated" ]; then
143143
echo "✅ TypeScript models generated in src/generated"
@@ -146,9 +146,9 @@ jobs:
146146
echo "❌ TypeScript models not generated"
147147
exit 1
148148
fi
149-
149+
150150
echo "✅ All generated files validated"
151-
151+
152152
- name: Summary
153153
run: |
154154
echo "🎉 API Models validation completed successfully!"

0 commit comments

Comments
 (0)