Skip to content

Commit a147d83

Browse files
authored
Move acme-assist to apps folder (#20)
1 parent b34c8e4 commit a147d83

File tree

93 files changed

+22
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+22
-20
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ azure/setup-env-variables.sh
99
azure/setup-db-env-variables.sh
1010
azure/setup-sso-variables.sh
1111
azure/setup-env-variables-keyvault.sh
12-
ai/setup-ai-env-variables.sh
12+
azure/setup-ai-env-variables.sh
1313
redis.json
1414
ad.json
1515
sso.json

ai/prepare_data.sh

-5
This file was deleted.

ai/acme-assist/.gitignore apps/acme-assist/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
HELP.md
22
target/
3+
*.sql
34
!.mvn/wrapper/maven-wrapper.jar
45
!**/src/main/**/target/
56
!**/src/test/**/target/

ai/README.md apps/acme-assist/README.md

+10-11
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ai/generate_db_migration.py apps/acme-assist/generate_db_migration.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def single_quote(raw):
88
return "'" + raw.replace("'", "''") + "'"
99

1010
def generate_sql(category):
11-
data=json.load(open('data/' + category + '.json','r+'))
11+
data=json.load(open(category,'r+'))
1212

1313
sql = 'INSERT INTO CATALOG (id, description, image_url1, image_url2, image_url3, name, price, short_description, tags)\nVALUES'
1414

@@ -34,5 +34,5 @@ def generate_sql(category):
3434
print(sql)
3535

3636
if __name__ == '__main__':
37-
generate_sql('bikes')
38-
generate_sql('accessories')
37+
generate_sql('data/bikes.json')
38+
generate_sql('data/accessories.json')
File renamed without changes.

apps/acme-assist/prepare_data.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
INITIAL_WORKING_DIRECTORY=$(pwd)
3+
cd "$(dirname "$0")"
4+
python ./generate_db_migration.py > ./V1_1__insert_products.sql
5+
mv ./*.sql ../acme-catalog/src/main/resources/db/migration
6+
cp ./data/images/* ../acme-catalog/src/main/resources/static/
7+
cd $INITIAL_WORKING_DIRECTORY
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)