Skip to content

Commit b9b6b32

Browse files
update staging directory
1 parent 2d64ee8 commit b9b6b32

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

stage_for_s3.bash

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,38 @@ TIMESTAMP=$(date '+%Y%m%d.%H%M')
99

1010
echo "Current timestamp is $TIMESTAMP"
1111

12-
# Download node tarballs from the latest release
12+
# Download packages and move to codez
13+
gh release download -R Asana/node -p "packages_*.gz"
14+
echo "Moving packages to $CODEZ/node/gyp"
15+
mv packages_arm64.tar.gz $CODEZ/node/gyp/packages_arm64_node22.tar.gz
16+
mv packages_x64.tar.gz $CODEZ/node/gyp/packages_amd64_node22.tar.gz
17+
18+
# Download fibers binaries and node tarballs
19+
gh release download -R Asana/node -p "linux-*.gz"
1320
gh release download -R Asana/node -p "*.xz"
1421

15-
# Generate unique identifier from timestamp and hash of downloaded files
16-
SHORT_HASH=$(cat *.xz | sha1sum | cut -c1-4)
22+
# Download fibers base package via CloudFront (public S3 access was disabled)
23+
curl "https://asana-oss-cache.asana.biz/node-fibers/fibers-5.0.4.pc.tgz" --output fibers-5.0.4.tar.gz
24+
tar -xzf fibers-5.0.4.tar.gz
25+
rm fibers-5.0.4.tar.gz
26+
27+
# Extract linux fibers binaries into the package
28+
find . -name "linux-*.gz" | while read -r a
29+
do
30+
tar -xzf "$a" -C package/bin
31+
rm "$a"
32+
done
33+
34+
# Repackage fibers with combined binaries
35+
tar -czf temp.tgz package/
36+
rm -rf package
37+
SHORT_HASH=$(cat temp.tgz | sha1sum | cut -c1-4)
1738
echo "HASH: $SHORT_HASH"
1839
UNIQUE="pc-${TIMESTAMP}-${SHORT_HASH}"
1940

41+
mv temp.tgz "fibers-5.0.4-${UNIQUE}.tgz"
42+
43+
# Process node tarballs
2044
for file in *.tar.xz; do
2145
if [[ "$file" == *-LATEST.tar.xz ]]; then
2246
base="${file%-LATEST.tar.xz}"

0 commit comments

Comments
 (0)