better version checking

bump version to 1.1.1
pull/15/head
Simon Let 7 years ago
parent 68bf682799
commit a1f6632d8f
  1. 6
      Makefile
  2. 4
      collect/resh-collect.go
  3. 6
      shellrc.sh
  4. 2
      version

@ -10,7 +10,7 @@ autoinstall:
build: submodules resh-collect resh-daemon
install: build | $(HOME)/.resh $(HOME)/.resh/bin $(HOME)/.config $(HOME)/.resh/resh-uuid
install: build submodules/bash-preexec/bash-preexec.sh shellrc.sh config.toml uuid.sh | $(HOME)/.resh $(HOME)/.resh/bin $(HOME)/.config
# Copying files to resh directory ...
cp -f submodules/bash-preexec/bash-preexec.sh ~/.bash-preexec.sh
cp -f config.toml ~/.config/resh.toml
@ -55,10 +55,10 @@ uninstall:
# Uninstalling ...
-rm -rf ~/.resh/
resh-daemon: daemon/resh-daemon.go common/resh-common.go
resh-daemon: daemon/resh-daemon.go common/resh-common.go version
go build ${GOFLAGS} -o $@ $<
resh-collect: collect/resh-collect.go common/resh-common.go
resh-collect: collect/resh-collect.go common/resh-common.go version
go build ${GOFLAGS} -o $@ $<

@ -106,14 +106,14 @@ func main() {
if *requireVersion != "" && *requireVersion != Version {
fmt.Println("Please restart/reload this terminal session " +
"(resh version: " + Version +
" resh version of this terminal session: " + *requireVersion +
"; resh version of this terminal session: " + *requireVersion +
")")
os.Exit(3)
}
if *requireRevision != "" && *requireRevision != Revision {
fmt.Println("Please restart/reload this terminal session " +
"(resh revision: " + Revision +
" resh revision of this terminal session: " + *requireRevision +
"; resh revision of this terminal session: " + *requireRevision +
")")
os.Exit(3)
}

@ -152,6 +152,11 @@ __resh_precmd() {
__RESH_TZ_AFTER=$(date +%z)
__RESH_PWD_AFTER="$PWD"
if [ -n "${__RESH_COLLECT}" ]; then
if [ "$__RESH_VERSION" != $(resh-collect -version) ]; then
echo "resh WARNING: You probably just updated RESH - please restart/reload this terminal session (resh version: $(resh-collect -version); resh version of this terminal session: ${__RESH_VERSION})"
elif [ "$__RESH_REVISION" != $(resh-collect -revision) ]; then
echo "resh WARNING: You probably just updated RESH - please restart/reload this terminal session (resh version: $(resh-collect -revision); resh version of this terminal session: ${__RESH_REVISION})"
else
resh-collect -requireVersion "$__RESH_VERSION" \
-requireRevision "$__RESH_REVISION" \
-cmdLine "$__RESH_CMDLINE" \
@ -194,6 +199,7 @@ __resh_precmd() {
&>~/.resh/client_last_run_out.txt || echo "resh ERROR: $(head -n 1 ~/.resh/client_last_run_out.txt)"
# -path "$__RESH_PATH" \
fi
fi
unset __RESH_COLLECT
}

@ -1 +1 @@
1.1.0
1.1.1

Loading…
Cancel
Save