Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.

Build automation #2

Closed
silverwind opened this issue Dec 14, 2015 · 7 comments
Closed

Build automation #2

silverwind opened this issue Dec 14, 2015 · 7 comments

Comments

@silverwind
Copy link
Member

Ideally, I'd like to run make patch and have it (in addition to git tag and package.json) bump this version here too:

I'm thinking sed might be the way to go, but it won't be compatible with Windows of course.

@Mottie
Copy link
Member

Mottie commented Dec 16, 2015

I think we can make a grunt build use it to do a string replace:

grunt major // increase major #
grunt minor // increase minor #
grunt patch // increase patch #

@silverwind
Copy link
Member Author

I've been recently moving my projects off Grunt because of grunt-shell bugs and the complexity of the Gruntfile, so I think I'll keep the Makefile and do a simple sed to bump the version in the script.

I know this isn't really compatibly with Windows, but I can do all releasing I guess :)

@Mottie
Copy link
Member

Mottie commented Dec 16, 2015

I have no idea how to create/use/modify a Makefile 😞

What about using Gulp? or npm?

@silverwind
Copy link
Member Author

A Makefile is just a list of tasks in the form of shell-commands that can be triggered through the make <task> command. It's simple, fast and quite powerful. I'm not sure what's the best way to get make on Windows is. Personally, I'd just install Cygwin ;)

Also, great intro to make here: https://gist.github.com/isaacs/62a2d1825d04437c6f08

npm would work for simple shell commands, but I find it very messy if you want to create tasks that depend on others. Not sure about gulp, like Grunt, it's a layer of complexity I'd like to avoid.

@silverwind silverwind changed the title Find a tool to bump version in the script Build automation Dec 17, 2015
@silverwind
Copy link
Member Author

Another idea: Greasemonkey supports a script.meta.js file for update checks which only contains the metadata block, making update checks safe some traffic. I'll think about a way to extract the metadata block from the script for that purpose.

@Mottie
Copy link
Member

Mottie commented Mar 5, 2016

Check out this answer on Stackoverflow about using Powershell in Windows:

get-content somefile.txt | %{$_ -replace "expression","replace"}

@silverwind
Copy link
Member Author

This is resolved with introduction of ver.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants