File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -76,3 +76,8 @@ android/keystores/debug.keystore
76
76
77
77
# generated by bob
78
78
lib /
79
+
80
+ # generated module assets
81
+ * .tar.gz
82
+ * .tgz
83
+ * .zip
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Navigate to the project root directory; assumes the script is run from the exports directory
4
+ cd ..
5
+
6
+ # Fetch package name and version directly from package.json
7
+ version=$( npm pkg get version | tr -d ' "' )
8
+ name=$( npm pkg get name | tr -d ' "' )
9
+
10
+ # Sanitize package name for use in filename
11
+ sanitizedName=$( echo " $name " | sed ' s/@//;s/\//-/' )
12
+
13
+ # Define output filename base, saving archives in the exports directory
14
+ outputFilename=" exports/${sanitizedName} -${version} "
15
+
16
+ # Create .tar.gz archive
17
+ tar --exclude=' node_modules' \
18
+ --exclude=' .git' \
19
+ --exclude=' exports' \
20
+ --exclude=' .expo' \
21
+ --exclude=' .vscode' \
22
+ --exclude=' temp' \
23
+ --exclude=' .yarn/cache' \
24
+ --exclude=' .yarn/install-state.gz' \
25
+ --exclude=' *.zip' \
26
+ --exclude=' *.tar.gz' \
27
+ -cvzf " ${outputFilename} .tar.gz" .
28
+
29
+ # Create .zip archive
30
+ zip -r " ${outputFilename} .zip" . \
31
+ -x ' *node_modules*' \
32
+ -x ' *.expo*' \
33
+ -x ' .vscode' \
34
+ -x ' *.git*' \
35
+ -x ' exports/*' \
36
+ -x ' temp/*' \
37
+ -x ' .yarn/cache/*' \
38
+ -x ' .yarn/install-state.gz' \
39
+ -x ' *.zip' \
40
+ -x ' *.tar.gz'
You can’t perform that action at this time.
0 commit comments