Skip to content

Commit

Permalink
build: set file permissions before uploading
Browse files Browse the repository at this point in the history
PR-URL: #2623
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>

cherry-picked to v3.x by @rvagg, s/nodejs/iojs
  • Loading branch information
rvagg committed Sep 2, 2015
1 parent a860d7f commit 3172e9c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
24 changes: 16 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ pkg: $(PKG)

pkg-upload: pkg
ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)"
chmod 664 iojs-$(FULLVERSION).pkg
scp -p iojs-$(FULLVERSION).pkg $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg.done"

Expand All @@ -373,17 +374,20 @@ tar: $(TARBALL)

tar-upload: tar
ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)"
chmod 664 iojs-$(FULLVERSION).tar.gz
scp -p iojs-$(FULLVERSION).tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz.done"
ifeq ($(XZ), 0)
chmod 664 iojs-$(FULLVERSION).tar.xz
scp -p iojs-$(FULLVERSION).tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz.done"
endif

doc-upload: tar
ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)"
scp -r out/doc/ $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs/
ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done"
ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)"
chmod -R ug=rw-x+X,o=r+X out/doc/
scp -pr out/doc/ $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/docs/
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done"

$(TARBALL)-headers: config.gypi release-only
$(PYTHON) ./configure \
Expand All @@ -405,12 +409,14 @@ endif
tar-headers: $(TARBALL)-headers

tar-headers-upload: tar-headers
ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)"
scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz
ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done"
ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)"
chmod 664 $(TARNAME)-headers.tar.gz
scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done"
ifeq ($(XZ), 0)
scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz
ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done"
chmod 664 $(TARNAME)-headers.tar.xz
scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done"
endif

$(BINARYTAR): release-only
Expand Down Expand Up @@ -438,9 +444,11 @@ binary: $(BINARYTAR)

binary-upload: binary
ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)"
chmod 664 iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz
scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz.done"
ifeq ($(XZ), 0)
chmod 664 iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz
scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz
ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz.done"
endif
Expand Down
3 changes: 2 additions & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ scp -F %SSHCONFIG% Release\iojs.exe %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVER
scp -F %SSHCONFIG% Release\iojs.lib %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%/iojs.lib
scp -F %SSHCONFIG% iojs-v%FULLVERSION%-%target_arch%.msi %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/
ssh -F %SSHCONFIG% %STAGINGSERVER% "touch iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi.done iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%.done"
ssh -F %SSHCONFIG% %STAGINGSERVER% "chmod chmod -R ug=rw-x+X,o=r+X iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi* iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%*"

:run
@rem Run tests if requested.
Expand Down Expand Up @@ -260,7 +261,7 @@ echo vcbuild.bat : builds release build
echo vcbuild.bat debug : builds debug build
echo vcbuild.bat release msi : builds release build and MSI installer package
echo vcbuild.bat test : builds debug build and runs tests
echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org
echo vcbuild.bat build-release : builds the release distribution as used by iojs.org
goto exit

:exit
Expand Down

0 comments on commit 3172e9c

Please sign in to comment.