From b5c39d786f35a5ff05ca1265b843b28318213b6e Mon Sep 17 00:00:00 2001 From: Felix Frank Date: Tue, 3 Dec 2024 09:59:02 +0100 Subject: [PATCH] Use scene-viewer 1.0 instead of 1.2. --- .github/workflows/publish-beta.yml | 27 +++++++++++++++++++++------ src/ar/AR.ts | 2 +- src/dive.ts | 8 ++++++-- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index 89c5c1ab..1e45a3a1 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -101,21 +101,36 @@ jobs: git config user.name "GitHub Actions" git config user.email "actions@github.com" - - name: Bump version to beta + - name: Check existing beta versions + id: beta-branch-check run: | - npm version prerelease --preid=beta --no-git-tag-version + current_version=$(node -p "require('./package.json').version") + prefix="beta/v$current_version-beta" + last_beta=$(git tag | grep "^${prefix}" | sort -V | tail -n 1) + if [ -z "$last_beta" ]; then + next_beta="${prefix}.1" + else + beta_number=$(echo $last_beta | awk -F '.' '{print $NF}') + next_beta="${prefix}.$((beta_number + 1))" + fi + echo "next_beta=$next_beta" >> $GITHUB_ENV + + - name: Bump to next beta version + run: | + new_version=$(echo $next_beta | sed 's|beta/v||') + npm version $new_version --no-git-tag-version git add package.json + - name: Create beta branch + run: | + git checkout -b ${{ env.next_beta }} + - name: Build DIVE run: yarn build - name: Add build files run: git add ./build -f - - name: 'Create beta branch' - run: - git checkout -b beta/v$(node -p "require('./package.json').version") - - name: Commit changes run: | git commit -m "Beta v$(node -p "require('./package.json').version")" diff --git a/src/ar/AR.ts b/src/ar/AR.ts index cbb066b7..18a62221 100644 --- a/src/ar/AR.ts +++ b/src/ar/AR.ts @@ -110,7 +110,7 @@ export class DIVEAR { encodeURIComponent(modelUrl.toString()), ); - const intent = `intent://arvr.google.com/scene-viewer/1.2?${ + const intent = `intent://arvr.google.com/scene-viewer/1.0?${ params.toString() + '&file=' + modelUrl.toString() }#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent( locationUrl.toString(), diff --git a/src/dive.ts b/src/dive.ts index abef9d20..b88cc5f5 100644 --- a/src/dive.ts +++ b/src/dive.ts @@ -292,13 +292,17 @@ export default class DIVE { }, }; + console.log(`DIVE ${pkgjson.version} initialized successfully!`); + if (process.env.DIVE_NODE_ENV === 'development') { + console.log('DIVE is running in development mode.'); + } console.log(` @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@+-:::::::---------------------==------------------------------=#@@@@ @@%=::::.......::---------------------------------------------------------+@@ @@+:::...........::-----------------------------------------------------------#@@ - @@=:::.........::::::--------------${' DIVE ' + pkgjson.version.padStart(7, ' ') + ' '}---------------------------------%@ - @%:::.......:::::::-------------------${process.env.DIVE_NODE_ENV === 'development' ? ' DEV MODE ' : '--------------'}------------------------------------#@ + @@=:::.........::::::-------------------------------------------------------------%@ + @%:::.......:::::::-----------------------------------------------------------------#@ @*:::.....:::::-----------------------------------------------------------------------*@ @%::::::.::::---------------------------------------------------------------------------@@ @@-:::::::::-----------------------------------------------------------------------------=@