Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-project
Commits
baf3b6af
Unverified
Commit
baf3b6af
authored
8 years ago
by
aviau
Browse files
Options
Downloads
Patches
Plain Diff
deploy-packages: support manual download location
Change-Id: I42f69660cef7b0e004b11a8ab0035721b0a2efe9 Tuleap:
#872
parent
2fd81444
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
scripts/deploy-packages.sh
+39
-12
39 additions, 12 deletions
scripts/deploy-packages.sh
with
40 additions
and
12 deletions
.gitignore
+
1
−
0
View file @
baf3b6af
...
...
@@ -8,3 +8,4 @@ packages
ring_*.tar.gz
Makefile.packaging.distro_targets
repositories
manual-download
This diff is collapsed.
Click to expand it.
scripts/deploy-packages.sh
+
39
−
12
View file @
baf3b6af
...
...
@@ -37,8 +37,12 @@ case $i in
KEYID
=
"
${
i
#*=
}
"
shift
;;
--remote-location
=
*
)
REMOTE_LOCATION
=
"
${
i
#*=
}
"
--remote-repository-location
=
*
)
REMOTE_REPOSITORY_LOCATION
=
"
${
i
#*=
}
"
shift
;;
--remote-manual-download-location
=
*
)
REMOTE_MANUAL_DOWNLOAD_LOCATION
=
"
${
i
#*=
}
"
shift
;;
*
)
...
...
@@ -55,12 +59,12 @@ echo "#########################"
echo
"## Creating repository ##"
echo
"#########################"
DISTRIBUTION_FOLDER
=
$(
realpath
repositories
)
/
${
DISTRIBUTION
}
rm
-rf
${
DISTRIBUTION_FOLDER
}
mkdir
-p
${
DISTRIBUTION_FOLDER
}
/conf
DISTRIBUTION_
REPOSITOIRY_
FOLDER
=
$(
realpath
repositories
)
/
${
DISTRIBUTION
}
rm
-rf
${
DISTRIBUTION_
REPOSITOIRY_
FOLDER
}
mkdir
-p
${
DISTRIBUTION_
REPOSITOIRY_
FOLDER
}
/conf
# Distributions file
cat
<<
EOF
>
${
DISTRIBUTION_FOLDER
}
/conf/distributions
cat
<<
EOF
>
${
DISTRIBUTION_
REPOSITOIRY_
FOLDER
}
/conf/distributions
Origin: ring
Label: Ring
${
DISTRIBUTION
}
Repository
Codename: ring
...
...
@@ -71,8 +75,8 @@ SignWith: ${KEYID}
EOF
# Options file
cat
<<
EOF
>
${
DISTRIBUTION_FOLDER
}
/conf/options
basedir
${
DISTRIBUTION_FOLDER
}
cat
<<
EOF
>
${
DISTRIBUTION_
REPOSITOIRY_
FOLDER
}
/conf/options
basedir
${
DISTRIBUTION_
REPOSITOIRY_
FOLDER
}
EOF
####################################
...
...
@@ -93,17 +97,40 @@ echo "####################"
echo
"## including debs ##"
echo
"####################"
for
package
in
packages/
${
DISTRIBUTION
}*
/
*
.deb
;
do
reprepro
--verbose
--basedir
${
DISTRIBUTION_FOLDER
}
includedeb ring
${
package
}
reprepro
--verbose
--basedir
${
DISTRIBUTION_
REPOSITOIRY_
FOLDER
}
includedeb ring
${
package
}
done
# Rebuild the index
reprepro
--verbose
--basedir
${
DISTRIBUTION_FOLDER
}
export
ring
reprepro
--verbose
--basedir
${
DISTRIBUTION_REPOSITOIRY_FOLDER
}
export
ring
#######################################
## create the manual download folder ##
#######################################
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER
=
$(
realpath
manual-download
)
/
${
DISTRIBUTION
}
mkdir
-p
${
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER
}
for
package
in
packages/
${
DISTRIBUTION
}*
/
*
.deb
;
do
cp
${
package
}
${
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER
}
package_name
=
$(
dpkg
-I
${
package
}
|
grep
Package: |
awk
'{print $2}'
)
package_arch
=
$(
dpkg
-I
${
package
}
|
grep
Architecture: |
awk
'{print $2}'
)
cp
${
package
}
${
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER
}
/
${
package_name
}
_
${
package_arch
}
.deb
done
############
## deploy ##
############
# Deploy the repository
echo
"##########################"
echo
"## deploying repository ##"
echo
"##########################"
rsync
--archive
--recursive
--verbose
--delete
${
DISTRIBUTION_FOLDER
}
${
REMOTE_LOCATION
}
rsync
--archive
--recursive
--verbose
--delete
${
DISTRIBUTION_REPOSITOIRY_FOLDER
}
${
REMOTE_REPOSITORY_LOCATION
}
# deploy the manual download files
echo
"#####################################"
echo
"## deploying manual download files ##"
echo
"#####################################"
rsync
--archive
--recursive
--verbose
--delete
${
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER
}
${
REMOTE_MANUAL_DOWNLOAD_LOCATION
}
# Remove the local copy of the repository
# remove deployed files
rm
-rf
manual-download
rm
-rf
repositories
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment