@@ -12,7 +12,7 @@ YELLOW='\033[1;33m'
1212NC=' \033[0m' # No Color
1313
1414# Configuration
15- FONTS_DIR=" ./ fonts"
15+ FONTS_DIR=" fonts"
1616OUTPUT_DIR=" ./release-artifacts"
1717VERSION=${1:- " 1.3" }
1818
@@ -39,10 +39,8 @@ create_zip() {
3939 local full_path=" $FONTS_DIR /$source_dir "
4040
4141 if [ -d " $full_path " ]; then
42- echo " Creating $zip_name ..."
43- cd " $FONTS_DIR "
44- zip -r " ../$OUTPUT_DIR /$zip_name " " $source_dir " > /dev/null
45- cd - > /dev/null
42+ echo " Creating $zip_name from $full_path "
43+ zip -r " $OUTPUT_DIR /$zip_name " " $( pwd) /$full_path " > /dev/null
4644
4745 # Get file count and size
4846 local file_count=$( find " $full_path " -type f | wc -l | tr -d ' ' )
@@ -63,17 +61,10 @@ create_zip "NerdFonts" "monaspace-nerdfonts-v${VERSION}.zip"
6361if [ -d " $FONTS_DIR /Web Fonts" ]; then
6462 echo -e " ${YELLOW} Processing web fonts...${NC} "
6563
66- # Save current directory and change to Web Fonts
67- ORIGINAL_FONTS_DIR=" $FONTS_DIR "
68- FONTS_DIR=" $FONTS_DIR /Web Fonts"
69-
7064 # Now create zips from within Web Fonts directory
71- create_zip " NerdFonts Web Fonts" " ../monaspace-webfont-nerdfonts-v${VERSION} .zip"
72- create_zip " Static Web Fonts" " ../monaspace-webfont-static-v${VERSION} .zip"
73- create_zip " Variable Web Fonts" " ../monaspace-webfont-variable-v${VERSION} .zip"
74-
75- # Restore original FONTS_DIR
76- FONTS_DIR=" $ORIGINAL_FONTS_DIR "
65+ create_zip " Web Fonts/NerdFonts Web Fonts" " monaspace-webfont-nerdfonts-v${VERSION} .zip"
66+ create_zip " Web Fonts/Static Web Fonts" " monaspace-webfont-static-v${VERSION} .zip"
67+ create_zip " Web Fonts/Variable Web Fonts" " monaspace-webfont-variable-v${VERSION} .zip"
7768else
7869 echo -e " ${RED} Warning: Web Fonts directory not found${NC} "
7970fi
0 commit comments