Skip to content

Fix annoying git fatal message #44

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

Merged
merged 1 commit into from
Apr 1, 2022
Merged

Fix annoying git fatal message #44

merged 1 commit into from
Apr 1, 2022

Conversation

keremet
Copy link
Contributor

@keremet keremet commented Apr 1, 2022

No description provided.

Makefile Outdated
@@ -28,11 +28,9 @@ $(EXTENSION)--$(EXTVERSION).sql: setup.sql
cat $^ > $@

# Prepare the package for PGXN submission
DISTVERSION := $(shell git tag -l | tail -n 1 | cut -d 'v' -f 2)
package: dist dist/$(EXTENSION)-$(DISTVERSION).zip
DISTVERSION = `git tag -l | tail -n 1 | cut -d 'v' -f 2`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC The git fatal message is only avoided by the backslashes, but technically it's still executed.

I think it would be cleaner to remove it here and instead add something like that in the package rule (with some extra output to validate the content):

package: dist .git
+ 	$(eval DISTVERSION := $(shell git tag -l | tail -n 1 | cut -d 'v' -f 2))
+ 	$(info Generation zip file for version $(DISTVERSION)...)
	git archive --format zip --prefix=$(EXTENSION)-${DISTVERSION}/ --output [...]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I force-pushed the modifications you suggested. Is the commit ok now?

Copy link
Contributor

@rjuju rjuju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that I wrote "Generation" instead of "Generating", but other than that it looks good to me.

@keremet keremet merged commit f4a87c5 into master Apr 1, 2022
@shinderuk shinderuk deleted the issue-32_2 branch September 1, 2022 10:22
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

Successfully merging this pull request may close these issues.

2 participants