Skip to content

Commit

Permalink
Merge branch 'main' into feat/dynamic-lights
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAlvarezMelucciDCL authored Jan 10, 2025
2 parents 5018cb8 + 1ba2979 commit bade865
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ on:
push:
branches:
- main
- experimental
pull_request:
release:
types:
- created

env:
BRANCH_TAG: ${{ github.ref_name == 'experimental' && 'experimental' || '' }}

name: build-deploy
jobs:
check_and_build:
Expand All @@ -17,7 +21,7 @@ jobs:
outputs:
dcl_protocol_s3_bucket_key: ${{ steps.publish_dcl_protocol.outputs.s3-bucket-key }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: install
run: make install
- name: buf build
Expand All @@ -43,7 +47,10 @@ jobs:
## inform gitlab after publishing to proceed with CDN propagation
gitlab-token: ${{ secrets.GITLAB_TOKEN }}
gitlab-pipeline-url: ${{ secrets.GITLAB_URL }}
custom-tag: ${{ env.BRANCH_TAG }}
branch-to-custom-tag: ${{ env.BRANCH_TAG }}
env:
BRANCH_NAME: ${{ github.ref_name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.SDK_TEAM_AWS_ID }}
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ all: buf-lint buf-build test
install:
npm i
rm -rf proto/google || true
cp -r node_modules/protobufjs/google proto/google
cp -r node_modules/protobufjs/google proto/google

list-components-ids:
@bash scripts/list-components-ids.sh

check-component-id:
@bash scripts/check-component-id.sh $(ID)
16 changes: 16 additions & 0 deletions scripts/check-component-id.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: make check-component-id ID=<id>"
exit 1
fi

id=$1

matches=$(find . -name "*.proto" -exec grep -l "option (common\.ecs_component_id) = $id;" {} +)

if [ -z "$matches" ]; then
echo "id $id is free"
else
echo "id $id is taken"
fi
14 changes: 14 additions & 0 deletions scripts/list-components-ids.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

ids=$(find . -name "*.proto" -exec grep -ho 'option (common\.ecs_component_id) = [0-9]\+;' {} + | sed -E 's/.*= ([0-9]+);/\1/' | sort -n)

count=$(echo "$ids" | wc -l | xargs)

echo "List of ids ($count total):"

i=1
echo "$ids" | while read id; do
echo "$i. $id"
((i++))
done

0 comments on commit bade865

Please sign in to comment.