Help to setup dev, test and prod environments

Hi community
I’m trying to setup 3 environments: dev, test and prod.
For each environment, I need a distinct extension in order to open them simultaneously.
I’ve encountered several issues along the way but the biggest one is file name.

require 'sketchup.rb'
require 'extensions.rb'

module Form3d
  module Extension
    unless file_loaded?(__FILE__)
      ex = SketchupExtension.new('FORM3D', 'form3d/main')
      ex.description = 'Generate 3d models of furnitures with AI.'
      ex.version     = '0.1.0'
      ex.copyright   = 'FORM3D ©'
      ex.creator     = 'FORM3D'
      Sketchup.register_extension(ex, true)
      file_loaded(__FILE__)
    end
  end
end

The only way I’ve been able to have 2 distinct extension is to rename “form3d/main” (and the related file) to something else.

Do you have some ideas about how I could create 3 environments/extensions?

Explain what you think should be different in behavior between these three “modes”?


I will submit that it makes no sense to me to test anything other than the production release mode, because this is how it will act for end users.

The only thing I have differently for dev mode is a reload method, but this can be made easier perhaps by using a development manager like the one ThomThom published:

ThomThom: Extension Sources | SketchUp Extension Warehouse

Hi Dan,
Thank you for your reply!

Here are the difference in usage:

  • dev: local development
  • test (or alpha): last version released to test users (unstable version)
  • production: last stable version

Oh, I see, different versions. I would have them in separate dev folders and use ThomThom’s source switcher (linked above) to control which version you are loading.

1 Like

Thanks a lot for your help @DanRathbun!

1 Like