Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 40 additions & 37 deletions bin/update_javadocs
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,48 @@
require 'tmpdir'

MODULES = {
"onebusaway-gtfs-modules" => (->{ build_gtfs_modules })
# "onebusaway-gtfs-modules" => (->{ build_gtfs_modules })
}

def build_gtfs_modules
repo_url = 'https://github.com/OneBusAway/onebusaway-gtfs-modules.git'
temp_dir = Dir.mktmpdir

begin
# Clone the repository into the temporary directory
system("git clone --single-branch --branch gh-pages #{repo_url} #{temp_dir}")

if $?.success?
puts "Repository cloned into temporary directory: #{temp_dir}"
else
puts "Failed to clone repository."
exit
end

archive_path = Dir.chdir(temp_dir) do |path|
archive_command = "git archive --format=zip -o gh-pages.zip HEAD"
system(archive_command)

archive_path = File.join(temp_dir, 'gh-pages.zip')

if $?.success?
puts "Archive created successfully: #{archive_path}"
else
puts "Failed to create archive."
exit
end
archive_path
end

system("unzip -o #{archive_path} -d ./src/modules/onebusaway-gtfs-modules/current")
ensure
# Clean up the temporary directory
FileUtils.remove_entry(temp_dir)
end
end
# n.b. January 2025 - this repo is no longer generating docs via Maven, but it's kept
# here as an example of how to clone a repo and extract a specific directory from it.

# def build_gtfs_modules
# repo_url = 'https://github.com/OneBusAway/onebusaway-gtfs-modules.git'
# temp_dir = Dir.mktmpdir

# begin
# # Clone the repository into the temporary directory
# system("git clone --single-branch --branch gh-pages #{repo_url} #{temp_dir}")

# if $?.success?
# puts "Repository cloned into temporary directory: #{temp_dir}"
# else
# puts "Failed to clone repository."
# exit
# end

# archive_path = Dir.chdir(temp_dir) do |path|
# archive_command = "git archive --format=zip -o gh-pages.zip HEAD"
# system(archive_command)

# archive_path = File.join(temp_dir, 'gh-pages.zip')

# if $?.success?
# puts "Archive created successfully: #{archive_path}"
# else
# puts "Failed to create archive."
# exit
# end
# archive_path
# end

# system("unzip -o #{archive_path} -d ./src/modules/onebusaway-gtfs-modules/current")
# ensure
# # Clean up the temporary directory
# FileUtils.remove_entry(temp_dir)
# end
# end

mod = ARGV[0]&.strip
lam = MODULES[mod]
Expand Down
4 changes: 2 additions & 2 deletions src/_partials/_navbar.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
)) %>

<%= render(NavigationSection.new(
"Javadocs",
"Projects",
children: {
"onebusaway-gtfs-modules" => '/modules/onebusaway-gtfs-modules/current/'
"onebusaway-gtfs-modules" => '/projects/onebusaway-gtfs-modules'
},
current_path: resource.relative_url
)) %>
Expand Down
116 changes: 0 additions & 116 deletions src/modules/onebusaway-gtfs-modules/current/ci-management.html

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions src/modules/onebusaway-gtfs-modules/current/css/print.css

This file was deleted.

1 change: 0 additions & 1 deletion src/modules/onebusaway-gtfs-modules/current/css/site.css

This file was deleted.

Loading
Loading