File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ COPY src ./src
29
29
COPY templates ./templates
30
30
COPY __main__.py ./
31
31
32
- RUN rm -r ci/LDKSwift/Sources/LDKHeaders
33
- RUN rm -r ci/LDKSwift/Sources/LDKSwift
32
+ RUN rm -rf ci/LDKSwift/Sources/LDKHeaders
33
+ RUN rm -rf ci/LDKSwift/Sources/LDKSwift
34
34
RUN chmod +x ci/run_tests.sh
35
35
36
36
COPY bindings/batteries ci/LDKSwift/Sources/LDKSwift/batteries
Original file line number Diff line number Diff line change 1
1
pushd ../
2
2
PROJECT_DIRECTORY=` pwd`
3
3
LDK_DIRECTORY=$1
4
+ MOUNT_CI_FOLDER=$2
4
5
LDK_SUBDIRECTORY=" $LDK_DIRECTORY /lightning-c-bindings"
5
- # echo $LDK_SUBDIRECTORY
6
6
7
- [ " ${LDK_DIRECTORY} " = " " ] && echo " Usage: ./docker_shell.sh /path/to/ldk-c-bindings" && exit 1;
7
+ [[ " ${LDK_DIRECTORY} " = " " || " ${MOUNT_CI_FOLDER} " = " " ]] && echo " Usage: ./docker_shell.sh /path/to/ldk-c-bindings true/false " && exit 1;
8
8
[ ! -d " ${LDK_DIRECTORY} " ] && echo " Provided directory does not exist" && exit 1;
9
- # [ ! -d "${LDK_SUBDIRECTORY}" ] && echo "Provided directory does not contain lightning-c-bindings directory." && exit 1;
9
+ [ ! -d " ${LDK_SUBDIRECTORY} " ] && echo " Provided directory does not contain lightning-c-bindings directory." && exit 1;
10
10
11
- # use for direct ci folder access
12
- # note: batteries will be missing. In parent directory, run `cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift`
13
- # docker run --name "swift-generator-shell" -i -v $PROJECT_DIRECTORY/ci:/ci -v $LDK_DIRECTORY:/ldk-c-bindings --rm -t swift-generation-ci /bin/bash
14
-
15
- docker run --name " swift-generator-shell" -i -v $LDK_DIRECTORY :/ldk-c-bindings --rm -t swift-generation-ci /bin/bash
11
+ if [[ " ${MOUNT_CI_FOLDER} " = " true" ]]; then
12
+ # use for direct ci folder access
13
+ # note: batteries will be missing. In parent directory, run `cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift`
14
+ cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
15
+ docker run --name " swift-generator-shell" -e MOUNTED_CI_FOLDER=true -i -v $PROJECT_DIRECTORY /ci:/ci -v $LDK_DIRECTORY :/ldk-c-bindings --rm -t swift-generation-ci /bin/bash
16
+ elif [ " ${MOUNT_CI_FOLDER} " = " false" ]; then
17
+ docker run --name " swift-generator-shell" -e MOUNTED_CI_FOLDER=false -i -v $LDK_DIRECTORY :/ldk-c-bindings --rm -t swift-generation-ci /bin/bash
18
+ else
19
+ echo " Usage: ./docker_shell.sh /path/to/ldk-c-bindings true/false" && exit 1;
20
+ fi
Original file line number Diff line number Diff line change 1
1
set -e
2
2
set -x
3
3
4
- # find all directories and files within LDKSwift sources, exclude batteries.
4
+ # find all directories and files within LDKSwift sources, exclude batteries.
5
5
# If at least one result (xargs -r), remove recursively (rm -r)
6
+
7
+ # remove everything except the batteries folder from the sources
6
8
find ./LDKSwift/Sources/LDKSwift/* -maxdepth 0 -not -name ' batteries' | xargs -r rm -r
9
+
7
10
# rm -i -r ./LDKSwift/Sources/LDKSwift/^(batteries)*
8
11
9
12
pushd ../
You can’t perform that action at this time.
0 commit comments