GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

Rollback will use exploded war directory #267

Closed peterfortuin closed 5 years ago

peterfortuin commented 7 years ago

Rollback will use exploded war directory to able to rollback when using variants (mentioned in #177)

googlebot commented 7 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


peterfortuin commented 7 years ago

I signed it!

googlebot commented 7 years ago

CLAs look good, thanks!

loosebazooka commented 7 years ago

Variants haven't been built as a feature. Can you describe how you're implementing it?

On Nov 9, 2016 20:07, "googlebot" notifications@github.com wrote:

CLAs look good, thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/pull/267#issuecomment-259497635, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPo-jYfouC29mpxjrtwYabtOQiH2myvks5q8hntgaJpZM4KthHG .

peterfortuin commented 7 years ago

During the build I have a task (called replaceTokens) that replace @version@ with the version I supply to the build commando.

In appengine-web.xml added the following:

...
<appengine-web-app ...>
    <version>@version@</version>
...

And then in my build.gradle

task replaceTokens(type: Copy) {
    from('src/main/webapp') {
        include '**/appengine-web.xml'
    }
    into 'build/intermediates/webapp'
    filter(ReplaceTokens, tokens: [
            version: version
    ])
    outputs.upToDateWhen { false }
}

war {
    from 'build/intermediates/webapp'
}

war.dependsOn replaceTokens
peterfortuin commented 7 years ago

So, what the task does is making a copy of the appengine-web.xml to the build folder. During this copy I replace the version token in that file. During war building I include that appengine-web.xml again (it will override the original one that is already included from the source directory).

The source in this pull request will make sure that a rollback will use the same appengine-web.xml that is used for deploying the app in the first place.

peterfortuin commented 7 years ago

Can somebody tell me if this every going to be in?

loosebazooka commented 7 years ago

It is not. No major development on this plugin is expected.

On Mar 18, 2017 3:55 PM, "Peter" notifications@github.com wrote:

Can somebody tell me if this every going to be in?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/pull/267#issuecomment-287570521, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPo-kXHlcc9E08p332Lan1z-tU6Wl4Vks5rnDacgaJpZM4KthHG .