Fixed and improved Makefile
This commit is contained in:
parent
b447f4bf3d
commit
a8e01f2048
18
Makefile
18
Makefile
|
@ -2,24 +2,28 @@
|
|||
UPSTREAM_VERSION = 2.29.2.2
|
||||
PKG_SUB_RELEASE = 1.0
|
||||
PKG_FULL_VERSION = ${UPSTREAM_VERSION}-${PKG_SUB_RELEASE}
|
||||
UPSTREAM_TAG = "v$(echo $UPSTREAM_VERSION | cut -d. -f-3).windows.$(echo $UPSTREAM_VERSION | cut -d. -f4)"
|
||||
UPSTREAM_TAG = "v$$(echo ${UPSTREAM_VERSION} | cut -d. -f-3).windows.$$(echo ${UPSTREAM_VERSION} | cut -d. -f4)"
|
||||
|
||||
SOURCE = https://github.com/git-for-windows/git/releases/download/${UPSTREAM_TAG}/Git-${UPSTREAM_VERSION}-64-bit.exe
|
||||
CHECKSUM = 0a88d826cd4c66d949c054f5830667896fae44fcb29c1698f7ed984df8765029
|
||||
CHECKSUM = 9ab49d93166d430514b0aaf6dda3fdc6b37e2fe1d0df8ecc04403cd2be40e78b
|
||||
## Download Link and Checksums can be found on https://github.com/git-for-windows/git/releases/
|
||||
|
||||
install: clean setversion
|
||||
all: clean setversion install
|
||||
|
||||
install: setversion
|
||||
@[ -d "./data/" ] || mkdir ./data/
|
||||
@echo "Downloading the Git for Windows executable..."
|
||||
@echo "INFO: Downloading the Git for Windows executable..."
|
||||
@wget -O ./data/Git-${UPSTREAM_VERSION}-64-bit.exe ${SOURCE}
|
||||
@echo "${CHECKSUM} ./data/Git-${UPSTREAM_VERSION}-64-bit.exe" | sha256sum -c && echo "SUCCESS: Checksums match" || { ec=$$?; echo "ERROR: Checksum mismatch" >&2; rm -rf ./data/; exit $$ec; }
|
||||
@echo "${CHECKSUM} ./data/Git-${UPSTREAM_VERSION}-64-bit.exe" | sha256sum -c && echo "SUCCESS: Checksums match" || { ec=$$?; echo "ERROR: Checksum mismatch" >&2; rm -rf ./data/ >&2; exit $$ec; }
|
||||
@echo "SUCCESS: Installed Successfully"
|
||||
|
||||
clean:
|
||||
@echo "Cleaning ./data/"
|
||||
@echo "INFO: Cleaning ./data/"
|
||||
@rm -rf ./data/
|
||||
@[ ! -d "./data/" ] && echo "SUCCESS: Cleaned"
|
||||
|
||||
setversion:
|
||||
@echo "Writing version ${PKG_FULL_VERSION} to control file"
|
||||
@echo "INFO: Writing version ${PKG_FULL_VERSION} to control file"
|
||||
@sed -i "s/^version: [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$$/version: ${UPSTREAM_VERSION}/" ./control
|
||||
@sed -i "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: ${PKG_SUB_RELEASE}/" ./control
|
||||
package:
|
||||
|
|
|
@ -31,7 +31,6 @@ endif
|
|||
[WinBatch_Setup]
|
||||
$UninstallExecutablePath$ /VERYSILENT /SUPPRESSMSGBOXES /LOG="%opsiLogDir%\git-client-uninstall.log"
|
||||
|
||||
|
||||
[Files_Cleanup]
|
||||
delete -sf "%ProgramFilesDir%\Git\"
|
||||
|
||||
|
|
Loading…
Reference in New Issue