]> git.sur5r.net Git - i3/i3/commitdiff
Deleting VERSION and extracting it from I3_VERSION instead (#2419)
authoreplanet <emeric.planet@gmail.com>
Sat, 13 Aug 2016 20:46:27 +0000 (22:46 +0200)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Sat, 13 Aug 2016 20:46:27 +0000 (13:46 -0700)
Makefile
VERSION [deleted file]
common.mk
release.sh

index d62db5d0166a0170e7d40612ea89d573440ad29a..c08f2777f61cfa46d48efa3d9b995671c04dc89f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,6 @@ install: $(INSTALL_TARGETS)
 
 store_git_version:
        echo -n ${I3_VERSION} > I3_VERSION
 
 store_git_version:
        echo -n ${I3_VERSION} > I3_VERSION
-       echo -n ${VERSION} > VERSION
 
 dist: distclean
        [ ! -d i3-${VERSION} ] || rm -rf i3-${VERSION}
 
 dist: distclean
        [ ! -d i3-${VERSION} ] || rm -rf i3-${VERSION}
@@ -53,7 +52,6 @@ dist: distclean
        mkdir i3-${VERSION}/i3-input
        find i3-input -maxdepth 1 -type f \( -name "*.c" -or -name "*.mk" -or -name "*.h" -or -name "Makefile" \) -exec cp '{}' i3-${VERSION}/i3-input \;
        cp I3_VERSION i3-${VERSION}/I3_VERSION
        mkdir i3-${VERSION}/i3-input
        find i3-input -maxdepth 1 -type f \( -name "*.c" -or -name "*.mk" -or -name "*.h" -or -name "Makefile" \) -exec cp '{}' i3-${VERSION}/i3-input \;
        cp I3_VERSION i3-${VERSION}/I3_VERSION
-       cp VERSION i3-${VERSION}/VERSION
        # Pre-generate a manpage to allow distributors to skip this step and save some dependencies
        $(MAKE) mans
        cp man/*.1 i3-${VERSION}/man/
        # Pre-generate a manpage to allow distributors to skip this step and save some dependencies
        $(MAKE) mans
        cp man/*.1 i3-${VERSION}/man/
diff --git a/VERSION b/VERSION
deleted file mode 100644 (file)
index f588584..0000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-4.12
index 0215d35b1375584ac6d797252a1c374aed73001c..e99f93c8bd90dad1357e1c712cd45f91c8569df4 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -21,8 +21,8 @@ endif
 # In dist and snapshot tarballs, use the I3_VERSION and VERSION files. Otherwise use git information.
 ifeq ($(wildcard .git),)
   # not in git repository
 # In dist and snapshot tarballs, use the I3_VERSION and VERSION files. Otherwise use git information.
 ifeq ($(wildcard .git),)
   # not in git repository
-  VERSION := '$(shell [ -f $(TOPDIR)/VERSION ] && cat $(TOPDIR)/VERSION)'
-  I3_VERSION := '$(shell [ -f $(TOPDIR)/I3_VERSION ] && cat $(TOPDIR)/I3_VERSION)'
+  VERSION := $(shell [ -f $(TOPDIR)/I3_VERSION ] && cat $(TOPDIR)/I3_VERSION | cut -d '-' -f 1)
+  I3_VERSION := $(shell [ -f $(TOPDIR)/I3_VERSION ] && cat $(TOPDIR)/I3_VERSION)
 else
   VERSION := $(shell git describe --tags --abbrev=0)
   I3_VERSION := '$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch \"$(shell git describe --tags --always --all | sed s:heads/::)\")'
 else
   VERSION := $(shell git describe --tags --abbrev=0)
   I3_VERSION := '$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch \"$(shell git describe --tags --always --all | sed s:heads/::)\")'
index 61b3c444e4d247253a4e1f212ef1c48b9792e82f..cc59d6a2af7ce033fdd565eace9e277446e8f59b 100755 (executable)
@@ -56,9 +56,8 @@ cp "${STARTDIR}/RELEASE-NOTES-${RELEASE_VERSION}" "RELEASE-NOTES-${RELEASE_VERSI
 git add RELEASE-NOTES-${RELEASE_VERSION}
 git rm RELEASE-NOTES-${PREVIOUS_VERSION}
 sed -i "s,<refmiscinfo class=\"version\">[^<]*</refmiscinfo>,<refmiscinfo class=\"version\">${RELEASE_VERSION}</refmiscinfo>,g" man/asciidoc.conf
 git add RELEASE-NOTES-${RELEASE_VERSION}
 git rm RELEASE-NOTES-${PREVIOUS_VERSION}
 sed -i "s,<refmiscinfo class=\"version\">[^<]*</refmiscinfo>,<refmiscinfo class=\"version\">${RELEASE_VERSION}</refmiscinfo>,g" man/asciidoc.conf
-echo "${RELEASE_VERSION}" > VERSION
 echo "${RELEASE_VERSION} ($(date +%F))" > I3_VERSION
 echo "${RELEASE_VERSION} ($(date +%F))" > I3_VERSION
-git add VERSION I3_VERSION
+git add I3_VERSION
 git commit -a -m "release i3 ${RELEASE_VERSION}"
 git tag "${RELEASE_VERSION}" -m "release i3 ${RELEASE_VERSION}" --sign --local-user=0x4AC8EE1D
 
 git commit -a -m "release i3 ${RELEASE_VERSION}"
 git tag "${RELEASE_VERSION}" -m "release i3 ${RELEASE_VERSION}" --sign --local-user=0x4AC8EE1D