On Sat, 2010-11-13 at 19:52 +0100, Xavier Antoviaque wrote:

> I've spent some time creating the basis of a Makefile for the project
> - the goal being to progressively automate a good portion of the
> operations we perform by hand today when we need to prepare a release
> or check some new code made by someone else.


I've implemented the automation of release upgrades, and added a bunch
of new commands related to this. If you merge the trunk repository,
you'll get this:

hackit:~/hackit.cx$ make help
Usage: make [target]

  [target]:
      upgrade = upgrade current installation after having merged a new
revision

      backupdb = generates a .sql backup of the databases in sql/backup/
      restoredb = restores the .sql backup of the databases from
sql/backup/
      checkdbconnect = checks that we can connect to the DB and select
it using values in the config file

      release = generates upgrade scripts
      changelog = regenerates the CHANGELOG file based on bazaar
repository information
      clean = remove temporary and generated files for clean 'bzr
status'

      check = runs all tests
      jscheck = generates javascript tests
      phpcheck = runs PHP tests
      windmill = runs Windmill tests
      othercheck = runs all other checks (return characters in code
files, etc.)

      help = display current message

Vlad, David, could you try to run "make upgrade" on your installation
and let me know if you spot bugs? It's likely to need some debugging,
but it should eventually help us to smoothen the release process. 

"make release" generates a diff of the database schema since the last
time it was run (using sql/db_hackit.sql and sql/db_hackit_test.sql as a
reference). It also allows to create an upgrade script, to prompt the
user with new configuration variables to automatically add to config.php
for example. The goal is that merging a branch would only require to do
"bzr merge && make upgrade" instead of the error-prone manual process
that we currently use.

To prepare the code before pushing it to the repository, you would just
need to run

        make check
        make release

and then follow the instructions it displays.

Cf attached file and
http://bazaar.launchpad.net/~hackit/hackit/trunk/changes for a detailled
list of the changes.

Btw, Vlad:

      * There was a set of differences between the database on hackit.cx
        (which has been upgraded progressively using the individual sql
        update files) and the sql/db_hackit.sql file. Nothing important,
        but it will be helpful to harmonize the sql schema, especially
        for bugfixing. Have a look at sql/diffs/update_db_hackit_r2.sql
        and sql/diffs/update_db_hackit_test_r2.sql
      * I've filled a bug about the duplicate configuration variables in
        config_db.sql - I thought of removing them directly, but I
        wasn't sure of the implications at this stage, so let me know.


Xavier.
2010-11-25  Xavier Antoviaque <[email protected]>

        * Makefile,
        * sql/db_hackit.sql,
        * sql/db_hackit_test.sql: [69] Fixed typo in Makefile and updated SQL
        schemas to contain r3 updates

2010-11-25  Xavier Antoviaque <[email protected]>

        * bin/get_db_release_id.sh,
        * bin/upgrade,
        * bin/upgrade/.upgrade_script_template.sh,
        * bin/upgrade/upgrade_script_r2.sh,
        * sql/backup,
        * sql/diffs,
        * sql/diffs/update_db_hackit_r2.sql,
        * sql/diffs/update_db_hackit_test_r2.sql: Added.

        * test_missions.php: Removed.

        * .release_id,
        * Makefile,
        * sql/db_hackit.sql,
        * sql/db_hackit_test.sql: Modified.

        * sql/alpha1.1_sql_update.sql: Renamed to
          sql/diffs/update_db_hackit_alpha1.0-alpha1.1.sql.
        * sql/update_hackit_db_alpha1.1-alpha1.2.sql: Renamed to
          sql/diffs/update_db_hackit_alpha1.1-alpha1.2.sql.
        * sql/update_hackit_db_alpha1.2-alpha2.0-bis.sql: Renamed to
          sql/diffs/update_db_hackit_alpha1.2-alpha2.0-bis.sql.
        * sql/update_hackit_db_alpha1.2-alpha2.0.sql: Renamed to
          sql/diffs/update_db_hackit_alpha1.2-alpha2.0.sql.

        [68] Added upgrade mechanism and database backup/recovery to Makefile

2010-11-25  Xavier Antoviaque <[email protected]>

        * bin/get_mysql_dbname_test.sh: Added.

        * bin/get_base_url.sh,
        * bin/get_mysql_credentials.sh,
        * bin/get_mysql_dbname.sh,
        * bin/get_percent_coverage_simpletest.sh: Modified.

        [67] Changed the file that allows to check if we are on the
        installation root directory to .release_id, which is more likely to be
        unique

2010-11-24  Xavier Antoviaque <[email protected]>

        * bin/get_base_url.sh,
        * bin/get_percent_coverage_simpletest.sh: [66] Fixed issues with
        configuration variable extraction scripts

2010-11-24  Xavier Antoviaque <[email protected]>

        * bin/get_mysql_credentials.sh,
        * bin/get_mysql_dbname.sh: Added.

        * bin/get_percent_coverage_simpletest.sh: Modified.

        * bin/get_base_url.php: Renamed to bin/get_base_url.sh and modified.

        [65] Added scripts to access database configuration variables from
        shell

2010-11-24  Xavier Antoviaque <[email protected]>

        * config/config_db.php.dist: [64] Added configuration variable for
        test database

2010-11-20  Xavier Antoviaque <[email protected]>

        * .htaccess,
        * Makefile,
        * proxy/index.php: [63] Modified .htaccess with live configuration;
        added reminder to generate this file automatically; fixed warning from
        proxy with PHP 5.3

        * sql/update_hackit_db_alpha1.2-alpha2.0-bis.sql: [62] Fixed SQL
        upgrade file - added mission_state table

        * DataObjects/Mission_state.php,
        * DataObjects/hackit.ini,
        * DataObjects/hackit_test.ini,
        * ajax/missions.php,
        * classes/class_game_session.php,
        * classes/class_mission_action.php,
        * classes/class_missions.php,
        * classes/class_site.php,
        * classes/missions/FirstMission.php,
        * index.php,
        * sql/db_hackit.sql,
        * sql/db_hackit_test.sql,
        * sql/update_hackit_db_alpha1.2-alpha2.0-bis.sql: [61] Merged Vlad's
        latest changes

2010-11-19  Vlad Dragu <[email protected]>

        * classes/class_action_logger.php: [40.1.90] bug fix #676205 - raw
        html output in the mission window

        * DataObjects/Mission_state.php,
        * DataObjects/hackit.ini,
        * DataObjects/hackit_test.ini,
        * ajax/missions.php,
        * classes/class_game_session.php,
        * classes/class_mission_action.php,
        * classes/class_missions.php,
        * classes/missions/FirstMission.php,
        * index.php,
        * sql/db_hackit.sql,
        * sql/db_hackit_test.sql,
        * sql/update_hackit_db_alpha1.2-alpha2.0-bis.sql: [40.1.89] modified
        the storage engine for the mission state; now the mission state is
        stored in the database

        * ajax/missions.php,
        * classes/class_site.php,
        * classes/missions/FirstMission.php,
        * sql/update_hackit_db_alpha1.2-alpha2.0-bis.sql: [40.1.88] removed
        return true fomr the missions functions

2010-11-20  Xavier Antoviaque <[email protected]>

        * classes/class_action_logger.php: [60] Fixed bug with go_to_site
        action

_______________________________________________
Farsides mailing list - [email protected]

Wiki:  http://farsides.com/
List:  http://farsides.com/ml/
Forum: http://farsides.com/forum/
Ideas: http://farsides.com/ideas/
Chat:  http://farsides.com/chat/

Reply via email to