Last active
December 4, 2020 02:35
-
-
Save joshcarp/42c0aac1e2e6334c3735487f90e2286a to your computer and use it in GitHub Desktop.
Example of how to deploy cloud functions with vendor directories, run vendor-cloudfunctions.sh right before running cloud deploy
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
#!/bin/bash | |
module=$(cat go.mod | grep module | cut -d " " -f2) | |
mkdir -p ./vendor/$module | |
cp -r pkg go.mod go.sum ./vendor/$module | |
echo "moving files to $module" | |
rm -rf go.mod go.sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
go.mod and go.sum are required, so don't ignore them in your .gcloudignore