drone-plugins / drone-hugo

Drone plugin to publish Hugo generated websites
https://plugins.drone.io/plugins/hugo
Apache License 2.0
29 stars 20 forks source link

Added Hugo flavour (hugo and normal) #12

Closed stepri closed 5 years ago

stepri commented 5 years ago

You have the normal hugo but you also have an extended version of hugo. With the HUGO_FLAVOUR
environment you can choose which version you want.

cbrgm commented 5 years ago

Hi @stepri ! Thanks for your PR. The changes you are suggesting will only be relevant if you are building the Docker image yourself.

Because the Drone plugins are prebuilt images and are intended for use directly in the pipeline, the environment variable will have no effect. Instead we should rather edit the cmd commands and set the flavour via an attribute hugo_flavourin the .drone.yml. . For example:

kind: pipeline
name: default

steps:
- name: build
  image: plugins/hugo
  settings:
    hugo_version: 0.52
 + hugo_extended: true
    url: https://foo.net
    validate: false

Also the binaries download variable needs to be adjusted: https://github.com/drone-plugins/drone-hugo/blob/master/download/download.go#L19

This should not be that hard, PRs welcome :-)

I'm going to add some new features to the plugin shipped with latest hugo versions up to 0.52 after christmas.

Cheers!