Skip to content

Commit

Permalink
test build files
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Dec 6, 2023
1 parent 66b508f commit 0cadc0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/activemq/docker-compose-artemis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# only for artemis Activemq
# only for artemis activemq

version: "3.8"

Expand Down
2 changes: 1 addition & 1 deletion apps/activemq/docker-compose-classic.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# only for classic Activemq
# only for classic activemq
version: "3.8"

services:
Expand Down
10 changes: 5 additions & 5 deletions build/compose_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
# Remove any empty strings from the list
filenames = [filename for filename in filenames if filename]

# Load the base docker-compose file
with open('docker-compose.yml', 'r') as base_file:
base_config = yaml.safe_load(base_file)

for filename in filenames:
# 获取文件的目录和基础名
directory, basename = os.path.split(filename)

# Load the base docker-compose file from the same directory as filename
with open(os.path.join(directory, 'docker-compose.yml'), 'r') as base_file:
base_config = yaml.safe_load(base_file)

# 从基础名中提取 * 部分
name_part = basename.split('-')[2].split('.')[0] # 从 'docker-compose-*.yml' 中提取 '*'

Expand All @@ -34,4 +34,4 @@

# Write the merged configuration to the new file
with open(new_filename, 'w') as output_file:
yaml.safe_dump(base_config, output_file)
yaml

0 comments on commit 0cadc0f

Please sign in to comment.