Skip to content
This repository was archived by the owner on Feb 1, 2021. It is now read-only.

Cleanup: separate unix-related codes to make Swarm buildable on Windows #205

Merged
merged 1 commit into from
Dec 30, 2014

Conversation

chanwit
Copy link
Contributor

@chanwit chanwit commented Dec 29, 2014

I am new to contributing to Docker projects. Let me know if I am doing something wrong.

There will be some move to make Docker and its related projects available for Windows in the new future. Swarm is still young so it's great to have some Windows-related refactoring early for this project.

This PR is initially separating Unix / Windows specific codes into different files and guarding them with the platform +build flag. This PR also allows contributors to compile and start hacking Swarm on Windows.

@chanwit chanwit changed the title Proposal: separate unix-related codes to make Swarm buildable on Windows Cleanup: separate unix-related codes to make Swarm buildable on Windows Dec 29, 2014
@@ -0,0 +1,36 @@
// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use // +build !windows here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vieux no problem, I'll make a change.

@vieux vieux added the Windows label Dec 29, 2014
@vieux vieux self-assigned this Dec 29, 2014
@vieux
Copy link
Contributor

vieux commented Dec 29, 2014

ping @icecrime, could you please test this

@icecrime
Copy link

icecrime@icecrime-PC /cygdrive/e/src/github.com/docker/swarm
$ go build

icecrime@icecrime-PC /cygdrive/e/src/github.com/docker/swarm
$ /cygdrive/e/bin/swarm.exe
NAME:
   swarm - docker clustering

USAGE:
   swarm [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
   create, c    create a cluster
   list, l      list nodes in a cluster
   manage, m    manage a docker cluster
   join, j      join a docker cluster
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug              debug mode [$DEBUG]
   --help, -h           show help
   --version, -v        print the version

👍

@chanwit
Copy link
Contributor Author

chanwit commented Dec 30, 2014

updated to use // +build !windows in api/server_unix.go per comment from @vieux

@aluzzardi
Copy link
Contributor

LGTM

aluzzardi added a commit that referenced this pull request Dec 30, 2014
Cleanup: separate unix-related codes to make Swarm buildable on Windows
@aluzzardi aluzzardi merged commit 644caca into docker-archive:master Dec 30, 2014
@chanwit chanwit deleted the dev branch January 6, 2015 13:50
@vieux vieux modified the milestone: Swarm Beta 0.1.0 Jan 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants