Skip to content

Commit

Permalink
Uncompress the nodejs archive
Browse files Browse the repository at this point in the history
Ensure that we uncompress the downloaded archive

Signed-off-by: Aidan Delaney <[email protected]>
  • Loading branch information
AidanDelaney committed Nov 3, 2023
1 parent f9872a5 commit 9278e17
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ mkdir -p "${node-js_layer}"

# 3. DOWNLOAD node-js
node-js_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "node-js") | .metadata.version')
echo "---> Downloading and extracting NodeJS $node-js_version"
echo "---> Downloading and extracting NodeJS"
node-js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "$node-js_url" | tar -xzf - -C "${node-js_layer}"
wget -q -O - "$node-js_url" | tar -xxf - -C "${node-js_layer}"

# 4. MAKE node-js AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Next, we'll download the NodeJS runtime and install it into the layer directory.
```bash
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "${node_js_url}" | tar -xf - -C "${node_js_layer}"
wget -q -O - "${node_js_url}" | tar -xJf - -C "${node_js_layer}"
```

This code uses the `wget` tool to download the NodeJS binaries from the given URL, and extracts it to the `node_js_layer` directory.
Expand Down Expand Up @@ -74,7 +74,7 @@ mkdir -p "${node_js_layer}"
# 3. DOWNLOAD node-js
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "${node_js_url}" | tar -xf - -C "${node_js_layer}"
wget -q -O - "${node_js_url}" | tar -xJf - -C "${node_js_layer}"

# 4. MAKE node-js AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mkdir -p "${node_js_layer}"
# 3. DOWNLOAD RUBY
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "$node_js_url" | tar -xzf - -C "${node_js_layer}"
wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}"

# 4. MAKE RUBY AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down Expand Up @@ -189,7 +189,7 @@ mkdir -p "${node_js_layer}"
# 3. DOWNLOAD RUBY
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "$node_js_url" | tar -xzf - -C "${node_js_layer}"
wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}"
# 4. MAKE RUBY AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mkdir -p "${node_js_layer}"
# 3. DOWNLOAD node-js
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "$node_js_url" | tar -xzf - -C "${node_js_layer}"
wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}"

# 4. MAKE node-js AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mkdir -p "${node_js_layer}"
node_js_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "node-js") | .metadata.version')
echo "---> Downloading and extracting NodeJS $node_js_version"
node_js_url=https://nodejs.org/dist/v${node_js_version}/node-v${node_js_version}-linux-x64.tar.xz
wget -q -O - "$node_js_url" | tar -xzf - -C "${node_js_layer}"
wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}"

# 4. MAKE node-js AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mkdir -p "${node_js_layer}"
# 3. DOWNLOAD node-js
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "$node_js_url" | tar -xzf - -C "${node_js_layer}"
wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}"

# 4. MAKE node-js AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mkdir -p "$rubylayer"
ruby_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "ruby") | .metadata.version')
echo "---> Downloading and extracting Ruby $ruby_version"
ruby_url=https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-22/ruby-$ruby_version.tgz
wget -q -O - "$ruby_url" | tar -xzf - -C "$rubylayer"
wget -q -O - "$ruby_url" | tar -xJf - -C "$rubylayer"

# 4. MAKE RUBY AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "$layersdir/ruby.toml"
Expand Down

0 comments on commit 9278e17

Please sign in to comment.