File tree 4 files changed +75
-14
lines changed
4 files changed +75
-14
lines changed Original file line number Diff line number Diff line change 129
129
<artifactId >build-helper-maven-plugin</artifactId >
130
130
<version >3.5.0</version >
131
131
<executions >
132
- <execution >
133
- <id >addSource</id >
134
- <phase >generate-sources</phase >
135
- <goals >
136
- <goal >add-source</goal >
137
- </goals >
138
- <configuration >
139
- <sources >
140
- <source >${project.basedir} /target/generated-sources/jaxrs</source >
141
- </sources >
142
- </configuration >
143
- </execution >
132
+ <execution >
133
+ <id >addSource</id >
134
+ <phase >generate-sources</phase >
135
+ <goals >
136
+ <goal >add-source</goal >
137
+ </goals >
138
+ <configuration >
139
+ <sources >
140
+ <source >${project.basedir} /target/generated-sources/jaxrs</source >
141
+ </sources >
142
+ </configuration >
143
+ </execution >
144
144
</executions >
145
145
</plugin >
146
146
</plugins >
147
147
</build >
148
148
149
+ <profiles >
150
+ <profile >
151
+ <id >go-sdk-generate-docker</id >
152
+ <activation >
153
+ <property >
154
+ <name >!skipNonJavaGen</name >
155
+ </property >
156
+ </activation >
157
+ <build >
158
+ <plugins >
159
+ <plugin >
160
+ <groupId >org.codehaus.mojo</groupId >
161
+ <artifactId >exec-maven-plugin</artifactId >
162
+ <version >3.1.1</version >
163
+ <executions >
164
+ <execution >
165
+ <goals >
166
+ <goal >exec</goal >
167
+ </goals >
168
+ <phase >generate-sources</phase >
169
+ </execution >
170
+ </executions >
171
+ <configuration >
172
+ <executable >/usr/bin/env</executable >
173
+ <workingDirectory >${project.basedir} /../go-sdk</workingDirectory >
174
+ <arguments >
175
+ <argument >bash</argument >
176
+ <argument >generate-docker.sh</argument >
177
+ </arguments >
178
+ </configuration >
179
+ </plugin >
180
+ </plugins >
181
+ </build >
182
+ </profile >
183
+ </profiles >
184
+
149
185
</project >
Original file line number Diff line number Diff line change 7
7
generate :
8
8
./generate.sh
9
9
10
+ .PHONY : generate-docker
11
+ generate-docker :
12
+ ./generate-docker.sh
13
+
10
14
.PHONY : test
11
15
test :
12
16
go test ./... -count=1
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
4
+
5
+ if ! which docker 2> /dev/null
6
+ then
7
+ echo " Error: 'docker' executable not found"
8
+ exit 1
9
+ fi
10
+
11
+ read -r -d ' ' SCRIPT << - END
12
+ apt-get update &&
13
+ apt-get -y install unzip &&
14
+ apt-get -y install libicu-dev &&
15
+ chmod u+rw /registry &&
16
+ cd /registry/go-sdk &&
17
+ make generate &&
18
+ make format
19
+ END
20
+
21
+ docker run --rm -v $SCRIPT_DIR /..:/registry golang:1.21.6 /bin/bash -c " $SCRIPT "
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ cp $SCRIPT_DIR/../common/src/main/resources/META-INF/openapi-v2.json $SCRIPT_DIR
39
39
cp $SCRIPT_DIR /../common/src/main/resources/META-INF/openapi.json $SCRIPT_DIR /v3.json
40
40
41
41
# Hask to overcome https://github.com/microsoft/kiota/issues/3920
42
- $SED_NAME -i ' s/NewComment/DTONewComment/' v2.json
43
- $SED_NAME -i ' s/NewComment/DTONewComment/' v3.json
42
+ $SED_NAME -i ' s/NewComment/DTONewComment/' $SCRIPT_DIR / v2.json
43
+ $SED_NAME -i ' s/NewComment/DTONewComment/' $SCRIPT_DIR / v3.json
44
44
45
45
$COMMAND generate \
46
46
--language go \
You can’t perform that action at this time.
0 commit comments