diff --git a/.github/workflows/build-and-deploy-plugins.yml b/.github/workflows/build-and-deploy-plugins.yml index aa44d2f..86a57c9 100644 --- a/.github/workflows/build-and-deploy-plugins.yml +++ b/.github/workflows/build-and-deploy-plugins.yml @@ -44,7 +44,7 @@ jobs: - name: Build Go plugins in Docker run: | set -e - mkdir -p $PLUGIN_OUTPUT_DIR github-repo/plugins-temp + mkdir -p $PLUGIN_OUTPUT_DIR BUILD_CMDS="" @@ -56,17 +56,11 @@ jobs: fi done - # Copy Gerrit plugins into GitHub repo so they inherit its go.mod + # Gerrit plugins — build in their own repo/module context for dir in gerrit-repo/plugins/*; do - plugin=$(basename "$dir") - cp -r "$dir" "github-repo/plugins-temp/$plugin" - done - - # Build copied Gerrit plugins - for dir in github-repo/plugins-temp/*; do if [ -d "$dir/cmd" ]; then plugin=$(basename "$dir") - BUILD_CMDS+="cd github-repo && go build -buildmode=plugin -buildvcs=false -o ../${PLUGIN_OUTPUT_DIR}/${plugin}.so ./plugins-temp/${plugin}/cmd && cd - && " + BUILD_CMDS+="cd gerrit-repo && go build -buildmode=plugin -buildvcs=false -o ../${PLUGIN_OUTPUT_DIR}/${plugin}.so ./plugins/${plugin}/cmd && cd - && " fi done @@ -77,6 +71,7 @@ jobs: docker run --rm -v "$(pwd)":/app -w /app golang:1.24-bullseye sh -c "$BUILD_CMDS" + - name: List zip output run: | ls -lh plugins_bundle.zip