Skip to content

Commit

Permalink
Merge pull request #174 from OpenSprinkler/feature/add-manual-deploym…
Browse files Browse the repository at this point in the history
…ent-for-beta-prod

Add manual deployment for beta and prod environments
  • Loading branch information
salbahra authored Nov 26, 2024
2 parents 5fd1562 + 7f9470d commit 8c990d8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/firebase-hosting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ on:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
environment:
description: 'Choose an environment to deploy'
required: true
default: 'dev'
type: choice
options:
- dev
- beta
- prod

permissions:
checks: write
Expand Down Expand Up @@ -42,5 +53,10 @@ jobs:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_OPENSPRINKLER_UI }}
projectId: opensprinkler-ui
target: opensprinkler-devui
target: ${{
github.event_name == 'workflow_dispatch' && (
github.event.inputs.environment == 'prod' && 'opensprinkler-ui' ||
github.event.inputs.environment == 'beta' && 'opensprinkler-betaui' ||
'opensprinkler-devui'
) || 'opensprinkler-devui' }}
channelId: ${{ github.event_name == 'push' && 'live' || '' }}
6 changes: 3 additions & 3 deletions www/js/modules/programs.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ OSApp.Programs.submitProgram21 = function( id, ignoreWarning ) {
days[ 1 ] = parseInt( $( "#every-" + id ).val(), 10 );

if ( !( days[ 1 ] >= minIntervalDays && days[ 1 ] <= 128 ) ) {
OSApp.Errors.showError( OSApp.Language._( "Error: Interval days must be between " + minIntervalDays + " and 128." ) );
OSApp.Errors.showError( OSApp.Language._( "Error: Interval days must be between") + " " + minIntervalDays + " " + OSApp.Language._( "and 128." ) );
return;
}

Expand Down Expand Up @@ -977,7 +977,7 @@ OSApp.Programs.submitProgram21 = function( id, ignoreWarning ) {
var totalruntime = OSApp.Groups.calculateTotalRunningTime( runTimes );
var repeatinterval = start[ 2 ] * 60;
if ( totalruntime > repeatinterval ) {
OSApp.UIDom.areYouSure( OSApp.Language._( "Warning: The repeat interval (" + repeatinterval + " sec) is less than the program run time (" + totalruntime + " sec)." ), OSApp.Language._( "Do you want to continue?" ), function() {
OSApp.UIDom.areYouSure( OSApp.Language._( "Warning: The repeat interval" ) + " (" + repeatinterval + " " + OSApp.Language._( "sec" ) + ") " + OSApp.Language._( "is less than the program run time" ) + " ( " + totalruntime + " " + OSApp.Language._( "sec" ) +").", OSApp.Language._( "Do you want to continue?" ), function() {
OSApp.Programs.submitProgram21( id, true );
} );
return;
Expand Down Expand Up @@ -1040,7 +1040,7 @@ OSApp.Programs.expandProgram = function( program ) {
program.find( "[id^='run-']" ).on( "click", function() {
var name = OSApp.Firmware.checkOSVersion( 210 ) ? OSApp.currentSession.controller.programs.pd[ id ][ 5 ] : "Program " + id;

OSApp.UIDom.areYouSure( OSApp.Language._( "Are you sure you want to start " + name + " now?" ), "", function() {
OSApp.UIDom.areYouSure( OSApp.Language._( "Are you sure you want to start" ) + " " + name + " " + OSApp.Language._( "now?" ), "", function() {
var runonce = [],
finish = function() {
runonce.push( 0 );
Expand Down
2 changes: 1 addition & 1 deletion www/js/modules/ui-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -3583,7 +3583,7 @@ OSApp.UIDom.launchApp = function() {
"</li>" +
"</ul>" +
"<p class='smaller'>" +
OSApp.Language._( "App Version" ) + ": 2.4.6" + // FIXME: This needs to be pulled from package.json automatcally (or replaced during build/deploy!!) mellodev
OSApp.Language._( "App Version" ) + ": 2.4.7" + // FIXME: This needs to be pulled from package.json automatcally (or replaced during build/deploy!!) mellodev
"<br>" + OSApp.Language._( "Firmware" ) + ": <span class='firmware'></span>" +
"<br><span class='hardwareLabel'>" + OSApp.Language._( "Hardware Version" ) + ":</span> <span class='hardware'></span>" +
"</p>" +
Expand Down

0 comments on commit 8c990d8

Please sign in to comment.