What helped me in the past was to write down a single thing that I want to add the next time I feel motivated again and then spend the whole evening focussed on shipping that particular thing. Because I always feel motivated and focussed I can keep my attention span up for several months, previously I would totally get bored after a couple of days.