Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PECL publish #85

Merged
merged 41 commits into from Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e5e998a
require composer to load awscrt extension
TingDaoK Feb 21, 2023
31a5785
load extension before run composer
TingDaoK Feb 22, 2023
82abc2d
make test after the composer nonsense
TingDaoK Feb 22, 2023
1a0efbf
try to just use make test?
TingDaoK Feb 22, 2023
17b6a93
run test
TingDaoK Feb 22, 2023
9ff650e
clean up
TingDaoK Feb 22, 2023
9de07ef
restructure
TingDaoK Feb 22, 2023
826974a
change dir from run test
TingDaoK Feb 22, 2023
f6314a2
update the script path from ci
TingDaoK Feb 22, 2023
1f6f814
create release action when we cut a new release
TingDaoK Feb 22, 2023
9de1d33
more fix
TingDaoK Feb 22, 2023
f183523
make a github action to test pecl before release
TingDaoK Feb 22, 2023
093cf4e
why not find
TingDaoK Feb 22, 2023
b6a3a29
use mac
TingDaoK Feb 22, 2023
08aa34b
skip verification
TingDaoK Feb 22, 2023
3015509
build and test as well
TingDaoK Feb 22, 2023
279f5d2
just make sure it builds
TingDaoK Feb 22, 2023
a7e8407
use mac to release
TingDaoK Feb 22, 2023
02a6591
trivial
TingDaoK Feb 22, 2023
7d56d18
oh, it was a typo..
TingDaoK Feb 22, 2023
26ab397
windows CI
TingDaoK Feb 23, 2023
8208b31
get the right directory
TingDaoK Feb 23, 2023
311edc6
why?
TingDaoK Feb 23, 2023
2aae069
this?
TingDaoK Feb 23, 2023
8455b69
why cannot find dll
TingDaoK Feb 23, 2023
babc4bf
one more test
TingDaoK Feb 23, 2023
3ad39d5
fine
TingDaoK Feb 24, 2023
72c24d9
generate php-win.ini
TingDaoK Feb 24, 2023
7c12d40
get the right php
TingDaoK Feb 24, 2023
a28388f
give me echo
TingDaoK Feb 24, 2023
ce4a00c
I don't know
TingDaoK Feb 24, 2023
8c66121
I don't know
TingDaoK Feb 24, 2023
e361f03
Windows ci fix (#86)
TingDaoK Feb 24, 2023
b116a18
it should not be needed for the config platform
TingDaoK Feb 27, 2023
c0ab711
Revert "it should not be needed for the config platform"
TingDaoK Feb 27, 2023
c2f584a
remove release.yml and leave it as todo to follow up quick
TingDaoK Feb 27, 2023
ff20f95
Rewrite script (#87)
TingDaoK Feb 27, 2023
b4d352c
Merge branch 'native-extension-rewrite' of github.com:awslabs/aws-crt…
TingDaoK Feb 27, 2023
a63ac28
try CMD to run multiple lines of code
TingDaoK Feb 28, 2023
a9ab031
try to not force the special version of phpunit
TingDaoK Feb 28, 2023
6bc427d
update comments
TingDaoK Feb 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-format-ignore
@@ -1,4 +1,3 @@
# ignore generated files
ext/api.h
ext/*_arginfo.h
src/api.h
113 changes: 73 additions & 40 deletions .github/workflows/ci.yml
Expand Up @@ -30,12 +30,6 @@ jobs:
with:
submodules: recursive

- name: Install ancient PHPUnit
run: composer require --dev --ignore-platform-reqs phpunit/phpunit "4.8.36"

- name: Install dependencies
run: composer update --no-interaction

- name: Build for PHP 5.5
env:
CC: clang
Expand All @@ -45,6 +39,13 @@ jobs:
./configure
make
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debateable: // TODO run tests (if we are officially supporting 5.5 for now)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should ask when we can drop support for older versions of PHP. If it's something like 1-2 months away, we can drop support now and sdk-php can pick up new changes later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave the php version related stuff as a follow up item, I have listed some TODOs in the description of the PR.


- name: Install dependencies
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this necessary?

ubuntu-latest comes with composer preinstalled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have composer.phar in the same directory. So, that we don't need to script to get the path of composer.phar.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

installing composer twice seems like it could have weird consequences. let's just find the path. maybe something like?:

# get path to composer.phar so we can run it with custom php.ini
COMPOSER_PHAR=$(realpath $(which composer))
php -c php.ini $COMPOSER_PHAR require ...

php -c php.ini composer.phar require --dev --ignore-platform-reqs phpunit/phpunit "4.8.36"
graebm marked this conversation as resolved.
Show resolved Hide resolved
php -c php.ini composer.phar update --no-interaction

php-linux-x64:
runs-on: ubuntu-latest
strategy:
Expand All @@ -71,9 +72,6 @@ jobs:
with:
submodules: recursive

- name: Install dependencies
run: composer update --no-interaction

- name: Run tests
env:
CC: clang
Expand All @@ -82,37 +80,50 @@ jobs:
phpize
./configure
make
make test


# linux-arm:
# name: ARM (${{ matrix.arch }})
# runs-on: ubuntu-latest
# strategy:
# matrix:
# arch: [armv6, armv7, arm64]
# steps:
# - name: Build ${{ env.PACKAGE_NAME }}
# run: |
# python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
# chmod a+x builder
# ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream

# windows-vc16:
# runs-on: windows-latest
# strategy:
# matrix:
# arch: [x64]
# steps:
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: ${{ matrix.arch }}
# uwp: false
# spectre: true
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
# run: |
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream
./dev-scripts/run_tests

# linux-arm:
# name: ARM (${{ matrix.arch }})
# runs-on: ubuntu-latest
# strategy:
# matrix:
# arch: [armv6, armv7, arm64]
# steps:
# - name: Build ${{ env.PACKAGE_NAME }}
# run: |
# python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
# chmod a+x builder
# ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream

windows-vc16:
runs-on: windows-2019
defaults:
run:
shell: cmd # use CMD instead of powershell to catch error from bat script
strategy:
matrix:
arch: [x64]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused: Why only x64? Is this a todo for 32bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe should leave it as a TODO. Again, just being lazy as no current ask and it's probably work.

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- id: setup-php-sdk
uses: cmb69/setup-php-sdk@v0.6
with:
version: '8.0'
arch: x64
TingDaoK marked this conversation as resolved.
Show resolved Hide resolved
ts: ts
waahm7 marked this conversation as resolved.
Show resolved Hide resolved
deps: openssl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused: What is this action? I could not find anything about it using a quick Google search (https://github.com/marketplace?type=actions&query=Setup+PHP+). Can you please add some documentation for why we need a different action for Windows CI? It appears that shivammathur/setup-php@v2 also supports Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, I didn't dig deep. I followed the PR initialed from Mike, https://github.com/awslabs/aws-crt-php/pull/77/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR114.
And I believe Mike found it from https://github.com/Imagick/imagick/blob/master/.github/workflows/windows.yml

I was really just want to have something working...

- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
toolset: ${{steps.setup-php-sdk.outputs.toolset}}
# CMD only execute one commend per run
graebm marked this conversation as resolved.
Show resolved Hide resolved
- run: phpize
- run: .\configure --with-prefix=${{steps.setup-php-sdk.outputs.prefix}} --enable-awscrt=shared --enable-cli --enable-openssl
- run: nmake
- run: nmake generate-php-ini
- run: .\dev-scripts\run_tests ${{steps.setup-php-sdk.outputs.prefix}}\php

# windows-vc14:
# runs-on: windows-latest
Expand Down Expand Up @@ -154,3 +165,25 @@ jobs:
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream

pecl-package-test:
runs-on: macos-latest
TingDaoK marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Run tests
run: |
./dev-scripts/prepare_release.sh --name aws-crt --user aws-crt --email aws-sdk-common-runtime@amazon.com --version 1.0.0 --notes NOTES
tar -zxf *.tgz
cd awscrt-1.0.0
phpize
./configure
make
TingDaoK marked this conversation as resolved.
Show resolved Hide resolved
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,36 @@
name: Release PECL Preparation

on:
release:
types: [published]
workflow_dispatch:

jobs:
package:
name: Prepare package
runs-on: macos-latest
TingDaoK marked this conversation as resolved.
Show resolved Hide resolved

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Checkout Source
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Get release tag
uses: awslabs/aws-crt-builder/.github/actions/release-tag@main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should move to something like the IoT SDKs use, where there's a release workflow they run that creates the tags

seems more explicit and less fragile than the current state of doing things where a release workflow runs in reaction to tags being created

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related https://github.com/awslabs/aws-crt-php/blob/main/ext/crt.c#L275 from #59

We should also update the version of the native extension.

However, after I went through the IoT SDK actions, I think the issue from their approach is:

  • Now they have two ways to cut a release: the github action and the old way of manually create a tag
  • There is no enforcement to only use one approach and very likely, the old way will break stuff (Not running the script that initialized from github action)
  • They already had multiple versions that are still cut manually and have different behavior for different tags, which is not good.

Yeah, it's more explicit, but easy to miss and break. I'd prefer to have only one place to trigger the actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'll remove this action to a separate PR to keep things more clear.

id: tag

- name: Prepare Package Script
run: dev-scripts/prepare_release.sh --name aws-crt --user aws-crt --email aws-sdk-common-runtime@amazon.com --version ${{ steps.tag.outputs.release_tag }} --notes NOTES
TingDaoK marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: pecl_package_${{ steps.tag.outputs.release_tag }}
path: awscrt-${{ steps.tag.outputs.release_tag }}.tgz
16 changes: 7 additions & 9 deletions Makefile.frag
Expand Up @@ -27,8 +27,8 @@ CMAKE_BUILD = CMAKE_BUILD_PARALLEL_LEVEL='' $(CMAKE) --build
CMAKE_BUILD_TYPE ?= RelWithDebInfo
CMAKE_TARGET = --config $(CMAKE_BUILD_TYPE) --target install

all: extension
.PHONY: all extension
all: extension
.PHONY: all extension

# configure for static aws-crt-ffi.a
build/aws-crt-ffi-static/CMakeCache.txt:
Expand All @@ -46,19 +46,17 @@ ext/awscrt.lo: ext/awscrt.c

ext/awscrt.c: build/aws-crt-ffi-static/libaws-crt-ffi.a ext/api.h ext/awscrt_arginfo.h

ext/awscrt_arginfo.h: ext/awscrt.stub.php gen_stub.php
ext/awscrt_arginfo.h: awscrt.stub.php gen_stub.php
ifeq ($(GENERATE_STUBS),1)
# install awscrt.stub.php to ext/
cp -v awscrt.stub.php ext/awscrt.stub.php
Comment on lines +51 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? We moved this to the main folder instead of ext/ and making a copy here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PECL removes .php from subdirectory, but not from the root directory. So, move it outside the ext/ is the easiest way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this in ext/? I am just confused about why do we need this file at two places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        # generate awscrt_arginfo.h
	php gen_stub.php --minimal-arginfo ext/awscrt.stub.php

This part will generate the awscrt_arginfo.h into the same folder as awscrt.stub.php.
The gen_sub.php is from the PHP build scripts, I didn't dig deep into it. We need awscrt_arginfo.h in ext/, so I just copy it around here.

# generate awscrt_arginfo.h
php gen_stub.php --minimal-arginfo ext/awscrt.stub.php
endif

# transform/install api.h from FFI lib
src/api.h: crt/aws-crt-ffi/src/api.h
php gen_api.php crt/aws-crt-ffi/src/api.h > src/api.h

# install api.h to ext/ as well
ext/api.h : src/api.h
cp -v src/api.h ext/api.h
ext/api.h : crt/aws-crt-ffi/src/api.h
php gen_api.php crt/aws-crt-ffi/src/api.h > ext/api.h

ext/php_aws_crt.h: ext/awscrt_arginfo.h ext/api.h

Expand Down
20 changes: 8 additions & 12 deletions Makefile.frag.w32
@@ -1,6 +1,5 @@

CMAKE=cmake.exe
COMPOSER_PHAR=C:\ProgramData\ComposerSetup\bin\composer.phar
PHP_BINARY=$(PHP_PREFIX)\php.exe

CMAKE_CONFIGURE = $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(AWSCRT_DIR)\build\install -DCMAKE_PREFIX_PATH=$(AWSCRT_DIR)\build\install -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
Expand All @@ -22,14 +21,11 @@ $(BUILD_DIR)\php_awscrt.dll: $(AWSCRT_DIR)\ext\awscrt.c
$(AWSCRT_DIR)\ext\awscrt.c: $(AWSCRT_DIR)\build\libaws-crt-ffi.lib $(AWSCRT_DIR)\ext\api.h $(AWSCRT_DIR)\ext\awscrt_arginfo.h

# transform\install api.h from FFI lib
$(AWSCRT_DIR)\src\api.h: $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h
php $(AWSCRT_DIR)\gen_api.php $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h > $(AWSCRT_DIR)\src\api.h

# install api.h to ext/ as well
$(AWSCRT_DIR)\ext\api.h : $(AWSCRT_DIR)\src\api.h
copy $(AWSCRT_DIR)\src\api.h $(AWSCRT_DIR)\ext\api.h

# Use PHPUnit to run tests
test-awscrt: install $(AWSCRT_DIR)\src\api.h $(BUILD_DIR)\php_awscrt.dll
$(PHP_BINARY) -c $(AWSCRT_DIR)\php-win.ini $(COMPOSER_PHAR) --working-dir=$(AWSCRT_DIR) update
$(PHP_BINARY) -c $(AWSCRT_DIR)\php-win.ini $(COMPOSER_PHAR) --working-dir=$(AWSCRT_DIR) run test-win
$(AWSCRT_DIR)\ext\api.h: $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h
php $(AWSCRT_DIR)\gen_api.php $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h > $(AWSCRT_DIR)\ext\api.h

# Get the dll directory to load
generate-php-ini:
@echo extension=$(BUILD_DIR)\php_awscrt.dll > php-win.ini
@echo extension=$(PHP_PREFIX)\ext\php_openssl.dll >> php-win.ini
@echo extension=$(PHP_PREFIX)\ext\php_mbstring.dll >> php-win.ini
File renamed without changes.
2 changes: 1 addition & 1 deletion builder.json
Expand Up @@ -32,6 +32,6 @@
"NO_INTERACTION": "1"
},
"test_steps": [
["./run_tests"]
["./dev-scripts/run_tests"]
]
}
8 changes: 4 additions & 4 deletions composer.json
Expand Up @@ -11,24 +11,24 @@
}
],
"config": {
"platform": {"php": "5.6"}
"platform": {"php": "7.4"}
waahm7 marked this conversation as resolved.
Show resolved Hide resolved
},
"minimum-stability": "alpha",
"require": {
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit":"^4.8.35|^5.6.3"
"phpunit/phpunit":"^5.6.3"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"test": "./run_tests",
"test": "./dev-scripts/run_tests",
"test-extension": "@test",
"test-win": "run_tests"
"test-win": ".\\dev-scripts\\run_tests.bat"
},
"license": "Apache-2.0"
}
48 changes: 48 additions & 0 deletions dev-scripts/cleanup.sh
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
TingDaoK marked this conversation as resolved.
Show resolved Hide resolved

BASENAME=${0}
TOOLS_DIR=$(dirname ${BASENAME})
WORK_DIR="${TOOLS_DIR}/.."

cd "${WORK_DIR}"

find . -name \*.tgz -a |xargs rm -rf

## get rid of anything that phpize, configure and make as well
rm -rf .deps \
.libs \
Makefile \
Makefile.fragments \
Makefile.global \
Makefile.objects \
acinclude.m4 \
aclocal.m4 \
autom4te.cache \
build \
config.guess \
config.h \
config.h.in* \
config.log \
config.nice \
config.status \
config.sub \
configure \
configure.in \
configure.ac \
include \
install-sh \
libtool \
ltmain.sh \
missing \
mkinstalldirs \
modules \
run-tests.php \
awscrt.la \
vendor \
composer.lock \
ext/awscrt.stub.php \

find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
File renamed without changes.
File renamed without changes.
20 changes: 14 additions & 6 deletions prepare_package_xml.sh → dev-scripts/prepare_package_xml.sh
Expand Up @@ -11,9 +11,12 @@ EMAIL="${opts[--email]}"
VERSION="${opts[--version]}"
NOTES="${opts[--notes]}"

BASENAME=${0}
TOOLS_DIR=$(dirname ${BASENAME})

TODAY=$(date -u +%Y-%m-%d)

cat package.xml-template_pre \
cat $TOOLS_DIR/package.xml-template_pre \
| sed "s/{{{NAME}}}/$NAME/g" \
| sed "s/{{{USER}}}/$USER/g" \
| sed "s/{{{EMAIL}}}/$EMAIL/g" \
Expand All @@ -24,14 +27,14 @@ cat package.xml-template_pre \
source_ext='(c|cc|h|cpp|hpp|m4|w32|ini|frag|cmake|inl|in|py|gnu|yaml|def|pl|S|s|errordata|go|lds|num|asm|mod|peg|mk|rs|toml|sh)'
doc_ext='(md|json|html|dot|graphml|png|gn|sha1|css|rst|)'

special_docs='(LICENSE*|NOTICE|changelog.txt|CHANGELOG|THIRD-PARTY|README*|readme|METADATA|CONTRIBUTORS|UPDATING|doc.config)'
special_docs='(LICENSE*|NOTICE|changelog.txt|CHANGELOG|THIRD-PARTY|README*|readme|METADATA|CONTRIBUTORS|UPDATING|doc.config|THIRD-PARTY-LICENSES.txt)'
special_tests='(ci-test.sh|format-check.sh|run_tests*|sanitizer-blacklist.txt|run-clang-tidy.sh|benchmark-build-run.sh|break-tests.sh|generate-coverage.sh|test.xml)'
special_src='(gen_api.php|gen_stub.php|CMakeLists.txt|post.sh|postun.sh|Makefile*|build-buildspec.sh|build-deps.sh|objects.txt|go.*|BUILD*|DEPS|install_and_run.sh|codemod.sh|requirements.txt)'
skip_files='(package.xml*|prepare_release.sh|codereview.settings|*.o|*.a|*.obj|*.lib|break-tests-android.sh|whitespace.txt|prepare_package_xml.sh|crypto_test_data.cc|*.pdf|*.svg|*.docx|cbmc-proof.txt|codecov*|litani*|*.toml)'
skip_files='(package.xml*|prepare_release.sh|codereview.settings|*.o|*.a|*.obj|*.lib|break-tests-android.sh|whitespace.txt|prepare_package_xml.sh|crypto_test_data.cc|*.pdf|*.svg|*.docx|cbmc-proof.txt|codecov*|litani*|*.toml|module.modulemap|cleanup.sh)'

special_scripts='(awscrt.stub.php)'

skip_directories='(tests|test|AWSCRTAndroidTestRunner|docker-images|codebuild|fuzz|verfication|third_party|docs|generated-src|aws-lc|aws-crt-sys)'
skip_directories='(tests|test|AWSCRTAndroidTestRunner|docker-images|codebuild|fuzz|third_party|docs|generated-src|aws-lc|aws-crt-sys|ecdsa-fuzz-corpus|bin|examples|compliance|verification)'

process_file() {
if (( $# == 0 ))
Expand Down Expand Up @@ -133,12 +136,17 @@ do
echo '</dir>'
continue
fi
# skip the src directory as it is not part of the native extension
if [[ ${a} == 'src' ]]
then
continue
fi

if [[ -f ${a} ]]
then process_file "${a}"
else process_dir "${a}"
fi
done
echo '</dir>'

cat package.xml-template_post

cat $TOOLS_DIR/package.xml-template_post
TingDaoK marked this conversation as resolved.
Show resolved Hide resolved