Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
0a3f401c
Commit
0a3f401c
authored
May 10, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to a normalized deploy name for .deb files
Conflicts: rakefile
parent
d2c3ceaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
rakefile
+5
-4
No files found.
rakefile
View file @
0a3f401c
...
...
@@ -11,7 +11,7 @@ PACKAGE_NAME = "mitx"
LINK_PATH
=
"/opt/wwc/mitx"
VERSION
=
"0.1"
COMMIT
=
(
ENV
[
"GIT_COMMIT"
]
||
`git rev-parse HEAD`
).
chomp
()[
0
,
10
]
BRANCH
=
(
ENV
[
"GIT_BRANCH"
]
||
`git symbolic-ref -q HEAD`
).
chomp
().
gsub
(
'refs/heads/'
,
''
).
gsub
(
'origin/'
,
''
)
.
gsub
(
'/'
,
'_'
).
downcase
()
BRANCH
=
(
ENV
[
"GIT_BRANCH"
]
||
`git symbolic-ref -q HEAD`
).
chomp
().
gsub
(
'refs/heads/'
,
''
).
gsub
(
'origin/'
,
''
)
BUILD_NUMBER
=
(
ENV
[
"BUILD_NUMBER"
]
||
"dev"
).
chomp
()
if
BRANCH
==
"master"
...
...
@@ -19,9 +19,10 @@ if BRANCH == "master"
else
DEPLOY_NAME
=
"
#{
PACKAGE_NAME
}
-
#{
BRANCH
}
-
#{
BUILD_NUMBER
}
-
#{
COMMIT
}
"
end
INSTALL_DIR_PATH
=
File
.
join
(
DEPLOY_DIR
,
DEPLOY_NAME
)
PACKAGE_REPO
=
"packages@gp.mitx.mit.edu:/opt/pkgrepo.incoming"
NORMALIZED_DEPLOY_NAME
=
DEPLOY_NAME
.
downcase
().
gsub
(
/[_\/]/
,
'-'
)
INSTALL_DIR_PATH
=
File
.
join
(
DEPLOY_DIR
,
NORMALIZED_DEPLOY_NAME
)
# Set up the clean and clobber tasks
CLOBBER
.
include
(
'build'
)
...
...
@@ -62,7 +63,7 @@ task :package do
"--exclude=**/*.pyc"
,
"-C"
,
"
#{
REPO_ROOT
}
"
,
"--provides=
#{
PACKAGE_NAME
}
"
,
"--name=
#{
DEPLOY_NAME
}
"
,
"--name=
#{
NORMALIZED_
DEPLOY_NAME
}
"
,
"--version=
#{
VERSION
}
"
,
"-a"
,
"all"
,
"."
]
...
...
@@ -71,5 +72,5 @@ task :package do
end
task
:publish
=>
:package
do
sh
(
"scp
#{
BUILD_DIR
}
/
#{
DEPLOY_NAME
}
_
#{
VERSION
}
*.deb
#{
PACKAGE_REPO
}
"
)
sh
(
"scp
#{
BUILD_DIR
}
/
#{
NORMALIZED_
DEPLOY_NAME
}
_
#{
VERSION
}
*.deb
#{
PACKAGE_REPO
}
"
)
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment