-
Notifications
You must be signed in to change notification settings - Fork 153
/
sh_generate_project.sh
executable file
·56 lines (49 loc) · 1.39 KB
/
sh_generate_project.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -e
TYPE=$1
MY_DIR="build/toscan/$TYPE"
echo "Generating project with type $TYPE in $MY_DIR"
rm -rf $MY_DIR
mkdir -p $MY_DIR
echo "buildscript {
repositories {
mavenLocal()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'co.com.bancolombia.cleanArchitecture:scaffold-clean-architecture:CURRENT_LOCAL_VERSION'
}
}
apply plugin: 'co.com.bancolombia.cleanArchitecture'" >> $MY_DIR/build.gradle
cd $MY_DIR || exit
gradle ca --metrics false --example true --type $TYPE
gradle wrapper
if [ $TYPE == "reactive" ]
then
for adapter in "asynceventbus" "binstash" "cognitotokenprovider" "dynamodb" "kms" "mongodb" "mq" "r2dbc" "redis" "restconsumer" "rsocket" "s3" "secrets" "sqs"
do
./gradlew gda --type $adapter
done
for entry in "asynceventhandler" "graphql" "kafka" "mq" "rsocket" "sqs" "webflux"
do
./gradlew gep --type $entry
done
else
for adapter in "binstash" "dynamodb" "jpa" "kms" "mongodb" "mq" "redis" "restconsumer" "s3" "secrets" "sqs"
do
./gradlew gda --type $adapter
done
for entry in "mq" "restmvc" "sqs" "graphql"
do
./gradlew gep --type $entry
done
fi
branch=${GITHUB_REF##*/}
git init
git checkout -b $branch
git add .
git config user.email "[email protected]"
git config user.name "Github Actions Bot"
git commit -am "to scan"