Skip to content

Commit

Permalink
Release 0.0.1-alpha.8
Browse files Browse the repository at this point in the history
  • Loading branch information
webNeat committed Sep 8, 2024
1 parent 285d033 commit 00de138
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hosty",
"version": "0.0.1-alpha.7",
"version": "0.0.1-alpha.8",
"description": "A code based opinionated way to self-host and manage web apps.",
"type": "module",
"main": "dist/index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/blocks/set_available_port.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export function set_available_ports(service_dir: string, count: number, var_name
desired_count=${count}
# Read existing ports from the file, if it exists
if [ -f ${port_file} ]; then
if [ -f "${port_file}" ]; then
while IFS= read -r line; do
existing_ports+=("$line")
done < ${port_file}
done < "${port_file}"
fi
# Add existing ports to the final list
Expand Down Expand Up @@ -45,9 +45,9 @@ export function set_available_ports(service_dir: string, count: number, var_name
fi
# Write the ports to the file, one per line
> ${port_file} # Clear the file before writing
> "${port_file}" # Clear the file before writing
for port in "\${ports[@]}"; do
echo "$port" >> ${port_file}
echo "$port" >> "${port_file}"
done
`
return block(`Generate ${count} available ports for ${service_dir} into the var ${var_name}`, {}, [
Expand Down

0 comments on commit 00de138

Please sign in to comment.