diff --git a/assets/index.html b/assets/index.html index 20710468..2f9926a9 100644 --- a/assets/index.html +++ b/assets/index.html @@ -7,6 +7,7 @@ + File Manager diff --git a/assets/src/components/Sidebar.vue b/assets/src/components/Sidebar.vue index 6a92d333..d2afa191 100644 --- a/assets/src/components/Sidebar.vue +++ b/assets/src/components/Sidebar.vue @@ -59,7 +59,7 @@

- {{ $t('sidebar.servedWith') }} File Manager. + File Manager v{{ version }} {{ $t('sidebar.help') }}

@@ -72,7 +72,7 @@ import auth from '@/utils/auth' export default { name: 'sidebar', computed: { - ...mapState(['user', 'staticGen']), + ...mapState(['user', 'staticGen', 'version']), active () { return this.$store.state.show === 'sidebar' } diff --git a/assets/src/store/index.js b/assets/src/store/index.js index 9c263082..0a479147 100644 --- a/assets/src/store/index.js +++ b/assets/src/store/index.js @@ -15,6 +15,7 @@ const state = { staticGen: document.querySelector('meta[name="staticgen"]').getAttribute('content'), baseURL: document.querySelector('meta[name="base"]').getAttribute('content'), noAuth: (document.querySelector('meta[name="noauth"]').getAttribute('content') === 'true'), + version: document.querySelector('meta[name="version"]').getAttribute('content'), jwt: '', progress: 0, schedule: '', diff --git a/filemanager.go b/filemanager.go index 61717408..1343eb1a 100644 --- a/filemanager.go +++ b/filemanager.go @@ -21,7 +21,7 @@ import ( ) // Version is the current File Manager version. -const Version = "(untracked version)" +const Version = "(untracked)" var ( ErrExist = errors.New("the resource already exists") diff --git a/http/http.go b/http/http.go index ec4e2c30..5d5231d3 100644 --- a/http/http.go +++ b/http/http.go @@ -228,6 +228,7 @@ func renderFile(c *fm.Context, w http.ResponseWriter, file string) (int, error) data := map[string]interface{}{ "BaseURL": c.RootURL(), "NoAuth": c.NoAuth, + "Version": fm.Version, } if c.StaticGen != nil { diff --git a/publish.sh b/publish.sh index 85333efc..1578ce9d 100644 --- a/publish.sh +++ b/publish.sh @@ -1,11 +1,11 @@ #!/bin/bash -echo "Releasing version $1" -sed -i "s|(untracked version)|$1|g" filemanager.go - echo "Building assets" ./build.sh +echo "Updating version number to $1..." +sed -i "s|(untracked)|$1|g" filemanager.go + echo "Commiting..." git add -A git commit -m "Version $1" @@ -16,7 +16,7 @@ git tag "v$1" git push --tags echo "Commiting untracked version notice..." -sed -i "s|$1|(untracked version)|g" filemanager.go +sed -i "s|$1|(untracked)|g" filemanager.go git add -A git commit -m "untracked version `date`" git push diff --git a/rice-box.go.REMOVED.git-id b/rice-box.go.REMOVED.git-id deleted file mode 100644 index 32919cf6..00000000 --- a/rice-box.go.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -ff1dc93e7042a5be07b719f0a1b7d1aca3f13b08 \ No newline at end of file