22
33has_error=0
44isSupported=0
5- installerTypeDefaultValue=" DEVELOPMENT" ;
5+ installerTypeDefaultValue=" DEVELOPMENT"
6+ nucleusIdDefaultValue=" 0.0.0"
67entitlementsOriginalFileName=" entitlements.mac.plist"
78entitlementsBackupFileName=" backup-entitlements.mac.plist"
89# Folders
@@ -30,11 +31,15 @@ CURRENT_OS=$( uname )
3031if [ " $CURRENT_OS " = " Linux" ]; then
3132 echo " OS: Linux" ;
3233 isSupported=1;
34+ # Load environment variables
35+ source ./.env
3336 # Update package.json
3437 linuxInstallerType=$( cat ./installerResources/installerTypes.json | json " linux.installer" )
3538 json -I -f ./package.json -e " this.criptextInstallerType=\" ${linuxInstallerType} \" " -q
39+ json -I -f ./package.json -e " this.nucleusId=\" ${PROD_NUCLEUS_ID} \" " -q
3640 printf " Updated package.json \n" ;
37- printf " -> Installer-type: ${linuxInstallerType} \n" ;
41+ printf " -> Installer-type: ${linuxInstallerType} \n" ;
42+ printf " -> Nucleus Id : ${PROD_NUCLEUS_ID} \n" ;
3843 echo " Executing: yarn build" ;
3944 yarn build > /dev/null;
4045 # Move to subfolder
@@ -55,9 +60,11 @@ elif [ "$CURRENT_OS" = "Darwin" ]; then
5560 # Update package.json
5661 macStoreType=$( cat ./installerResources/installerTypes.json | json " mac.store" )
5762 json -I -f ./package.json -e " this.criptextInstallerType=\" ${macStoreType} \" " -q
63+ json -I -f ./package.json -e " this.nucleusId=\" ${PROD_NUCLEUS_ID} \" " -q
5864 json -I -f ./package.json -e ' this.build.mac.target=["mas"]' -q
5965 printf " Updated package.json \n" ;
6066 printf " -> Installer-type: ${macStoreType} \n" ;
67+ printf " -> Nucleus Id : ${PROD_NUCLEUS_ID} \n" ;
6168 printf " -> Current target: MAS \n" ;
6269 # Building
6370 printf " Executing: yarn build \n" ;
@@ -77,6 +84,7 @@ elif [ "$CURRENT_OS" = "Darwin" ]; then
7784 json -I -f ./package.json -e ' this.build.mac.target=["dmg", "zip"]' -q
7885 printf " \n Updated package.json \n" ;
7986 printf " -> Installer-type: ${macInstallerType} \n" ;
87+ printf " -> Nucleus Id : ${PROD_NUCLEUS_ID} \n" ;
8088 printf " -> Current target: DMG & ZIP \n" ;
8189 mv " build/${entitlementsOriginalFileName} " " build/${entitlementsBackupFileName} " ;
8290 printf " Renamed [${entitlementsOriginalFileName} ] to [${entitlementsBackupFileName} ] \n" ;
@@ -107,9 +115,11 @@ else
107115 # Update package.json
108116 windowsInstallerType=$( cat ./installerResources/installerTypes.json | json " windows.installer" )
109117 json -I -f ./package.json -e " this.criptextInstallerType=\" ${windowsInstallerType} \" " -q
118+ json -I -f ./package.json -e " this.nucleusId=\" ${PROD_NUCLEUS_ID} \" " -q
110119 json -I -f ./package.json -e ' this.build.win.target=["nsis"]' -q
111120 printf " Updated package.json \n" ;
112121 printf " -> Installer-type: ${windowsInstallerType} \n" ;
122+ printf " -> Nucleus Id : ${PROD_NUCLEUS_ID} \n" ;
113123 printf " -> Current target: Nsis \n" ;
114124 # Building
115125 printf " Executing: yarn build" ;
133143 json -I -f ./package.json -e " this.build.appx.publisher=\" ${WIN_STORE_DEVELOPER_ID} \" " -q
134144 printf " \n Updated package.json \n" ;
135145 printf " -> Installer-type: ${windowsStoreType} \n" ;
146+ printf " -> Nucleus Id : ${PROD_NUCLEUS_ID} \n" ;
136147 printf " -> Current target: AppX \n" ;
137- printf " -> Publisher: ${WIN_STORE_DEVELOPER_ID} \n" ;
148+ printf " -> Publisher : ${WIN_STORE_DEVELOPER_ID} \n" ;
138149 # Building
139150 printf " Executing: yarn build" ;
140151 yarn build > /dev/null;
152163fi
153164
154165
155- # Set default criptextInstallerType
166+ # Set default criptextInstallerType & Nucleus Id
156167json -I -f ./package.json -e " this.criptextInstallerType=\" ${installerTypeDefaultValue} \" " -q
168+ json -I -f ./package.json -e " this.nucleusId=\" ${nucleusIdDefaultValue} \" " -q
157169# Remove modified package.json
158170rm -f ./package.json
159171# Restore original package.json
0 commit comments