This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ticket/master/6840-remove-version-file'
* ticket/master/6840-remove-version-file: (#7567) Refactor dashboard packaging to allow for nightly builds (#6840) Remove need for VERSION file in puppet-dashboard
- Loading branch information
Showing
10 changed files
with
236 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,5 @@ db/schema.rb | |
db/migrate/*_plugin_*.rb | ||
config/installed_plugins | ||
*.rpm | ||
pkg/* | ||
VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
# Get the Dashboard version number. | ||
# | ||
# Any officially released package or tarball of dashboard | ||
# will have a VERSION file that is generated at tarball | ||
# build time. | ||
# | ||
# This allows for the APP_VERSION to be determined by git, so | ||
# developers can run out of master after a git checkout. | ||
def get_app_version | ||
if File.exists?(Rails.root.join('VERSION')) | ||
return File.read(Rails.root.join('VERSION')).strip | ||
elsif File.directory?(Rails.root.join('.git')) | ||
return `cd #{Rails.root}; git describe`.strip! rescue 'unknown' | ||
end | ||
|
||
APP_VERSION = File.read(Rails.root.join('VERSION')).strip.sub(/^v/, '') | ||
'unknown' | ||
end | ||
|
||
APP_VERSION = get_app_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
puppet-dashboard (<%= version %>-1) intrepid jaunty karmic lucid meerkat narwhal natty lenny squeeze; urgency=low | ||
|
||
* build at version <%= version %> | ||
|
||
-- Michael Stahnke <stahnma@puppetlabs.com> <%= dt %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
for target_dir in $@ | ||
do | ||
for f in `find "$target_dir" -type f 2>/dev/null` | ||
do | ||
sed -e '1,1{ | ||
/^#!/d | ||
}' < $f > $f.tmp | ||
if ! cmp $f $f.tmp >/dev/null | ||
then | ||
mv -f $f.tmp $f | ||
else | ||
rm -f $f.tmp | ||
fi | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,48 @@ | ||
#!/usr/bin/make -f | ||
# -*- makefile -*- | ||
|
||
# Uncomment these fllowing lines to display lots of debugging information during the build process: | ||
export DH_VERBOSE=1 | ||
export DH_OPTIONS=-v | ||
include /usr/share/cdbs/1/rules/debhelper.mk | ||
include /usr/share/cdbs/1/rules/buildcore.mk | ||
|
||
%: | ||
dh $@ | ||
ruby_ver = 1.8 | ||
|
||
override_dh_install: | ||
install -d debian/puppet-dashboard/etc/puppet-dashboard | ||
install -d debian/puppet-dashboard/usr/share/puppet-dashboard | ||
install -d debian/puppet-dashboard/usr/share/doc/puppet-dashboard/examples | ||
cp -r app bin config db ext lib public script spec vendor VERSION CHANGELOG COPYING LICENSE README.markdown README_PACKAGES.markdown RELEASE_NOTES.md Rakefile debian/puppet-dashboard/usr/share/puppet-dashboard/ | ||
install config/database.yml.example debian/puppet-dashboard/etc/puppet-dashboard/database.yml | ||
install config/database.yml.example debian/puppet-dashboard/usr/share/doc/puppet-dashboard/examples/database.yml.example | ||
# Clean up the "extra" license files | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/config/database.yml.example | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/doc/README_FOR_APP | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/plugins/*/*LICENSE | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/plugins/*/License.txt | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/plugins/*/COPYING | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/gems/*/COPYING | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/gems/*/*LICENSE | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/gems/*/License.txt | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/rails/*/*LICENSE | ||
# ...and other various files | ||
rm -f debian/puppet-dashboard/.gems | ||
rm -f debian/puppet-dashboard/.autotest | ||
find debian/puppet-dashboard -name '.gitignore' -type f | xargs rm -f | ||
find debian/puppet-dashboard -name '.git' -type d | xargs rm -rf | ||
binary-install/puppet-dashboard:: | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/etc/puppet-dashboard | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/var/$(cdbs_curpkg)/tmp | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/var/log/puppet-dashboard | ||
cp -r app \ | ||
bin \ | ||
config \ | ||
db \ | ||
ext \ | ||
lib \ | ||
Rakefile \ | ||
script \ | ||
spec \ | ||
vendor \ | ||
RELEASE_NOTES.md \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard | ||
cp $(CURDIR)/config/database.yml.example $(CURDIR)/debian/$(cdbs_curpkg)/etc/puppet-dashboard/database.yml | ||
cp -r $(CURDIR)/public $(CURDIR)/debian/$(cdbs_curpkg)/var/$(cdbs_curpkg) | ||
chmod -R a+rx $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/script | ||
rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/ext/packaging | ||
# Clean up the "extra" files | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/config/database.yml.example | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/plugins/*/*LICENSE | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/plugins/*/License.txt | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/gems/*/COPYING | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/gems/*/*LICENSE | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/gems/*/License.txt | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/rails/*/*LICENSE | ||
find $(CURDIR)/debian/$(cdbs_curpkg) -name .gitignore -exec rm {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor -name LICENSE -exec rm {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor -name MIT-LICENSE -exec rm {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor -type f -exec chmod a-x {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/app -type f -exec chmod a-x {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/spec -type f -exec chmod a-x {} \; | ||
# Fixup shebang lines | ||
bash $(CURDIR)/debian/rmshebang.sh \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/lib \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/app \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/spec \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.