Skip to content

Commit

Permalink
submission
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhvath28 committed Sep 3, 2024
1 parent e91433f commit 2f29d56
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 30 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
/bin/
/.shards/
*.dwarf
<<<<<<< HEAD
=======
/result
>>>>>>> 277d7e7 (Removed old commits)
/result
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ build: clean

.PHONY: check
check: $(BINARY)
<<<<<<< HEAD
@crystal spec
=======
@crystal spec --tag ~online
>>>>>>> 7379be7 (GSOC 2024 Submission)

.PHONY: clean
clean:
@rm -f $(BINARY)

.PHONY: run
run: $(BINARY)
$(BINARY)
$(BINARY)
Binary file removed crystal2nix
Binary file not shown.
5 changes: 1 addition & 4 deletions shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ shards:

version_from_shard:
git: https://github.com/hugopl/version_from_shard.git
<<<<<<< HEAD
version: 1.2.5
=======
version: 1.2.5
>>>>>>> 277d7e7 (Removed old commits)

12 changes: 2 additions & 10 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,10 @@ dependencies:
version_from_shard:
github: hugopl/version_from_shard
version: ~> 1.2.4



carbon_smtp_adapter:
hg: https://hg.sr.ht/~peterhoeg/dummy
version: ~> 0.1.1

development_dependencies:
spectator:
gitlab: arctic-fox/spectator
<<<<<<< HEAD
version: ~> 0.10.5

=======
version: ~> 0.10.5
>>>>>>> 277d7e7 (Removed old commits)
version: ~> 0.10.5
3 changes: 0 additions & 3 deletions shards.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<<<<<<< HEAD
=======
{
spectator = {
url = "https://gitlab.com/arctic-fox/spectator.git";
Expand All @@ -12,4 +10,3 @@
sha256 = "0xizj0q4rd541rwjbx04cjifc2gfx4l5v6q2y7gmd0ndjmkgb8ik";
};
}
>>>>>>> 277d7e7 (Removed old commits)
7 changes: 3 additions & 4 deletions src/worker.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Crystal2Nix
end

def run
temp_file_path = "#{SHARDS_NIX}.tmp"
temp_file_path = File.tempfile("shards").path

File.open temp_file_path, "w+" do |file|
file.puts %({)
Expand Down Expand Up @@ -66,7 +66,7 @@ module Crystal2Nix
end

else
log_message "Unsupported repository type for '#{key}': #{repo.type}. Currently supported types are: git, hg. ."
log_message "Unsupported repository type for '#{key}': #{repo.type}. Currently supported types are: git, hg."
break
end

Expand All @@ -79,7 +79,6 @@ module Crystal2Nix
file.puts %(})
end

# Check the instance variable @errors instead of the local errors array
if @errors.any?
File.delete(temp_file_path)
STDERR.puts "\nSummary of errors encountered:"
Expand All @@ -89,7 +88,7 @@ module Crystal2Nix
end

File.rename(temp_file_path, SHARDS_NIX)
puts "Processing completed successfully with no errors."
puts "Processing completed successfully."
end
end
end

0 comments on commit 2f29d56

Please sign in to comment.