<commit_before>﻿using Microsoft.Build.Utilities;

namespace MasterDevs.CoolWhip
{
    public class Whippet : Task
    {
        public override bool Execute()
        {
            Log.LogMessage("I ran a task today and it was liberating");
            //Log.LogError("Fail");
            return true;
        }
    }
}<commit_msg>Implemented very basic Whippet task.<commit_after>﻿using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System.IO;

namespace MasterDevs.CoolWhip
{
    public class Whippet : Task
    {
        [Required]
        public string Version { get; set; }

        [Required]
        public string TempAssemblyFile { get; set; }

        public override bool Execute()
        {
            File.WriteAllText(TempAssemblyFile, GetAssemblyVersion());
            
            return true;
        }           

        private string GetAssemblyVersion()
        {
            return string.Format(@"[assembly: AssemblyVersion(""{0}"")]", Version ?? "0.0.0.0");
        }   
    }
}
{'fraction_non_alphanumeric': 0.1025390625, 'fraction_numerical': 0.0048828125, 'mean_word_length': 2.023598820058997, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2366389', 'n_tokens_mistral': 279, 'n_tokens_neox': 273, 'n_words': 68}