Rename nightly to staging and have it point to dev infra (#7422)
* Rename nightly to staging and have it point to dev infra
Fixes #7421
* To revert: force IS_STAGING
* chmod +x ./scripts/flip-files-to-staging.sh
* Fix mix up dev and prod
* Revert "To revert: force IS_STAGING"
This reverts commit 0178604a55.
			
			
This commit is contained in:
		@ -1,20 +0,0 @@
 | 
			
		||||
$VERSION=$(Get-Date -Format "yy.M.d")
 | 
			
		||||
$COMMIT=$(git rev-parse --short HEAD)
 | 
			
		||||
$PRODUCT_NAME="Zoo Design Studio (Nightly)"
 | 
			
		||||
 | 
			
		||||
# package.json
 | 
			
		||||
yq -i '.version = env(VERSION)' -p=json -o=json package.json
 | 
			
		||||
yq -i '.productName = env(PRODUCT_NAME)' -p=json -o=json package.json
 | 
			
		||||
yq -i '.name = "zoo-modeling-app-nightly"' -p=json -o=json package.json
 | 
			
		||||
 | 
			
		||||
# electron-builder.yml
 | 
			
		||||
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/nightly"' electron-builder.yml
 | 
			
		||||
yq -i '.appId = "dev.zoo.modeling-app-nightly"' electron-builder.yml
 | 
			
		||||
yq -i '.nsis.include = "./scripts/installer-nightly.nsh"' electron-builder.yml
 | 
			
		||||
 | 
			
		||||
# Release notes
 | 
			
		||||
echo "Nightly build $VERSION (commit $COMMIT)" > release-notes.md
 | 
			
		||||
 | 
			
		||||
# icons
 | 
			
		||||
cp assets/icon-nightly.png assets/icon.png
 | 
			
		||||
cp assets/icon-nightly.ico assets/icon.ico
 | 
			
		||||
@ -1,20 +0,0 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
COMMIT=$(git rev-parse --short HEAD)
 | 
			
		||||
TITLE=$(git show -s --format=%s $COMMIT)
 | 
			
		||||
 | 
			
		||||
# package.json
 | 
			
		||||
PACKAGE=$(jq '.productName="Zoo Design Studio (Nightly)" | .name="zoo-modeling-app-nightly"' package.json --indent 2)
 | 
			
		||||
echo "$PACKAGE" > package.json
 | 
			
		||||
 | 
			
		||||
# electron-builder.yml
 | 
			
		||||
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/nightly"' electron-builder.yml
 | 
			
		||||
yq -i '.appId = "dev.zoo.modeling-app-nightly"' electron-builder.yml
 | 
			
		||||
yq -i '.nsis.include = "./scripts/installer-nightly.nsh"' electron-builder.yml
 | 
			
		||||
 | 
			
		||||
# Release notes
 | 
			
		||||
echo "[$TITLE](https://github.com/KittyCAD/modeling-app/commit/$COMMIT)" > release-notes.md
 | 
			
		||||
 | 
			
		||||
# icons
 | 
			
		||||
cp assets/icon-nightly.png assets/icon.png
 | 
			
		||||
cp assets/icon-nightly.ico assets/icon.ico
 | 
			
		||||
							
								
								
									
										20
									
								
								scripts/flip-files-to-staging.ps1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								scripts/flip-files-to-staging.ps1
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
$VERSION=$(Get-Date -Format "yy.M.d")
 | 
			
		||||
$COMMIT=$(git rev-parse --short HEAD)
 | 
			
		||||
$PRODUCT_NAME="Zoo Design Studio (Staging)"
 | 
			
		||||
 | 
			
		||||
# package.json
 | 
			
		||||
yq -i '.version = env(VERSION)' -p=json -o=json package.json
 | 
			
		||||
yq -i '.productName = env(PRODUCT_NAME)' -p=json -o=json package.json
 | 
			
		||||
yq -i '.name = "zoo-modeling-app-staging"' -p=json -o=json package.json
 | 
			
		||||
 | 
			
		||||
# electron-builder.yml
 | 
			
		||||
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/staging"' electron-builder.yml
 | 
			
		||||
yq -i '.appId = "dev.zoo.modeling-app-staging"' electron-builder.yml
 | 
			
		||||
yq -i '.nsis.include = "./scripts/installer-staging.nsh"' electron-builder.yml
 | 
			
		||||
 | 
			
		||||
# Release notes
 | 
			
		||||
echo "Staging build $VERSION (commit $COMMIT)" > release-notes.md
 | 
			
		||||
 | 
			
		||||
# icons
 | 
			
		||||
cp assets/icon-staging.png assets/icon.png
 | 
			
		||||
cp assets/icon-staging.ico assets/icon.ico
 | 
			
		||||
							
								
								
									
										20
									
								
								scripts/flip-files-to-staging.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								scripts/flip-files-to-staging.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
COMMIT=$(git rev-parse --short HEAD)
 | 
			
		||||
TITLE=$(git show -s --format=%s $COMMIT)
 | 
			
		||||
 | 
			
		||||
# package.json
 | 
			
		||||
PACKAGE=$(jq '.productName="Zoo Design Studio (Staging)" | .name="zoo-modeling-app-staging"' package.json --indent 2)
 | 
			
		||||
echo "$PACKAGE" > package.json
 | 
			
		||||
 | 
			
		||||
# electron-builder.yml
 | 
			
		||||
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/staging"' electron-builder.yml
 | 
			
		||||
yq -i '.appId = "dev.zoo.modeling-app-staging"' electron-builder.yml
 | 
			
		||||
yq -i '.nsis.include = "./scripts/installer-staging.nsh"' electron-builder.yml
 | 
			
		||||
 | 
			
		||||
# Release notes
 | 
			
		||||
echo "[$TITLE](https://github.com/KittyCAD/modeling-app/commit/$COMMIT)" > release-notes.md
 | 
			
		||||
 | 
			
		||||
# icons
 | 
			
		||||
cp assets/icon-staging.png assets/icon.png
 | 
			
		||||
cp assets/icon-staging.ico assets/icon.ico
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
!macro preInit
 | 
			
		||||
	SetRegView 64
 | 
			
		||||
	WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)"
 | 
			
		||||
	WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)"
 | 
			
		||||
	WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
 | 
			
		||||
	WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
 | 
			
		||||
	SetRegView 32
 | 
			
		||||
	WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)"
 | 
			
		||||
	WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)"
 | 
			
		||||
	WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
 | 
			
		||||
	WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
 | 
			
		||||
!macroend
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
base_dir="/releases/modeling-app"
 | 
			
		||||
if [[ $1 = "--nightly" ]]; then
 | 
			
		||||
    base_dir="/releases/modeling-app/nightly"
 | 
			
		||||
if [[ $1 = "--staging" ]]; then
 | 
			
		||||
    base_dir="/releases/modeling-app/staging"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "Invalidating json and yml files at $base_dir in the download bucket"
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user