TeslaGov / ngx-http-auth-jwt-module

Secure your NGINX locations with JWT
MIT License
309 stars 118 forks source link

Version Tagged Releases #34

Closed TimUnderhay closed 6 years ago

TimUnderhay commented 6 years ago

I'd like to request the addition of version tags for module releases. The reason is I'd like to add this module to MacPorts but the portfiles require file hashes for each source file, so they must be calculated against a specific version.

master_sites https://github.com/TeslaGov/ngx-http-auth-jwt-module/archive/:jwt_module
...
...

variant jwt description {Add JWT (Javascript Web Token) support to server} {
    set jwt_filename     ngx-http-auth-jwt-module
    set jwt_version      master
    set jwt_distname     ${jwt_filename}-${jwt_version}
    distfiles-append        ${jwt_version}.tar.gz:jwt_module
    # curl -OL https://github.com/KensingtonTech/ngx-http-auth-jwt-module/archive/master.tar.gz && shasum -a256 master.tar.gz && openssl rmd160 master.tar.gz
    checksums-append        ${jwt_version}.tar.gz \
                            rmd160  6c4e41f34ed807ce0df345582f6d3efc940bcb05 \
                            sha256  b91c081a16873264f3a0175ca65786197b2bb8fb824bce3e0f509800075ef939
    configure.args-append   --add-dynamic-module=${workpath}/${jwt_distname}
    depends_lib-append      port:libjwt
}

Without a tag, it will always fetch the latest master from the GitGub archive (i.e. https://github.com/TeslaGov/ngx-http-auth-jwt-module/archive/master.tar.gz ), which can change at any time and thus break MacPorts because the file hashes won't match. By adding a version tag, I can pull specific versions from the GitHub archive, like https://github.com/TeslaGov/ngx-http-auth-jwt-module/archive/v1.0.tar.gz .

Thank you!

kevinmichaelchen commented 6 years ago

@fitzyjoe @KensingtonTech Done.

Here's what I ran:

git tag -a v0.0.1 -m "v0.0.1"
git push origin v0.0.1

Not sure what to leave as a description, so the tag is blank for now.

https://github.com/TeslaGov/ngx-http-auth-jwt-module/releases/tag/v0.0.1

TimUnderhay commented 6 years ago

Hey @fitzyjoe or @kevinmichaelchen, could I bother you to please tag the latest update? Thanks!

kevinmichaelchen commented 6 years ago

Done. See v0.0.2