File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -109,22 +109,22 @@ protoc compiler and the SwiftProtobuf code generator plugin.
109
109
110
110
Building the plugin should be simple on any supported Swift platform:
111
111
112
- ```
112
+ ``` bash
113
113
git clone https://github.com/apple/swift-protobuf.git
114
114
cd swift-protobuf
115
115
```
116
116
117
117
Pick what released version of SwiftProtobuf you are going to use. You can get
118
118
a list of tags with:
119
119
120
- ```
120
+ ``` bash
121
121
git tag -l
122
122
```
123
123
124
124
Once you pick the version you will use, set your local state to match, and
125
125
build the protoc plugin:
126
126
127
- ```
127
+ ``` bash
128
128
git checkout tags/[tag_name]
129
129
swift build -c release
130
130
```
@@ -143,7 +143,7 @@ to use also use `--static-swift-stdlib` with `swift build`.
143
143
144
144
If you prefer using [ Homebrew] ( https://brew.sh ) :
145
145
146
- ```
146
+ ``` bash
147
147
brew install swift-protobuf
148
148
```
149
149
@@ -154,7 +154,7 @@ This will install `protoc` compiler and Swift code generator plugin.
154
154
To generate Swift output for your .proto files, you run the ` protoc ` command as
155
155
usual, using the ` --swift_out=<directory> ` option:
156
156
157
- ```
157
+ ``` bash
158
158
protoc --swift_out=. my.proto
159
159
```
160
160
@@ -240,7 +240,7 @@ message BookInfo {
240
240
```
241
241
242
242
Then generate Swift code using:
243
- ```
243
+ ``` bash
244
244
protoc --swift_out=. DataModel.proto
245
245
```
246
246
You can’t perform that action at this time.
0 commit comments