Terrestrial gamma-ray flash production by lightning current pulses