-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Include dockerized protoc (#404)
* Include dockerized protoc * Allow relative paths * Allow usage of dockerized protoc in any directory * Remove protoc.zip after installing in docker * Small spike on some 'setup:...' commands. * Set default value for PWD to project root directory * Make update-bins Windows compatible, and allow running from any directory * Fix issue where bin files were directly generated for dependencies of integration test * Avoid find warning about argument order * Support specifying multiple integration tests in codegen.sh * Support running codegen.sh from any directory * Define local alternatives for docker commands * Update readme with development and contribution workflow * Upgrade to protoc 3.19.1 * Add dockerized protoc documentation * Recompile ts without docker * Recompile proto files * Recompile proto files * Rename bin2pbjs to proto2pbjs. * Fix file.bin case. * Update workflow to use bin2ts. * Run bin2ts output. Co-authored-by: Stephen Haberman <stephen.haberman@gmail.com>
- Loading branch information
1 parent
3517b55
commit 7564a78
Showing
81 changed files
with
300 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
PROJECT_ROOT=$(realpath $(dirname "$BASH_SOURCE")) | ||
PROJECT_ROOT_DOCKER="//ts-proto" # double slash to support git bash on windows | ||
|
||
# Alias docker-compose to make it usable from anywhere | ||
function _docker-compose() { docker-compose -f $PROJECT_ROOT/docker-compose.yml "$@"; } | ||
|
||
function protoc() { _docker-compose run --rm protoc "$@"; } | ||
function protoc-sh() { _docker-compose run --rm --entrypoint sh -- protoc "$@"; } | ||
function protoc-build() { _docker-compose build protoc; } | ||
function ts-protoc { protoc --plugin=$PROJECT_ROOT_DOCKER/protoc-gen-ts_proto "$@"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: "3" | ||
services: | ||
protoc: | ||
build: | ||
context: . | ||
dockerfile: "protoc.Dockerfile" | ||
args: | ||
BASE: "node:17-alpine3.14" | ||
BIN: "/ts-proto" | ||
PROTOC_VERSION: "3.19.1" | ||
working_dir: "/host" | ||
volumes: | ||
- "${PWD:-.}:/host" | ||
- ".:/ts-proto" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.