Sha256: 4fae2b4acbc0da119df0346d690c0264cfe100a74369920292f5646be792c35b

Contents?: true

Size: 1.9 KB

Versions: 13

Compression:

Stored size: 1.9 KB

Contents

# frozen_string_literal: true
require "digest"
require "rake/clean"
#require "sqlite3"

# Register the at_exit hook for cleanup
at_exit do
  puts "Performing cleanup for Makit..."
  # Add your cleanup code here
  # For example, close files, remove temporary files, etc.
  # store current state of Makit::PROJECT to a file
  #json_filename = File.join(Makit::Directories::PROJECT_ROOT, ".makit.project.json")
  #puts "Saving project state to #{json_filename}"
  #Makit::PROJECT.save_as(json_filename)
  #yml_filename = File.join(Makit::Directories::PROJECT_ROOT, ".makit.project.yml")
  #puts "Saving project state to #{yml_filename}"
  # Makit::PROJECT.save_as(yml_filename)
end

# This module provides classes for the Makit gem.
module Makit
  # This class provide methods for managing persistent data for the makit gem
  class Tasks
    def self.run_default_commands(task_name)
      Makit::LOGGER.debug("Running default commands for task: #{task_name}")
    end
  end
end

desc "Remove any temporary products."
task :clean do
  puts ":clean".colorize(:blue)
  Makit::RUNNER.run(Makit::RUNNER.parse_command_request("git clean -dXf"))
end

desc "Integrate changes into the git repository."
task :integrate do
  puts ":integrate".colorize(:blue)
  Makit::Git.integrate
end

desc "Sync changes with the git repository."
task :sync do
  puts ":sync".colorize(:blue)
  Makit::Git.sync
end

desc "Format source code."
task :format do
  puts ":format".colorize(:blue)
  Makit::RUNNER.try("rufo .") if File.exist?("Gemfile") || File.exist?("Rakefile")
end

desc "Update dependencies."
task :update do
  puts ":update".colorize(:blue)
  system("bundle update") if File.exist?("Gemfile")
  # glob all *.csproj files
  Dir.glob("**/*.csproj").each do |file|
    "dotnet format #{file}".run
  end
end

# Register the at_exit hook for cleanup
at_exit do
  puts "at_exit in tasks.rb...."
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
makit-0.0.21 lib/makit/tasks.rb
makit-0.0.20 lib/makit/tasks.rb
makit-0.0.19 lib/makit/tasks.rb
makit-0.0.16 lib/makit/tasks.rb
makit-0.0.13 lib/makit/tasks.rb
makit-0.0.12 lib/makit/tasks.rb
makit-0.0.11 lib/makit/tasks.rb
makit-0.0.10 lib/makit/tasks.rb
makit-0.0.9 lib/makit/tasks.rb
makit-0.0.8 lib/makit/tasks.rb
makit-0.0.7 lib/makit/tasks.rb
makit-0.0.6 lib/makit/tasks.rb
makit-0.0.1 lib/makit/tasks.rb