Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-version.sh changing all files #21

Open
blockonomics opened this issue Apr 7, 2017 · 3 comments
Open

update-version.sh changing all files #21

blockonomics opened this issue Apr 7, 2017 · 3 comments

Comments

@blockonomics
Copy link

  • I tried update version and it incorrectly matched and replace 1.2 in all files, even in javascript files
  • I think it should only replace in README and main php file
@sudar
Copy link
Owner

sudar commented Apr 17, 2017

I agree.

Internally I am using a blacklist of files to avoid

ack --ignore-file=is:HISTORY.md --ignore-dir=languages

But I think instead we should only give a whiltelist of files to modify.

@shivaenigma
Copy link
Contributor

shivaenigma commented Oct 26, 2017

Is there really a use case of having version in files other main php and README files ? We need to match patterns likes Version: or Stable Tag: . Search and replace is dangerous, no matter how many files we exclude.

It would be really good if everything happened in one command:

~/wp-plugin-in-github/deploy-plugin.sh -m main_phpfile new_version

If new_version is specified

  • Updates main php file and readme files with new version
  • Deploy

else

  • Deploy

@sudar
Copy link
Owner

sudar commented Nov 2, 2017

Is there really a use case of having version in files other main php and README files

One use case is that I include the version of the plugin in a constant. Other plugin authors also include the version as query string in wp_enqueue_scripts/styles functions.

Search and replace is dangerous, no matter how many files we exclude.

I agree. That's why I do a git diff at the end of find/replace to show what are the files/lines that got modified.

It would be really good if everything happened in one command:

I don't want to force people to use update-version.sh to update their versions, that's why I made it as a seperate script.

Also I use this script in my non-WordPress projects as well and would prefer to keep it as a seperate script instead of merging it with deploy-plugin.sh.

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

No branches or pull requests

3 participants