Minor update which allows a custom Tcl script to be inserted in the
GDS import script when generating magic cells.  The script can then
take advantage of the "flatglob" option to flatten specific cells
on input, which can be used to work around database incompatibility
issues when importing GDS into magic.
diff --git a/VERSION b/VERSION
index 1f61f61..eab53e1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.99
+1.0.100
diff --git a/common/foundry_install.py b/common/foundry_install.py
index 731d07d..22d754d 100755
--- a/common/foundry_install.py
+++ b/common/foundry_install.py
@@ -120,6 +120,11 @@
 #	noconvert : Install only; do not attempt to convert to other
 #		    formats (applies only to GDS, CDL, and LEF).
 #
+#	options:   Followed by "=" and the name of a script.  Behavior
+#		    is dependent on the mode;  if applied to "-gds",
+#		    then the script is inserted before the GDS read
+#		    in the Tcl generate script passed to magic.
+#
 # NOTE:  This script can be called once for all libraries if all file
 # types (gds, cdl, lef, etc.) happen to all work with the same wildcards.
 # However, it is more likely that it will be called several times for the
@@ -1070,6 +1075,12 @@
                 if item.split('=')[0] == 'ignore':
                     ignorelist = item.split('=')[1].split(',')
 
+        elif option[0] == 'gds':
+            for item in option:
+                if item.split('=')[0] == 'options':
+                    tclscript = item.split('=')[1]
+                    print('Adding Tcl script options from file ' + tclscript)
+
 	# Option 'noconvert' is a standalone keyword.
         if 'noconvert' in option:
             if option[0] == 'cdl':
@@ -1221,6 +1232,10 @@
                 # .mag files from the database.
 
                 print('Creating magic generation script to generate magic database files.') 
+                if tclscript:
+                    with open(tclscript, 'r') as ifile:
+                        tcllines = ifile.read().splitlines()
+
                 with open(destlibdir + '/generate_magic.tcl', 'w') as ofile:
                     print('#!/usr/bin/env wish', file=ofile)
                     print('#--------------------------------------------', file=ofile)
@@ -1231,6 +1246,11 @@
                     print('gds rescale false', file=ofile)
                     print('tech unlock *', file=ofile)
 
+                    # Add custom Tcl script lines before "gds read".
+                    if tclscript:
+                        for line in tcllines:
+                            print(line, file=ofile)
+
                     for gdsfile in gdsfiles:
                         # Note:  DO NOT use a relative path here.
                         print('gds read ' + srclibdir + '/' + gdsfile, file=ofile)
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index c34d019..38d000f 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -483,6 +483,7 @@
 		-lib %l/latest/timing/*.lib \
 		-gds %l/latest/cells/*/*.gds compile-only \
 			sort=custom/scripts/sort_pdkfiles.py \
+			options=custom/scripts/sky130_fd_io_import.tcl \
 		-verilog %l/latest/cells/*/*.*.v \
 		-verilog %l/latest/cells/*/*.v exclude=*.*.v \
 			compile-only filter=custom/scripts/inc_verilog.py \
diff --git a/sky130/custom/scripts/sky130_fd_io_import.tcl b/sky130/custom/scripts/sky130_fd_io_import.tcl
new file mode 100644
index 0000000..cdff9de
--- /dev/null
+++ b/sky130/custom/scripts/sky130_fd_io_import.tcl
@@ -0,0 +1,6 @@
+# Special options passed to magic for GDS import of the I/O library cells.
+# This line flattens all the cells containing "__example_" in the name,
+# which includes all contacts and primitive devices.  This prevents the
+# primitive devices from being split across the hierarchy, which causes
+# magic to misinterpret the device type.
+gds flatglob *__example_*
diff --git a/sky130/magic/sky130.tech b/sky130/magic/sky130.tech
index b561940..de7b737 100644
--- a/sky130/magic/sky130.tech
+++ b/sky130/magic/sky130.tech
@@ -22,8 +22,8 @@
 
 version
  version REVISION
- description "SkyWater SKY130: BETA Vendor Open Source rules and DRC"
- requires magic-8.3.99
+ description "SkyWater SKY130: Open Source rules and DRC"
+ requires magic-8.3.107
 end
 
 #------------------------------------------------------------------------
@@ -31,6 +31,7 @@
 # First public release
 # Status 8/14/20: Rev 2 (alpha):
 # Started updating with new device/model naming convention
+# Status 1/3/21: Taking out of beta and declaring an official release.
 #------------------------------------------------------------------------
 
 #------------------------------------------------------------------------