Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLT-4068: Add .zip to build process & convert config.json to use CRLF #4219

Merged
merged 1 commit into from
Oct 31, 2016

Conversation

shieldsjared
Copy link
Contributor

Summary

Modifies the makefile to generate a windows-friendly archive (e.g. zipfile) instead of a tar file for the windows distribution. Also, to align w/ windows-friendliness, a flag is included in the zip operation to convert LF's to CRLF's (which will enable an easier experience when updating config.json.

Note that if the system executing does not have the zip command/package available, the build will gracefully fallback to the standard tar packaging.

Ticket Links

PLT-4068: Add .zip to build process for Windows and update config.json so it renders properly in Notepad

DOCS/PR-483: Windows Installation/Deployment Guide

Checklist

  • Touches critical sections of the codebase (auth, upgrade, etc.)

@it33 it33 added 2: Dev Review Requires review by a developer Hacktoberfest labels Oct 14, 2016
@shieldsjared shieldsjared changed the title Conditionally package windows distribution as a ZIP archive if the zi… PLT-4068: Add .zip to build process & convert config.json to use CRLF Oct 14, 2016
@it33
Copy link
Contributor

it33 commented Oct 14, 2016

Fantastic, thanks @shieldsjared!! Queuing for review,

Copy link
Member

@crspeller crspeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! I had no idea there was a zip command to do the conversion.

@@ -333,9 +333,13 @@ else
cp $(GOPATH)/bin/windows_amd64/platform.exe $(DIST_PATH)/bin # from cross-compiled bin dir
endif
@# Package
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-windows-amd64.tar.gz mattermost
ifeq (, $(shell which zip))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I like the fallback. I would much rather have it fail then produce inconsistent output. The make package target is designed for our build machine and I would much rather have it fail here then when it's trying to upload.

@crspeller crspeller self-assigned this Oct 17, 2016
@crspeller
Copy link
Member

Also nobody merge this. I probably need to modify the build machine for this to work.

@crspeller crspeller added the Awaiting Submitter Action Blocked on the author label Oct 17, 2016
@shieldsjared
Copy link
Contributor Author

@crspeller - no worrries, I'll update it tonight.
@enahum - any input on the fallback? We had chatted about this the other night.

@enahum
Copy link
Contributor

enahum commented Oct 17, 2016

@shieldsjared yeah but I didn't take into account what @crspeller is saying which makes a lot of sense, maybe we should just force the windows package to be a zip file

@shieldsjared
Copy link
Contributor Author

No worries! Just wanted to ensure you saw it. I'm happy to do whatever y'all think is best.

@jwilander jwilander removed the Awaiting Submitter Action Blocked on the author label Oct 21, 2016
@crspeller
Copy link
Member

@shieldsjared Waiting on your changes to merge this.

@shieldsjared
Copy link
Contributor Author

Shoot!! I'll get it done in just a little bit! Sorry about that

…e, instead of a TAR. Included with ZIP is the flag to convert LF to CRLF.
@shieldsjared
Copy link
Contributor Author

@crspeller - Sorry about the delay! Completely lost sight of this. (I'll blame remediation of issues w/ the house after Hurricane Matthew!). I removed the fallback from the target...

The reason it's moving INTO the directory is because the zip command doesn't have way to target the internal folder structure w/in the archive (like tar does).... So I had to do that to ensure the resulting ZIP matches the same structure.

If you want to spit out a ZIP from the 3.4 release and let me know where to download, I can replace my production team-instance w/ the ZIP contents to ensure that the CRLF conversions don't create any issues. If it does, they should be readily apparent. That'll give us end-to-end confidence since the build-server will ultimately be the producer.

@crspeller crspeller merged commit 3f30aa5 into mattermost:master Oct 31, 2016
@crspeller
Copy link
Member

@shieldsjared Link to the master build with this PR merged for you to try out: https://releases.mattermost.com/mattermost-platform/master/mattermost-enterprise-linux-amd64.tar.gz

crspeller pushed a commit that referenced this pull request Nov 1, 2016
…e, instead of a TAR. Included with ZIP is the flag to convert LF to CRLF. (#4219)
@shieldsjared shieldsjared deleted the windows-package-zip-crlf branch October 4, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants