mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-09-26 11:18:42 +02:00
implement automatic version string on packaging
This commit is contained in:
parent
649f6ec371
commit
d367d69c67
6
makefile
6
makefile
@ -27,6 +27,9 @@ ifeq ($(DIST),$(EL7_DIST))
|
||||
sed -i "s/pf-c-button/btn/g;s/pf-m-primary/btn-primary/g;s/pf-m-secondary/btn-default/g;s/pf-m-danger/btn-danger/g" $(DESTDIR)/usr/share/cockpit/navigator/navigator.html
|
||||
sed -i "s/pf-c-button/btn/g;s/pf-m-primary/btn-primary/g;s/pf-m-secondary/btn-default/g;s/pf-m-danger/btn-danger/g" $(DESTDIR)/usr/share/cockpit/navigator/components/ModalPrompt.js
|
||||
endif
|
||||
ifneq ($(NAV_VERS),)
|
||||
echo "export let NAVIGATOR_VERSION = \"$(NAV_VERS)\";" > $(DESTDIR)/usr/share/cockpit/navigator/version.js
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
rm -rf $(DESTDIR)/usr/share/cockpit/navigator
|
||||
@ -35,6 +38,9 @@ install-local:
|
||||
mkdir -p $(HOME)/.local/share/cockpit
|
||||
cp -rpf navigator $(HOME)/.local/share/cockpit
|
||||
find $(HOME)/.local/share/cockpit/navigator -name '*.js' -exec sed -i "s#\"/usr/share/\(cockpit/navigator/scripts/.*\)\"#\"$(HOME)/.local/share/\1\"#g" {} \;
|
||||
ifneq ($(NAV_VERS),)
|
||||
echo "export let NAVIGATOR_VERSION = \"$(NAV_VERS)\";" > $(HOME)/.local/share/cockpit/navigator/version.js
|
||||
endif
|
||||
|
||||
uninstall-local:
|
||||
rm -rf $(HOME)/.local/share/cockpit/navigator
|
||||
|
@ -143,7 +143,7 @@ function set_up_buttons() {
|
||||
});
|
||||
document.getElementById("nav-info-btn").addEventListener("click", () => {
|
||||
new ModalPrompt().alert(
|
||||
`Cockpit Navigator v${NAVIGATOR_VERSION}`,
|
||||
`Cockpit Navigator ${NAVIGATOR_VERSION}`,
|
||||
`<p>` +
|
||||
`Created by <a target="_blank" href=https://www.45drives.com/?utm_source=Houston&utm_medium=UI&utm_campaign=OS-Link>45Drives</a> for Houston UI (Cockpit).<br>` +
|
||||
`<a target="_blank" href=https://github.com/45Drives/cockpit-navigator/issues>Issue Tracker</a><br>` +
|
||||
|
@ -1 +1 @@
|
||||
export let NAVIGATOR_VERSION = "0.5.3";
|
||||
export let NAVIGATOR_VERSION = "built from source";
|
@ -23,7 +23,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
# empty
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} DIST=%{dist} install
|
||||
make DESTDIR=%{buildroot} DIST=%{dist} NAV_VERS="%{version}-%{release}" install
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
@ -41,7 +41,7 @@ rm -rf %{buildroot}
|
||||
* Thu Jul 15 2021 Josh Boudreau <jboudreau@45drives.com> 0.5.0-1
|
||||
- Implement custom modal style popups to replace browser dialogs.
|
||||
* Wed Jul 07 2021 Josh Boudreau <jboudreau@45drives.com> 0.4.6-3
|
||||
- Add relase for el7
|
||||
- Add release for el7
|
||||
* Wed Jun 30 2021 Josh Boudreau <jboudreau@45drives.com> 0.4.6-2
|
||||
- First build with auto packaging
|
||||
* Fri Jun 18 2021 Josh Boudreau <jboudreau@45drives.com> 0.4.6-1
|
||||
|
@ -23,7 +23,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
# empty
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} DIST=%{dist} install
|
||||
make DESTDIR=%{buildroot} DIST=%{dist} NAV_VERS="%{version}-%{release}" install
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
@ -41,7 +41,7 @@ rm -rf %{buildroot}
|
||||
* Thu Jul 15 2021 Josh Boudreau <jboudreau@45drives.com> 0.5.0-1
|
||||
- Implement custom modal style popups to replace browser dialogs.
|
||||
* Wed Jul 07 2021 Josh Boudreau <jboudreau@45drives.com> 0.4.6-3
|
||||
- Add relase for el7
|
||||
- Add release for el7
|
||||
* Wed Jun 30 2021 Josh Boudreau <jboudreau@45drives.com> 0.4.6-2
|
||||
- First build with auto packaging
|
||||
* Fri Jun 18 2021 Josh Boudreau <jboudreau@45drives.com> 0.4.6-1
|
||||
|
@ -13,6 +13,8 @@
|
||||
# package maintainers to append LDFLAGS
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
export NAV_VERS := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ':')
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user